版本更新
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
2
openhis-ui-vue3/src/views/basicmanage/bedspace/index.vue
Normal file
2
openhis-ui-vue3/src/views/basicmanage/bedspace/index.vue
Normal file
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
@@ -0,0 +1,52 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/body-structure/body',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
export function addBodyStructure(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/body-structure/body',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateBodyStructure(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/body-structure/body',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteBodyStructure(ids) {
|
||||
return request({
|
||||
url: '/base-data-manage/body-structure/body?ids=' + ids ,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
export function getBodyStructureDetail(id) {
|
||||
return request({
|
||||
url: '/base-data-manage/body-structure/body?id=' + id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
export function disableBodyStructure(id) {
|
||||
return request({
|
||||
url: '/base-data-manage/body-structure/body-inactive?id=' + id,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
|
||||
export function enableBodyStructure(id) {
|
||||
return request({
|
||||
url: '/base-data-manage/body-structure/body-active?id=' + id,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
236
openhis-ui-vue3/src/views/basicmanage/bodyStructure/index.vue
Normal file
236
openhis-ui-vue3/src/views/basicmanage/bodyStructure/index.vue
Normal file
@@ -0,0 +1,236 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<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-tooltip
|
||||
:content="selectRowIds.length == 0 ? '至少选择一条数据' : ''"
|
||||
placement="top"
|
||||
:disabled="selectRowIds.length != 0"
|
||||
>
|
||||
<el-button
|
||||
type=""
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="selectRowIds.length == 0"
|
||||
@click="handleDelete"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="" plain icon="Download" @click="handleExport"> 导出 </el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="" plain icon="Refresh" @click="getPageList">刷新</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-table
|
||||
ref="bodyStructureTableRef"
|
||||
v-loading="loading"
|
||||
:data="bodyStructure"
|
||||
row-key="id"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="部位名称" align="left" prop="name" />
|
||||
<el-table-column label="拼音" align="left" prop="pyStr" />
|
||||
<el-table-column label="五笔拼音" align="left" prop="wbStr" />
|
||||
<el-table-column label="状态" align="center" prop="statusEnum_enumText" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handelEdit(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handleDisabled(scope.row.id)"
|
||||
v-if="scope.row.statusEnum == '2'"
|
||||
>停用</el-button
|
||||
>
|
||||
<el-button link type="primary" @click="handelEnable(scope.row.id)" v-else>启用</el-button>
|
||||
<el-button link type="primary" @click="handleAddInferior(scope.row)">
|
||||
添加下级
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="600px" @close="cancel" append-to-body>
|
||||
<el-form ref="bodyStructureRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="id" prop="id" v-show="false">
|
||||
<el-input v-model="form.id" placeholder="请输入部位编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部位编号" prop="busNo" v-show="false">
|
||||
<el-input v-model="form.busNo" placeholder="请输入部位编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部位名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入部位名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-col>
|
||||
<el-form-item label="上级部位" prop="busNoParent">
|
||||
<el-tree-select
|
||||
clearable
|
||||
style="width: 100%"
|
||||
v-model="form.busNoParent"
|
||||
:data="bodyStructure"
|
||||
:props="{ value: 'busNo', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
check-strictly
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</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="BodyStructure">
|
||||
import {
|
||||
getList,
|
||||
deleteBodyStructure,
|
||||
addBodyStructure,
|
||||
updateBodyStructure,
|
||||
disableBodyStructure,
|
||||
enableBodyStructure,
|
||||
} from './components/api';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const loading = ref(true);
|
||||
const bodyStructure = ref([]);
|
||||
const queryParams = ref({});
|
||||
const open = ref(false);
|
||||
const form = ref({
|
||||
id: undefined,
|
||||
busNo: undefined,
|
||||
name: undefined,
|
||||
statusEnum: undefined,
|
||||
busNoParent: undefined,
|
||||
});
|
||||
const bodyStructureTableRef = ref();
|
||||
const bodyStructureRef = ref();
|
||||
const selectRowIds = ref([]);
|
||||
const total = ref(0);
|
||||
const title = ref('');
|
||||
const rules = ref({
|
||||
busNo: [{ required: false, message: '请输入部位编号', trigger: 'input' }],
|
||||
name: [
|
||||
{ required: true, message: '请输入部位名称', trigger: 'change' },
|
||||
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'change' },
|
||||
],
|
||||
});
|
||||
|
||||
getPageList();
|
||||
|
||||
function reset() {
|
||||
form.value.id = undefined;
|
||||
bodyStructureRef.value.resetFields();
|
||||
}
|
||||
|
||||
function getPageList() {
|
||||
loading.value = false;
|
||||
getList(queryParams.value).then((res) => {
|
||||
bodyStructure.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function handleAdd() {
|
||||
title.value = '添加身体部位';
|
||||
open.value = true;
|
||||
reset();
|
||||
console.log(form.value);
|
||||
}
|
||||
|
||||
function handelEdit(row) {
|
||||
console.log(row.busNo);
|
||||
|
||||
title.value = '编辑部位';
|
||||
open.value = true;
|
||||
setTimeout(() => {
|
||||
form.value.id = row.id;
|
||||
form.value.busNo = row.busNo;
|
||||
form.value.name = row.name;
|
||||
form.value.statusEnum = row.statusEnum;
|
||||
form.value.busNoParent = row.busNo.split('.').length > 1 ? row.busNo.split('.')[0] : undefined;
|
||||
}, 50);
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
console.log(form.value);
|
||||
}
|
||||
|
||||
// 新增/编辑
|
||||
function submitForm() {
|
||||
proxy.$refs['bodyStructureRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.id == undefined) {
|
||||
if (form.value.busNoParent) {
|
||||
form.value.busNo = form.value.busNoParent;
|
||||
}
|
||||
addBodyStructure(form.value).then((res) => {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
open.value = false;
|
||||
getPageList();
|
||||
});
|
||||
} else {
|
||||
updateBodyStructure(form.value).then((res) => {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
open.value = false;
|
||||
getPageList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 添加下级
|
||||
function handleAddInferior(row) {
|
||||
title.value = '添加下级';
|
||||
open.value = true;
|
||||
form.value.busNoParent = row.busNo;
|
||||
}
|
||||
|
||||
// 删除
|
||||
function handleDelete() {
|
||||
loading.value = true;
|
||||
deleteBodyStructure(selectRowIds.value.join(',')).then((res) => {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
loading.value = false;
|
||||
getPageList();
|
||||
});
|
||||
}
|
||||
// 停用
|
||||
function handleDisabled(id) {
|
||||
disableBodyStructure(id).then((res) => {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
getPageList();
|
||||
});
|
||||
}
|
||||
|
||||
// 启用
|
||||
function handelEnable(id) {
|
||||
enableBodyStructure(id).then((res) => {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
getPageList();
|
||||
});
|
||||
}
|
||||
|
||||
function handleSelectionChange() {
|
||||
selectRowIds.value = bodyStructureTableRef.value.getSelectionRows().map((item) => item.id);
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table ref="medicineRef" height="400" :data="activityList" @cell-click="clickRow" border>
|
||||
<el-table-column label="项目名称" align="center" prop="name" width="300" />
|
||||
<el-table-column label="类型" align="center" prop="typeEnum_enumText" />
|
||||
<el-table-column label="价格" align="right" prop="retailPrice">
|
||||
<template #default="scope">
|
||||
{{ scope.row.retailPrice.toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="说明" align="center" prop="descriptionText" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getActivityList } from './api';
|
||||
import { watch } from 'vue';
|
||||
import { throttle } from 'lodash-es';
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['selectRow']);
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
itemType: props.itemType,
|
||||
});
|
||||
const activityList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
getActivityList(queryParams.value).then((res) => {
|
||||
activityList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit('selectRow', row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询诊疗项目列表
|
||||
export function getActivityList(queryParams) {
|
||||
return request({
|
||||
url: '/personalization/activity-device/activity-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 查询诊疗用法绑定耗材项目列表
|
||||
export function getBindList(queryParams) {
|
||||
return request({
|
||||
url: '/personalization/activity-device/activity-device',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取耗材列表
|
||||
export function getDeviceList(queryParams) {
|
||||
return request({
|
||||
url: '/personalization/activity-device/device-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取耗材列表
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/personalization/activity-device/init',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 绑定用法/诊疗
|
||||
export function bind(data) {
|
||||
return request({
|
||||
url: '/personalization/activity-device/activity-device',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除绑定
|
||||
export function deleteBind(bindId) {
|
||||
return request({
|
||||
url: '/personalization/activity-device/activity-device?bindId=' + bindId,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询服务管理列表
|
||||
export function getRegistrationfeeList(query) {
|
||||
return request({
|
||||
url: '/basic-service/healthcare/healthcare-service-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<div style="width: 100%">
|
||||
<div class="mb8">
|
||||
<el-button type="primary" plain @click="handleAddPrescription()" :disabled="buttonDisabled">
|
||||
添加绑定项目
|
||||
</el-button>
|
||||
</div>
|
||||
<el-form :model="form" :rules="rules" ref="formRef">
|
||||
<el-table
|
||||
ref="prescriptionRef"
|
||||
:data="form.consumablesList"
|
||||
row-key="patientId"
|
||||
border
|
||||
@selection-change="handleSelectionChange"
|
||||
v-loading="props.loading"
|
||||
>
|
||||
<el-table-column label="项目类型" align="center" prop="type" width="150">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">{{ scope.row.type_dictText }}</span>
|
||||
<el-form-item v-else :prop="`consumablesList.${scope.$index}.type`" :rules="rules.type">
|
||||
<el-select v-model="scope.row.type" placeholder="" @change="handleTypeChange">
|
||||
<el-option v-if="props.tab == 1 || props.tab == 3" label="诊疗" value="1" />
|
||||
<el-option v-if="props.tab != 3" label="耗材" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名" align="center" prop="name">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">{{ scope.row.name }}</span>
|
||||
<el-form-item v-else :prop="`consumablesList.${scope.$index}.name`" :rules="rules.name">
|
||||
<PopoverList @search="handleSearch" :width="800" :modelValue="scope.row.name">
|
||||
<template #popover-content="{}">
|
||||
<DeviceList
|
||||
v-if="scope.row.type == '2'"
|
||||
@selectRow="(row) => selectRow(row, scope.$index)"
|
||||
:searchKey="searchKey"
|
||||
/>
|
||||
<ActivityList
|
||||
v-else
|
||||
@selectRow="(row) => selectRow(row, scope.$index)"
|
||||
:searchKey="searchKey"
|
||||
/>
|
||||
</template>
|
||||
</PopoverList>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="绑定数量" align="center" prop="quantity" width="250">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">{{ scope.row.quantity }}</span>
|
||||
<el-form-item
|
||||
v-else
|
||||
:prop="`consumablesList.${scope.$index}.quantity`"
|
||||
:rules="rules.quantity"
|
||||
>
|
||||
<el-input v-model="scope.row.quantity" placeholder="" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="使用范围" align="center" prop="rangeCode" width="150">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">{{ scope.row.rangeCode_dictText }}</span>
|
||||
<el-form-item
|
||||
v-else
|
||||
:prop="`consumablesList.${scope.$index}.rangeCode`"
|
||||
:rules="rules.rangeCode"
|
||||
>
|
||||
<el-input v-model="scope.row.rangeCode" placeholder="" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="范围" align="center" prop="rangeCode" width="250">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">{{ scope.row.rangeCode_dictText }}</span>
|
||||
<el-form-item
|
||||
v-else
|
||||
:prop="`consumablesList.${scope.$index}.rangeCode`"
|
||||
:rules="rules.statusEnum"
|
||||
>
|
||||
<el-select v-model="scope.row.rangeCode" placeholder="">
|
||||
<el-option
|
||||
v-for="dict in use_range"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="启用状态" align="center" prop="statusEnum" width="250">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">{{ scope.row.statusEnum_dictText }}</span>
|
||||
<el-form-item
|
||||
v-else
|
||||
:prop="`consumablesList.${scope.$index}.statusEnum`"
|
||||
:rules="rules.statusEnum"
|
||||
>
|
||||
<el-select v-model="scope.row.statusEnum" placeholder="" @change="handleTypeChange">
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="250">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="!scope.row.isEdit"
|
||||
link
|
||||
type="primary"
|
||||
@click="handleEdit(scope.$index)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.isEdit"
|
||||
link
|
||||
type="primary"
|
||||
@click="handleSave(scope.row, scope.$index)"
|
||||
>
|
||||
保存
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.isEdit"
|
||||
link
|
||||
type="primary"
|
||||
@click="
|
||||
() => {
|
||||
form.consumablesList[scope.$index].isEdit = false;
|
||||
isAdd = true;
|
||||
if (!scope.row.id) {
|
||||
form.consumablesList.splice(scope.$index, 1);
|
||||
}
|
||||
}
|
||||
"
|
||||
>
|
||||
取消
|
||||
</el-button>
|
||||
<el-button link type="primary" @click.stop="handleDelete(scope.row, scope.$index)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, watch } from 'vue';
|
||||
import { bind, deleteBind, init } from './api';
|
||||
import PopoverList from '@/components/OpenHis/popoverList/index.vue';
|
||||
import DeviceList from './deviceList.vue';
|
||||
import ActivityList from './activityList.vue';
|
||||
|
||||
const emit = defineEmits(['refresh']);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({});
|
||||
const consumablesList = ref([]);
|
||||
const searchKey = ref('');
|
||||
const rowIndex = ref(-1);
|
||||
const isAdd = ref(true);
|
||||
const rules = ref({
|
||||
name: [{ required: true, message: '请选择耗材项', trigger: 'change' }],
|
||||
quantity: [{ required: true, message: '请输入绑定数量', trigger: 'blur' }],
|
||||
rangeCode: [{ required: true, message: '请选择使用范围', trigger: 'blur' }],
|
||||
});
|
||||
const form = reactive({
|
||||
consumablesList: [],
|
||||
});
|
||||
const statusOptions = ref([]);
|
||||
|
||||
const props = defineProps({
|
||||
bindList: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
bindInfo: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
tab: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
const buttonDisabled = computed(() => {
|
||||
return !props.bindInfo.id;
|
||||
});
|
||||
watch(
|
||||
() => props.bindList,
|
||||
(newVal) => {
|
||||
form.consumablesList = newVal.map((item) => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.deviceName ? item.deviceName : item.activityName,
|
||||
devActId: item.devActId,
|
||||
quantity: item.quantity,
|
||||
rangeCode: item.rangeCode,
|
||||
rangeCode_dictText: item.rangeCode_dictText,
|
||||
statusEnum: item.statusEnum,
|
||||
statusEnum_dictText: item.statusEnum_enumText,
|
||||
typeCode: item.typeCode,
|
||||
typeCode_dictText: item.typeCode_dictText,
|
||||
type: item.activityName ? '1' : '2',
|
||||
type_dictText: item.activityName ? '诊疗' : '耗材',
|
||||
};
|
||||
});
|
||||
isAdd.value = true;
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
watch(
|
||||
() => props.tab,
|
||||
() => {
|
||||
form.consumablesList = [];
|
||||
isAdd.value = true;
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const { use_range } = proxy.useDict('use_range');
|
||||
function handleAddPrescription() {
|
||||
if (!isAdd.value) {
|
||||
proxy.$modal.msgWarning('请先保存当前行');
|
||||
return;
|
||||
}
|
||||
form.consumablesList.push({
|
||||
isEdit: true,
|
||||
// type: '2',
|
||||
rangeCode: '3',
|
||||
statusEnum: 2,
|
||||
});
|
||||
isAdd.value = false;
|
||||
console.log(form.consumablesList, 234567890);
|
||||
}
|
||||
|
||||
function handleEdit(index) {
|
||||
form.consumablesList[index].isEdit = true;
|
||||
}
|
||||
|
||||
function handleSave(row, index) {
|
||||
proxy.$refs['formRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
console.log(row, 'row');
|
||||
bind({
|
||||
itemNo: props.bindInfo.id,
|
||||
devActId: row.devActId,
|
||||
typeCode: props.bindInfo.typeCode,
|
||||
rangeCode: row.rangeCode,
|
||||
quantity: row.quantity,
|
||||
statusEnum: row.statusEnum,
|
||||
id: row.id ? row.id : undefined,
|
||||
devActTable: row.type == '1' ? 'wor_activity_definition' : 'adm_device_definition',
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
emit('refresh');
|
||||
isAdd.value = true;
|
||||
}
|
||||
});
|
||||
form.consumablesList[index].isEdit = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleDelete(row, index) {
|
||||
if (row.id) {
|
||||
proxy.$modal.confirm('确认删除当前绑定项目吗').then(() => {
|
||||
deleteBind(row.id).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
emit('refresh');
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
form.consumablesList.splice(index, 1);
|
||||
isAdd.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
function initOptions() {
|
||||
init().then((res) => {
|
||||
statusOptions.value = res.data.statusOptions;
|
||||
});
|
||||
}
|
||||
|
||||
function handleSearch(value) {
|
||||
searchKey.value = value;
|
||||
}
|
||||
|
||||
initOptions();
|
||||
function selectRow(row, index) {
|
||||
form.consumablesList[index].devActId = row.id;
|
||||
form.consumablesList[index].name = row.name;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table ref="medicineRef" height="400" :data="deviceList" @cell-click="clickRow" border>
|
||||
<el-table-column label="项目名称" align="center" prop="name" width="200" />
|
||||
<el-table-column label="分类" align="center" prop="categoryCode_dictText" width="150" />
|
||||
<el-table-column label="种类" align="center" prop="typeCode_dictText" />
|
||||
<el-table-column label="规格" align="center" prop="size" />
|
||||
<el-table-column label="价格" align="right" prop="retailPrice">
|
||||
<template #default="scope">
|
||||
{{ scope.row.retailPrice.toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产厂家" align="center" prop="supplyId_dictText" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getDeviceList } from './api';
|
||||
import { watch } from 'vue';
|
||||
import { throttle } from 'lodash-es';
|
||||
|
||||
const props = defineProps({
|
||||
searchKey: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['selectRow']);
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
itemType: props.itemType,
|
||||
});
|
||||
const deviceList = ref([]);
|
||||
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
throttledGetList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
getDeviceList(queryParams.value).then((res) => {
|
||||
deviceList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit('selectRow', row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div style="height: 780px; display: flex; justify-content: space-between">
|
||||
<el-card style="height: 100%; width: 25%">
|
||||
<el-tabs v-model="activeTab">
|
||||
<el-tab-pane label="用法" :name="1">
|
||||
<el-table
|
||||
:data="method_code"
|
||||
border
|
||||
@cell-click="clickRow"
|
||||
highlight-current-row
|
||||
max-height="650"
|
||||
>
|
||||
<el-table-column label="项目名" align="center" prop="label" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="诊疗" :name="2">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入项目名"
|
||||
clearable
|
||||
style="width: 100%; margin-bottom: 10px"
|
||||
@keyup.enter="getList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-table
|
||||
:data="activityList"
|
||||
border
|
||||
@cell-click="clickRow"
|
||||
highlight-current-row
|
||||
max-height="650"
|
||||
>
|
||||
<el-table-column label="项目名" align="center" prop="name" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="号源" :name="3">
|
||||
<el-input
|
||||
v-model="queryParamsRegistration.searchKey"
|
||||
placeholder="请输入项目名"
|
||||
clearable
|
||||
style="width: 100%; margin-bottom: 10px"
|
||||
@keyup.enter="getRegistrationList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getRegistrationList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-table
|
||||
:data="RegistrationfeeList"
|
||||
border
|
||||
@cell-click="clickRow"
|
||||
highlight-current-row
|
||||
max-height="650"
|
||||
>
|
||||
<el-table-column label="项目名" align="center" prop="name" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
<el-card style="height: 100%; width: 74%">
|
||||
<ConsumablesList
|
||||
:bindList="bindList"
|
||||
:bindInfo="bindInfo"
|
||||
:tab="activeTab"
|
||||
:loading="loading"
|
||||
@refresh="clickRow(currentRow)"
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { getActivityList, getBindList, getRegistrationfeeList } from './components/api.js';
|
||||
import ConsumablesList from './components/consumablesList.vue';
|
||||
|
||||
const activityList = ref([]);
|
||||
const queryParams = ref({});
|
||||
const queryParamsRegistration = ref({});
|
||||
const bindList = ref([]);
|
||||
const bindInfo = ref({});
|
||||
const activeTab = ref(1);
|
||||
const currentRow = ref({});
|
||||
const RegistrationfeeList = ref([]);
|
||||
const loading = ref(false);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { method_code } = proxy.useDict('method_code');
|
||||
|
||||
getList();
|
||||
getRegistrationList()
|
||||
function getList() {
|
||||
// queryParams.value.typeEnum = activeTab.value;
|
||||
getActivityList(queryParams.value).then((res) => {
|
||||
activityList.value = res.data.records;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function getRegistrationList() {
|
||||
getRegistrationfeeList(queryParamsRegistration.value).then(res => {
|
||||
RegistrationfeeList.value = res.data.records;
|
||||
})
|
||||
}
|
||||
|
||||
// 点击诊疗列表 获取绑定的耗材
|
||||
function clickRow(row) {
|
||||
loading.value = true;
|
||||
currentRow.value = row;
|
||||
bindInfo.value.id = row.value ? row.value : row.id;
|
||||
bindInfo.value.typeCode = activeTab.value;
|
||||
getBindList({ itemNo: row.value ? row.value : row.id }).then((res) => {
|
||||
bindList.value = res.data.records;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
2
openhis-ui-vue3/src/views/basicmanage/contract/index.vue
Normal file
2
openhis-ui-vue3/src/views/basicmanage/contract/index.vue
Normal file
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
2
openhis-ui-vue3/src/views/basicmanage/customer/index.vue
Normal file
2
openhis-ui-vue3/src/views/basicmanage/customer/index.vue
Normal file
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
2
openhis-ui-vue3/src/views/basicmanage/fee/index.vue
Normal file
2
openhis-ui-vue3/src/views/basicmanage/fee/index.vue
Normal file
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
@@ -0,0 +1,223 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="添加频次详情"
|
||||
v-model="dialogVisible"
|
||||
width="520px"
|
||||
top="8vh"
|
||||
:close-on-click-modal="false"
|
||||
@close="resetForm"
|
||||
>
|
||||
<!-- 表单区域 -->
|
||||
<el-form
|
||||
:model="formData"
|
||||
ref="form"
|
||||
label-width="120px"
|
||||
class="freq-form"
|
||||
>
|
||||
<!-- 字典代码 -->
|
||||
<el-form-item label="字典代码">
|
||||
<el-input
|
||||
v-model="formData.rateCode"
|
||||
readonly
|
||||
class="input-readonly"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 分割线 -->
|
||||
<el-divider content-position="left">每日执行</el-divider>
|
||||
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="次数">
|
||||
<el-input-number
|
||||
v-model="formData.dayCount"
|
||||
:min="1"
|
||||
:max="99"
|
||||
controls-position="right"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="间隔(天)">
|
||||
<el-input-number
|
||||
v-model="formData.dayInterval"
|
||||
:min="0"
|
||||
:max="99"
|
||||
controls-position="right"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="时间点">
|
||||
<el-select v-model="formData.dayTimes" multiple placeholder="选择时间点">
|
||||
<el-option
|
||||
v-for="time in timeOptions"
|
||||
:key="time"
|
||||
:value="time"
|
||||
:label="time"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <!– 分割线 –>-->
|
||||
<!-- <el-divider content-position="left">每周执行</el-divider>-->
|
||||
|
||||
<!-- <el-row :gutter="16">-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="是否启用">-->
|
||||
<!-- <el-switch-->
|
||||
<!-- v-model="formData.weekCycleFlag"-->
|
||||
<!-- :active-value="1"-->
|
||||
<!-- :inactive-value="0"-->
|
||||
<!-- active-text="是"-->
|
||||
<!-- inactive-text="否"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="间隔(周)">-->
|
||||
<!-- <el-input-number-->
|
||||
<!-- v-model="formData.weekInterval"-->
|
||||
<!-- :min="1"-->
|
||||
<!-- :max="52"-->
|
||||
<!-- controls-position="right"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<!-- <el-form-item label="周次数">-->
|
||||
<!-- <el-input-number-->
|
||||
<!-- v-model="formData.weekTimes"-->
|
||||
<!-- :min="1"-->
|
||||
<!-- :max="7"-->
|
||||
<!-- controls-position="right"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<!-- 分割线 -->
|
||||
<el-divider content-position="left">周期与总计</el-divider>
|
||||
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="总次数">
|
||||
<el-input-number
|
||||
v-model="formData.totalExecutionCount"
|
||||
:min="1"
|
||||
:max="999"
|
||||
controls-position="right"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="周期长度">
|
||||
<el-input-number
|
||||
v-model="formData.executionPeriod"
|
||||
:min="1"
|
||||
:max="999"
|
||||
controls-position="right"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="周期单位">
|
||||
<el-select v-model="formData.executionPeriodUnit" style="width: 100%">
|
||||
<el-option label="分钟" value="minute" />
|
||||
<el-option label="天" value="day" />
|
||||
<el-option label="周" value="week" />
|
||||
<el-option label="月" value="month" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注">
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="formData.memo"
|
||||
:rows="2"
|
||||
maxlength="200"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<template #footer>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<style scoped>
|
||||
.freq-form {
|
||||
padding: 0 10px;
|
||||
}
|
||||
.input-readonly {
|
||||
background-color: #f5f7fa;
|
||||
color: #c0c4cc;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, defineProps, defineEmits } from "vue";
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: { type: Boolean, default: false },
|
||||
initialFormData: { type: Object, default: () => ({}) }
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'submit'])
|
||||
|
||||
const formData = ref({
|
||||
rateCode: '',
|
||||
name: '',
|
||||
dayCount: 0,
|
||||
dayInterval: 0,
|
||||
dayTimes: [],
|
||||
weekCycleFlag: 0,
|
||||
weekInterval: 0,
|
||||
weekTimes: 0,
|
||||
continueFlag: 0,
|
||||
totalExecutionCount: 0,
|
||||
executionPeriod: 0,
|
||||
executionPeriodUnit: 'day',
|
||||
memo: ''
|
||||
});
|
||||
|
||||
|
||||
const generateTimeOptions = () => {
|
||||
const options = [];
|
||||
for (let hour = 0; hour < 24; hour++) {
|
||||
for (let minute = 0; minute <= 59; minute += 30) {
|
||||
const time = `${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}`;
|
||||
options.push(time);
|
||||
}
|
||||
}
|
||||
return options;
|
||||
};
|
||||
|
||||
const timeOptions = ref(generateTimeOptions());
|
||||
// 计算属性:让 el-dialog 直接绑定 v-model
|
||||
const dialogVisible = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (val) => emit('update:modelValue', val)
|
||||
})
|
||||
|
||||
function resetForm() {
|
||||
formData.value = { ...props.initialFormData }
|
||||
}
|
||||
function submitForm() {
|
||||
emit('submit', formData.value)
|
||||
dialogVisible.value = false // 关闭
|
||||
}
|
||||
watch(
|
||||
() => props.initialFormData,
|
||||
(newVal) => { formData.value = { ...newVal }; },
|
||||
{ immediate: true }
|
||||
);
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 初始化
|
||||
export function getFrequencyDetailList(query) {
|
||||
return request({
|
||||
url: '/personalization/frequency/getPageList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 新增
|
||||
export function addFrequencyDetail(data) {
|
||||
return request({
|
||||
url: '/personalization/frequency/save',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 删除
|
||||
export function deleteFrequencyDetail(data) {
|
||||
return request({
|
||||
url: '/personalization/frequency/' + data,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
346
openhis-ui-vue3/src/views/basicmanage/frequency/index.vue
Normal file
346
openhis-ui-vue3/src/views/basicmanage/frequency/index.vue
Normal file
@@ -0,0 +1,346 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--诊疗目录-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-title">频次字典</div>
|
||||
<div>
|
||||
<el-table
|
||||
ref="freTableRef"
|
||||
v-loading="loading"
|
||||
:data="frequency"
|
||||
row-key="id"
|
||||
@row-click="handleRowClick"
|
||||
>
|
||||
<el-table-column label="字典频次名称" align="left" prop="dictLabel" />
|
||||
<el-table-column label="字典频次代码" align="left" prop="dictValue" />
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="frequencyTotal > 0"
|
||||
:total="frequencyTotal"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getFrequencyList"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openDialog"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>添加频次详情</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="frequencyDetail"
|
||||
>
|
||||
<!-- 定义表格列 -->
|
||||
<el-table-column
|
||||
prop="rateCode"
|
||||
label="频次代码"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="名称"
|
||||
width="200">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="dayCount"
|
||||
label="每天执行次数"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="dayInterval"-->
|
||||
<!-- label="每次执行间隔(天数)"-->
|
||||
<!-- width="180">-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column
|
||||
prop="dayTimes"
|
||||
label="执行时间点"
|
||||
width="300">
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="weekCycleFlag"-->
|
||||
<!-- label="是否周期性每周执行"-->
|
||||
<!-- width="150">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{ scope.row.weekCycleFlag === 1 ? '是' : '否' }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="weekInterval"-->
|
||||
<!-- label="每周执行的间隔"-->
|
||||
<!-- width="150">-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="weekTimes"-->
|
||||
<!-- label="每周执行的次数"-->
|
||||
<!-- width="120">-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="continueFlag"-->
|
||||
<!-- label="是否为连续执行"-->
|
||||
<!-- width="150">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- {{ scope.row.continueFlag === 1 ? '是' : '否' }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column
|
||||
prop="totalExecutionCount"
|
||||
label="执行总次数"
|
||||
width="120">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="executionPeriod"
|
||||
label="执行周期长度"
|
||||
width="150">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="executionPeriodUnit"
|
||||
label="执行周期单位"
|
||||
width="150">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="memo"-->
|
||||
<!-- label="备注信息"-->
|
||||
<!-- width="200">-->
|
||||
<!-- </el-table-column>-->
|
||||
<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="openSave(scope.row, scope.$index)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
:disabled="scope.row.id == ''"
|
||||
@click="deleteSelectedRows(scope.row)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination-->
|
||||
<!-- v-show="frequencyDetailTotal > 0"-->
|
||||
<!-- :total="frequencyDetailTotal"-->
|
||||
<!-- v-model:page="queryDetailParams.pageNum"-->
|
||||
<!-- v-model:limit="queryDetailParams.pageSize"-->
|
||||
<!-- @pagination="getDetailList"-->
|
||||
<!-- />-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<FreForm
|
||||
v-model="dialogVisible"
|
||||
:initialFormData="showFormData"
|
||||
@submit="handleFormSubmit"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="frequency">
|
||||
import {
|
||||
addFrequencyDetail, deleteFrequencyDetail,
|
||||
getFrequencyDetailList
|
||||
} from './components/frequency.js';
|
||||
import { ElMessage } from "element-plus";
|
||||
import {
|
||||
listData
|
||||
} from "@/api/system/dict/data.js";
|
||||
import FreForm from "@/views/basicmanage/frequency/components/FreForm.vue";
|
||||
const frequency = ref([]);
|
||||
const frequencyDetail = ref([]);
|
||||
const frequencyTotal = ref(0);
|
||||
const frequencyDetailTotal = ref(0);
|
||||
const currentLeftRow = ref(null);
|
||||
let addFlag = ref(true);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
dictType: 'rate_code',
|
||||
status : 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
queryDetailParams: {
|
||||
code: '',
|
||||
status : 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
});
|
||||
const dialogVisible = ref(false);
|
||||
const showFormData = ref({}); // 真正给弹窗用的数据
|
||||
// 初始表单数据
|
||||
|
||||
const { queryParams, form, tableRules,queryDetailParams } = toRefs(data);
|
||||
|
||||
/** 获取字典列表 */
|
||||
function getFrequencyList() {
|
||||
listData(queryParams.value).then((res) => {
|
||||
if (res.code === 200) {
|
||||
frequency.value =
|
||||
res.rows.length > 0
|
||||
? res.rows.map((res) => {
|
||||
return {
|
||||
...res,
|
||||
isEditing: false, // 标记当前行是否正在编辑
|
||||
error: false, // 新增 error 字段
|
||||
};
|
||||
})
|
||||
: [];
|
||||
}
|
||||
frequencyTotal.value = res.total;
|
||||
});
|
||||
}
|
||||
function getDetailList() {
|
||||
getFrequencyDetailList(queryDetailParams.value).then((res) => {
|
||||
if (res.code === 200) {
|
||||
frequencyDetail.value =
|
||||
res.data.records.length > 0
|
||||
? res.data.records.map((record) => {
|
||||
// 将 dayTimes 字符串转换为数组
|
||||
const dayTimesArray = record.dayTimes.split(',');
|
||||
const sortedDayTimesArray = dayTimesArray.sort((a, b) => {
|
||||
const timeToMinutes = (time) => {
|
||||
const [hours, minutes] = time.split(':').map(Number);
|
||||
return hours * 60 + minutes;
|
||||
};
|
||||
return timeToMinutes(a) - timeToMinutes(b);
|
||||
});
|
||||
const sortedDayTimesString = sortedDayTimesArray.join(',');
|
||||
return {
|
||||
...record,
|
||||
dayTimes: sortedDayTimesString, // 使用排序后的字符串
|
||||
error: false, // 新增 error 字段
|
||||
};
|
||||
})
|
||||
: [];
|
||||
}
|
||||
if( res.data.records.length > 0){
|
||||
//有数据不允许添加
|
||||
addFlag.value = false;
|
||||
}else{
|
||||
addFlag.value = true;
|
||||
}
|
||||
frequencyDetailTotal.value = res.data.total;
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleRowClick(row) {
|
||||
queryDetailParams.value.code = row.dictValue;
|
||||
currentLeftRow.value = row; // 记录当前行
|
||||
getDetailList();
|
||||
|
||||
}
|
||||
function openDialog() {
|
||||
if (!currentLeftRow?.value) {
|
||||
ElMessage.warning('请先选择一行字典数据!')
|
||||
return;
|
||||
}
|
||||
if (addFlag.value === false) {
|
||||
ElMessage.warning('已有详情!请直接修改!')
|
||||
addFlag.value = true;
|
||||
return;
|
||||
}
|
||||
//默认显示数据
|
||||
showFormData.value = {
|
||||
rateCode: currentLeftRow.value.dictValue,
|
||||
name : currentLeftRow.value.dictLabel,
|
||||
dayCount: 0,
|
||||
dayInterval: 0,
|
||||
dayTimes: [],
|
||||
weekCycleFlag: 0,
|
||||
weekInterval: 0,
|
||||
weekTimes: 0,
|
||||
continueFlag: 0,
|
||||
totalExecutionCount: 0,
|
||||
executionPeriod: 0,
|
||||
executionPeriodUnit: 'day',
|
||||
memo: ''
|
||||
};
|
||||
dialogVisible.value = true;
|
||||
}
|
||||
// 处理表单提交
|
||||
/* 保存/新增 */
|
||||
function handleFormSubmit(initialFormData) {
|
||||
|
||||
addFrequencyDetail(initialFormData).then(() => {
|
||||
getDetailList();
|
||||
ElMessage.success('保存成功');
|
||||
});
|
||||
}
|
||||
|
||||
function openSave(row) {
|
||||
//默认显示数据
|
||||
showFormData.value = { ...row };
|
||||
row.dayTimes = row.dayTimes.split(',');
|
||||
row.dayTimes.sort((a, b) => {
|
||||
// 将时间字符串转换为分钟数进行比较
|
||||
const timeToMinutes = (time) => {
|
||||
const [hours, minutes] = time.split(':').map(Number);
|
||||
return hours * 60 + minutes;
|
||||
};
|
||||
|
||||
return timeToMinutes(a) - timeToMinutes(b);
|
||||
});
|
||||
// 更新 showFormData 中的 dayTimes
|
||||
showFormData.value.dayTimes = row.dayTimes;
|
||||
|
||||
dialogVisible.value = true;
|
||||
}
|
||||
|
||||
|
||||
/* 删除 */
|
||||
function deleteSelectedRows(row) {
|
||||
deleteFrequencyDetail(row.id).then(() => {
|
||||
ElMessage.success('删除成功');
|
||||
getDetailList();
|
||||
});
|
||||
}
|
||||
|
||||
getFrequencyList();
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
.error-border {
|
||||
border: 1px solid red;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,68 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 初始化
|
||||
export function getImplementDepartmentList(query) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询诊疗目录列表
|
||||
export function getDiagnosisTreatmentList(query) {
|
||||
return request({
|
||||
url: '/base-data-manage/org-loc/org-loc',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
//查询诊疗目录详细
|
||||
export function getImplementDepartmentOne(query) {
|
||||
return request({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-page',
|
||||
method: 'get',
|
||||
params: query // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 新增
|
||||
export function addImplementDepartment(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/org-loc/org-loc',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function editImplementDepartment(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/org-loc/org-loc',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteImplementDepartment(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/org-loc/org-loc?orgLocId=' + data.orgLocId,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 目录分类查询
|
||||
export function getDiseaseTreatmentInit() {
|
||||
return request({
|
||||
url: '/data-dictionary/diagnosis-treatment/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 目录分类子查询
|
||||
export function getDiseaseTreatmentInitLoc(id) {
|
||||
return request({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-one?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,467 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--诊疗目录-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-title">执行科室配置</div>
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
:data="organization"
|
||||
:props="{ label: 'name', children: 'children' }"
|
||||
:expand-on-click-node="true"
|
||||
:filter-node-method="filterNode"
|
||||
ref="treeRef"
|
||||
node-key="id"
|
||||
highlight-current
|
||||
check-strictly
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
<!--诊疗目录-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
:disabled="isAddDisable"
|
||||
@click="handleAddItem"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>添加新项目</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="catagoryList"
|
||||
@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="项目名称"
|
||||
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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="开始时间"
|
||||
align="center"
|
||||
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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="结束时间"
|
||||
align="center"
|
||||
key="endTime"
|
||||
prop="endTime"
|
||||
: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.endTime"
|
||||
placeholder="选择时间"
|
||||
format="HH:mm:ss"
|
||||
value-format="HH:mm:ss"
|
||||
>
|
||||
</el-time-picker>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="openSaveImplementDepartment(scope.row, scope.$index)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
:disabled="scope.row.id == ''"
|
||||
@click="deleteSelectedRows(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"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="implementDepartment">
|
||||
import { ref } from 'vue';
|
||||
import {
|
||||
getImplementDepartmentList,
|
||||
getDiagnosisTreatmentList,
|
||||
getDiseaseTreatmentInit,
|
||||
getImplementDepartmentOne,
|
||||
// getDiseaseTreatmentInitLoc,
|
||||
addImplementDepartment,
|
||||
editImplementDepartment,
|
||||
deleteImplementDepartment,
|
||||
} from './components/implementDepartment';
|
||||
import { debounce } from 'lodash-es';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const organization = ref([]);
|
||||
const loading = ref(true);
|
||||
const ids = ref([]); // 存储选择的行数据
|
||||
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('');
|
||||
//默认传8(诊疗)
|
||||
const distributionCategoryCode = ref('8');
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
tableRules: {
|
||||
activityCategoryCode: [{ required: true, message: '诊疗目录不能为空', trigger: 'blur' }],
|
||||
activityDefinitionId: [{ required: true, message: '项目名称不能为空', trigger: 'blur' }],
|
||||
},
|
||||
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)
|
||||
loading.value = false;
|
||||
catagoryList.value = res.data.records
|
||||
catagoryList.value.map((k,index)=>{
|
||||
// if(k.activityCategoryCode){
|
||||
DiagnosisTreatmentList(k,index, 2)
|
||||
// }
|
||||
})
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
/** 通过条件过滤节点 */
|
||||
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
|
||||
}
|
||||
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) {
|
||||
loading.value = true;
|
||||
const params = {
|
||||
statusEnum: 2,
|
||||
activityCategoryCode: row.activityCategoryCode, // 确保已选诊疗目录
|
||||
searchKey: query, // 模糊搜索关键字
|
||||
};
|
||||
getImplementDepartmentOne(params).then((res) => {
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
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;
|
||||
}
|
||||
// 新增项目
|
||||
function handleAddItem() {
|
||||
if (data.isAdding) {
|
||||
proxy.$message.warning('请先保存当前行后再新增!');
|
||||
return;
|
||||
}
|
||||
const newRow = {
|
||||
startTime:'00:00:00',
|
||||
endTime:'23:59:59'
|
||||
};
|
||||
catagoryList.value.push(newRow);
|
||||
total.value = organization.value.length;
|
||||
data.isAdding = true; // 设置标志位为 true,表示有未保存的
|
||||
}
|
||||
// 检验 编辑或 保存数据
|
||||
function handleBlur(row, index) {
|
||||
let hasError = false;
|
||||
const fields = ['activityCategoryCode', 'activityDefinitionId', 'startTime', 'endTime'];
|
||||
|
||||
fields.forEach((field) => {
|
||||
if (!row[field]) {
|
||||
hasError = true;
|
||||
const message = tableRules.value[field]?.[0]?.message;
|
||||
if (message) {
|
||||
proxy.$message.error(message);
|
||||
} else {
|
||||
console.error(`No rule defined for field: ${field}`);
|
||||
proxy.$message.error(`No rule defined for field: ${field}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
row.error = hasError;
|
||||
}
|
||||
|
||||
// 编辑或 保存当前行
|
||||
function openSaveImplementDepartment(row) {
|
||||
const params = {
|
||||
// 科室id
|
||||
organizationId: organizationId.value,
|
||||
// 类别
|
||||
distributionCategoryCode: distributionCategoryCode.value,
|
||||
...row,
|
||||
};
|
||||
let hasError = false;
|
||||
handleBlur(row);
|
||||
if (row.error) {
|
||||
hasError = true;
|
||||
}
|
||||
const startTime = params.startTime;
|
||||
const endTime = params.endTime;
|
||||
if (startTime > endTime) {
|
||||
proxy.$message.error('开始时间不能大于结束时间');
|
||||
return;
|
||||
}
|
||||
if (hasError) {
|
||||
proxy.$message.error('请填写完整信息');
|
||||
return;
|
||||
}
|
||||
if (row.id) {
|
||||
editImplementDepartment(params).then((res) => {
|
||||
data.isAdding = false; // 允许新增下一行
|
||||
proxy.$modal.msgSuccess('保存成功!');
|
||||
});
|
||||
} else {
|
||||
delete params.id;
|
||||
addImplementDepartment(params).then((res) => {
|
||||
data.isAdding = false; // 允许新增下一行
|
||||
proxy.$modal.msgSuccess('保存成功!');
|
||||
});
|
||||
}
|
||||
}
|
||||
// 删除当前所选行
|
||||
function deleteSelectedRows(row) {
|
||||
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)
|
||||
}
|
||||
})
|
||||
// 新增按钮是否 disable
|
||||
if (node.parent === null || node.level === 1) {
|
||||
isAddDisable.value = true;
|
||||
} else {
|
||||
isAddDisable.value = false;
|
||||
}
|
||||
// 检查节点是否有子节点
|
||||
if (node.data.children && node.data.children.length > 0) {
|
||||
// proxy.$message.warning("不能选择父节点");
|
||||
return;
|
||||
}
|
||||
// 选中科室id
|
||||
organizationId.value = node.data.id;
|
||||
// 获取 右侧 table 信息
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 目录分类查询 */
|
||||
function getDiseaseTreatmentList() {
|
||||
getDiseaseTreatmentInit().then(({ data }) => {
|
||||
//分类目录初始化获取
|
||||
catagoryDicts.value = data.diagnosisCategoryOptions.sort((a, b) => {
|
||||
return parseInt(a.value) - parseInt(b.value);
|
||||
});
|
||||
});
|
||||
// 诊疗目录分类查询下拉树结d构
|
||||
loading.value = true;
|
||||
// 诊疗目录分类查询下拉树结d构
|
||||
getImplDepartList();
|
||||
}
|
||||
// 诊疗目录分类查询下拉树结d构
|
||||
function getImplDepartList() {
|
||||
getImplementDepartmentList().then((res) => {
|
||||
loading.value = false;
|
||||
if (res.code === 200) {
|
||||
if (res.data.records.length > 0) {
|
||||
organization.value = res.data.records.map((res) => {
|
||||
return {
|
||||
...res,
|
||||
isEditing: false, // 标记当前行是否正在编辑
|
||||
error: false, // 新增 error 字段
|
||||
};
|
||||
});
|
||||
} else {
|
||||
organization.value = [];
|
||||
}
|
||||
} else {
|
||||
this.$modal.msgError(res.code);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 获取左侧执行科室配置目录
|
||||
getDiseaseTreatmentList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
|
||||
.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>
|
||||
2
openhis-ui-vue3/src/views/basicmanage/lisMerge/index.vue
Normal file
2
openhis-ui-vue3/src/views/basicmanage/lisMerge/index.vue
Normal file
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
@@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<div @keyup="handleKeyDown" tabindex="0" ref="tableWrapper">
|
||||
<el-table
|
||||
ref="adviceBaseRef"
|
||||
height="400"
|
||||
:data="adviceBaseList"
|
||||
highlight-current-row
|
||||
@current-change="handleCurrentChange"
|
||||
row-key="patientId"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column label="名称" align="center" prop="adviceName" />
|
||||
<el-table-column label="类型" align="center" prop="activityType_enumText" />
|
||||
<el-table-column label="包装单位" align="center" prop="unitCode_dictText" />
|
||||
<el-table-column label="最小单位" align="center" prop="minUnitCode_dictText" />
|
||||
<el-table-column label="规格" align="center" prop="volume" />
|
||||
<el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="频次" align="center" prop="rateCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
<el-table-column label="剂量单位" align="center" prop="doseUnitCode_dictText" />
|
||||
<el-table-column label="注射药品" align="center" prop="injectFlag_enumText" />
|
||||
<el-table-column label="皮试" align="center" prop="skinTestFlag_enumText" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { nextTick } from 'vue';
|
||||
import { getAdviceBaseInfo } from './api';
|
||||
import { throttle } from 'lodash-es';
|
||||
|
||||
const props = defineProps({
|
||||
adviceQueryParams: {
|
||||
type: Object,
|
||||
default: '',
|
||||
},
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['selectAdviceBase']);
|
||||
const total = ref(0);
|
||||
const adviceBaseRef = ref();
|
||||
const tableWrapper = ref();
|
||||
const currentIndex = ref(0); // 当前选中行索引
|
||||
const currentSelectRow = ref({});
|
||||
const queryParams = ref({
|
||||
pageSize: 100,
|
||||
pageNum: 1,
|
||||
});
|
||||
const adviceBaseList = ref([]);
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
watch(
|
||||
() => props.adviceQueryParams,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
queryParams.value.adviceType = newValue.adviceType;
|
||||
console.log(queryParams.value);
|
||||
throttledGetList();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
queryParams.value.organizationId = '1922545444781481985';
|
||||
getAdviceBaseInfo(queryParams.value).then((res) => {
|
||||
adviceBaseList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
nextTick(() => {
|
||||
currentIndex.value = 0;
|
||||
if (adviceBaseList.value.length > 0) {
|
||||
adviceBaseRef.value.setCurrentRow(adviceBaseList.value[0]);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 处理键盘事件
|
||||
const handleKeyDown = (event) => {
|
||||
const key = event.key;
|
||||
const data = adviceBaseList.value;
|
||||
|
||||
switch (key) {
|
||||
case 'ArrowUp': // 上箭头
|
||||
event.preventDefault(); // 阻止默认滚动行为
|
||||
if (currentIndex.value > 0) {
|
||||
currentIndex.value--;
|
||||
setCurrentRow(data[currentIndex.value]);
|
||||
}
|
||||
break;
|
||||
case 'ArrowDown': // 下箭头`
|
||||
event.preventDefault();
|
||||
if (currentIndex.value < data.length - 1) {
|
||||
currentIndex.value++;
|
||||
setCurrentRow(data[currentIndex.value]);
|
||||
}
|
||||
break;
|
||||
case 'Enter': // 回车键
|
||||
// const currentRow = adviceBaseRef.value.getSelectionRows();
|
||||
event.preventDefault();
|
||||
if (currentSelectRow.value) {
|
||||
// 这里可以触发自定义逻辑,如弹窗、跳转等
|
||||
emit('selectAdviceBase', currentSelectRow.value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
// 设置选中行(带滚动)
|
||||
const setCurrentRow = (row) => {
|
||||
adviceBaseRef.value.setCurrentRow(row);
|
||||
// 滚动到选中行
|
||||
const tableBody = adviceBaseRef.value.$el.querySelector('.el-table__body-wrapper');
|
||||
const currentRowEl = adviceBaseRef.value.$el.querySelector('.current-row');
|
||||
if (tableBody && currentRowEl) {
|
||||
currentRowEl.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
||||
}
|
||||
};
|
||||
|
||||
// 当前行变化时更新索引
|
||||
const handleCurrentChange = (currentRow) => {
|
||||
currentIndex.value = adviceBaseList.value.findIndex((item) => item === currentRow);
|
||||
currentSelectRow.value = currentRow;
|
||||
};
|
||||
|
||||
function clickRow(row) {
|
||||
emit('selectAdviceBase', row);
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
handleKeyDown,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.popover-table-wrapper:focus {
|
||||
outline: 2px solid #409eff; /* 聚焦时的高亮效果 */
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,69 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getOrderGroup(queryParams) {
|
||||
return request({
|
||||
url: '/personalization/order-group/order-group',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
export function saveOrderGroup(data) {
|
||||
return request({
|
||||
url: '/personalization/order-group/order-group',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getAdviceBaseInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/advice-base-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取科室列表
|
||||
*/
|
||||
export function getOrgTree() {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 添加组套获取科室列表
|
||||
*/
|
||||
export function getDepartmentList() {
|
||||
return request({
|
||||
url: '/app-common/department-list',
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 添加组套获取使用人列表
|
||||
*/
|
||||
export function getUserPractitionerPCage(params) {
|
||||
return request({
|
||||
url: '/base-data-manage/practitioner/user-practitioner-page',
|
||||
method: 'get',
|
||||
params:params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除组套
|
||||
*/
|
||||
export function deleteOrderGroup(params) {
|
||||
return request({
|
||||
url: '/personalization/order-group/order-group',
|
||||
method: 'delete',
|
||||
params:params
|
||||
})
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,361 @@
|
||||
<template>
|
||||
<div class="main-content">
|
||||
<!-- 中间组套列表 -->
|
||||
<div class="section-card-left">
|
||||
<div class="section-header">
|
||||
<div class="actions">
|
||||
<span class="descriptions-item-label">组套名称:</span>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入组套名称"
|
||||
clearable
|
||||
class="search-input"
|
||||
@keydown.enter="getOrderGroupList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getOrderGroupList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<span class="descriptions-item-label">使用范围:</span>
|
||||
<el-select
|
||||
v-model="queryParams.rangeCode"
|
||||
placeholder="请选择使用范围"
|
||||
prefix-icon="el-icon-search"
|
||||
clearable
|
||||
@change="getOrderGroupList"
|
||||
class="search-input"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in use_range"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="orderGroupList"
|
||||
highlight-current-row
|
||||
@current-change="handleTemplateSelect"
|
||||
style="width: 100%"
|
||||
v-loading="templateLoading"
|
||||
border
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||
<el-table-column prop="name" label="组套名称" min-width="180" header-align="center" />
|
||||
<el-table-column prop="rangeCode_dictText" label="使用范围" width="100" align="center" />
|
||||
<el-table-column prop="createdAt" label="创建时间" width="160" align="center">
|
||||
<template #default="{ row }">
|
||||
<!-- {{ formatDate(row.createdAt) }} -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100" fixed="right" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button type="text" @click="editTemplate(row)">编辑</el-button>
|
||||
<el-button type="text" @click="deleteTemplate(row.id)" style="color: #f56c6c">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- 右侧组套详情 -->
|
||||
<div draggable="true" class="section-card-right">
|
||||
<div class="template-detail">
|
||||
<!-- 基本信息卡片 -->
|
||||
<div class="info-card">
|
||||
<div class="card-header">
|
||||
<span>基本信息</span>
|
||||
<el-button type="primary" @click="addTemplate">新建组套</el-button>
|
||||
<el-button type="primary" @click="addTemplate">保存组套</el-button>
|
||||
</div>
|
||||
<el-form :model="currentTemplate" label-width="100px" class="info-form" :inline="true">
|
||||
<el-form-item label="组套名称">
|
||||
<el-input v-model="currentTemplate.name" ref="name" placeholder="请输入组套名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="组套类型">
|
||||
<el-select
|
||||
v-model="currentTemplate.typeEnum"
|
||||
placeholder="请选择组套类型"
|
||||
class="search-input"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeEnum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="使用范围">
|
||||
<el-select
|
||||
v-model="currentTemplate.rangeCode"
|
||||
placeholder="请选择使用范围"
|
||||
class="search-input"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in use_range"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="info-card">
|
||||
<div class="card-header">
|
||||
<span>项目列表</span>
|
||||
</div>
|
||||
<div style="padding: 10px 10px">
|
||||
<Prescriptionlist :comtination="comtination" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Prescriptionlist from './components/prescriptionlist.vue';
|
||||
import { getOrderGroup, deleteOrderGroup } from './components/api.js';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { use_range } = proxy.useDict('use_range');
|
||||
|
||||
const currentTemplate = ref({});
|
||||
// 查询参数
|
||||
const queryParams = ref({});
|
||||
// 组套列表
|
||||
const orderGroupList = ref([]);
|
||||
const typeEnum = ref([
|
||||
{
|
||||
value: '1',
|
||||
label: '医嘱组套',
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '诊疗组套',
|
||||
},
|
||||
]);
|
||||
const comtination = ref('');
|
||||
const templateLoading = ref(false);
|
||||
|
||||
getOrderGroupList();
|
||||
function getOrderGroupList() {
|
||||
getOrderGroup(queryParams.value).then((res) => {
|
||||
orderGroupList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
// 处理组套选择
|
||||
const handleTemplateSelect = (row) => {
|
||||
currentTemplate.value = row;
|
||||
comtination.value = row;
|
||||
};
|
||||
|
||||
// 添加组套
|
||||
const addTemplate = () => {
|
||||
currentTemplate.value = {};
|
||||
proxy.$refs.name.focus();
|
||||
};
|
||||
|
||||
// 编辑组套
|
||||
const editTemplate = () => {};
|
||||
|
||||
// 删除组套
|
||||
const deleteTemplate = (id) => {
|
||||
deleteOrderGroup({ id: id }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.main-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
padding: 30px;
|
||||
width: 100%;
|
||||
height: calc(100% - 80px);
|
||||
}
|
||||
|
||||
.section-card-left {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
|
||||
width: 35%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
padding: 10px;
|
||||
border: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.section-card-right {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
|
||||
width: 64%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 15px 10px;
|
||||
background: #f8fafc;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.search-area {
|
||||
padding: 10px 15px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
background: #f8fafc;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.template-detail {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
overflow-y: auto;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.info-card {
|
||||
background: #ffffff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||
border: 1px solid #ebeef5;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 12px 15px;
|
||||
background: #f8fafc;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
font-weight: 600;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.card-header i {
|
||||
margin-right: 10px;
|
||||
color: #409eff;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.card-header span {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.info-form {
|
||||
padding: 20px 15px 10px;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.custom-tree-node {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.custom-tree-node i {
|
||||
margin-right: 8px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.node-label {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.count-badge {
|
||||
background-color: #e6f7ff;
|
||||
color: #1890ff;
|
||||
border-radius: 10px;
|
||||
padding: 2px 8px;
|
||||
font-size: 14px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.tree-actions {
|
||||
visibility: hidden;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.el-tree-node__content:hover .tree-actions {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
:deep(.el-tree-node.is-current > .el-tree-node__content) {
|
||||
background-color: #ecf5ff;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
:deep(.el-tree-node__content) {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
:deep(.el-table) {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
:deep(.el-table__header) {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
:deep(.el-table__row) {
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
:deep(.el-table__row:hover) {
|
||||
background-color: #f5f7fa !important;
|
||||
}
|
||||
|
||||
.el-button--primary {
|
||||
background: linear-gradient(135deg, #409eff, #337ecc);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.el-button--primary:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.cost {
|
||||
font-weight: 600;
|
||||
color: #e53935;
|
||||
}
|
||||
|
||||
:deep(.el-tag) {
|
||||
border-radius: 12px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
:deep(.el-input__inner) {
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,60 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
export function addOrganization(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateOrganization(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteOrganization(orgIds) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization?orgIds=' + orgIds ,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
export function getOrgDetail(id) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization?orgId=' + id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function initOrgTypeOption() {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/init',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function disableOrg(id) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization-inactive?orgId=' + id,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
|
||||
export function enableOrg(id) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization-active?orgId=' + id,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
296
openhis-ui-vue3/src/views/basicmanage/organization/index.vue
Normal file
296
openhis-ui-vue3/src/views/basicmanage/organization/index.vue
Normal file
@@ -0,0 +1,296 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<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-tooltip
|
||||
:content="selectRowIds.length == 0 ? '至少选择一条数据' : ''"
|
||||
placement="top"
|
||||
:disabled="selectRowIds.length != 0"
|
||||
>
|
||||
<el-button
|
||||
type=""
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="selectRowIds.length == 0"
|
||||
@click="handleDelete"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="" plain icon="Download" @click="handleExport"> 导出 </el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="" plain icon="Refresh" @click="getPageList">刷新</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-table
|
||||
ref="orgTableRef"
|
||||
v-loading="loading"
|
||||
:data="organization"
|
||||
row-key="id"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="科室名称" align="left" prop="name" />
|
||||
<el-table-column label="科室类型" align="center" prop="typeEnum_dictText" />
|
||||
<el-table-column label="科室分类" align="center" prop="classEnum_dictText" />
|
||||
<el-table-column label="医保码" align="center" prop="ybNo" />
|
||||
<el-table-column label="医保名称" align="center" prop="ybName" />
|
||||
<el-table-column label="状态" align="center" prop="activeFlag_dictText" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handelEdit(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handleDisabled(scope.row.id)"
|
||||
v-if="scope.row.activeFlag == '1'"
|
||||
>停用</el-button
|
||||
>
|
||||
<el-button link type="primary" @click="handelEnable(scope.row.id)" v-else>启用</el-button>
|
||||
<el-button link type="primary" @click="handleAddInferior(scope.row)">
|
||||
添加下级
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="600px" @close="cancel" append-to-body>
|
||||
<el-form ref="orgRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="id" prop="id" v-show="false">
|
||||
<el-input v-model="form.id" placeholder="请输入科室编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="科室编号" prop="busNo" v-show="false">
|
||||
<el-input v-model="form.busNo" placeholder="请输入科室编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="科室名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入科室名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="医保码" prop="name">
|
||||
<el-input v-model="form.ybNo" placeholder="请输入医保码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="医保名称" prop="name">
|
||||
<el-input v-model="form.ybName" placeholder="请输入医保名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="科室类型" prop="typeEnum">
|
||||
<el-select
|
||||
v-model="form.typeEnum"
|
||||
placeholder="请选择科室类型"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in orgTypeOption"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室分类" prop="classEnum">
|
||||
<el-select
|
||||
v-model="form.classEnum"
|
||||
placeholder="请选择科室分类"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
:disabled="form.typeEnum != 2"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in classEnumOption"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-col>
|
||||
<el-form-item label="上级科室" prop="busNoParent">
|
||||
<el-tree-select
|
||||
clearable
|
||||
style="width: 100%"
|
||||
v-model="form.busNoParent"
|
||||
:data="organization"
|
||||
:props="{ value: 'busNo', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
check-strictly
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</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="Organization">
|
||||
import {
|
||||
getList,
|
||||
deleteOrganization,
|
||||
addOrganization,
|
||||
updateOrganization,
|
||||
disableOrg,
|
||||
initOrgTypeOption,
|
||||
enableOrg,
|
||||
} from './components/api';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const loading = ref(true);
|
||||
const organization = ref([]);
|
||||
const queryParams = ref({});
|
||||
const open = ref(false);
|
||||
const form = ref({
|
||||
id: undefined,
|
||||
busNo: undefined,
|
||||
name: undefined,
|
||||
typeEnum: undefined,
|
||||
busNoParent: undefined,
|
||||
});
|
||||
const orgTableRef = ref();
|
||||
const orgRef = ref();
|
||||
const orgTypeOption = ref([]);
|
||||
const classEnumOption = ref([]);
|
||||
const selectRowIds = ref([]);
|
||||
const total = ref(0);
|
||||
const title = ref('');
|
||||
const rules = ref({
|
||||
busNo: [{ required: false, message: '请输入科室编号', trigger: 'input' }],
|
||||
name: [
|
||||
{ required: true, message: '请输入科室名称', trigger: 'change' },
|
||||
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'change' },
|
||||
],
|
||||
typeEnum: [{ required: true, message: '请选择科室类型', trigger: 'change' }],
|
||||
});
|
||||
|
||||
getPageList();
|
||||
initOption();
|
||||
function initOption() {
|
||||
if (orgTypeOption.value.length == 0) {
|
||||
initOrgTypeOption().then((res) => {
|
||||
orgTypeOption.value = res.data.organizationTypeOptions;
|
||||
classEnumOption.value = res.data.organizationClassOptions;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function reset() {
|
||||
form.value.id = undefined;
|
||||
orgRef.value.resetFields();
|
||||
}
|
||||
|
||||
function getPageList() {
|
||||
loading.value = false;
|
||||
getList(queryParams.value).then((res) => {
|
||||
organization.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function handleAdd() {
|
||||
title.value = '添加药库药房';
|
||||
open.value = true;
|
||||
reset();
|
||||
console.log(form.value);
|
||||
}
|
||||
|
||||
function handelEdit(row) {
|
||||
console.log(row.busNo);
|
||||
|
||||
title.value = '编辑科室';
|
||||
open.value = true;
|
||||
setTimeout(() => {
|
||||
form.value.id = row.id;
|
||||
form.value.busNo = row.busNo;
|
||||
form.value.name = row.name;
|
||||
form.value.ybNo = row.ybNo;
|
||||
form.value.ybName = row.ybName;
|
||||
form.value.typeEnum = row.typeEnum;
|
||||
form.value.classEnum = row.classEnum;
|
||||
form.value.busNoParent = row.busNo.split('.').length > 1 ? row.busNo.split('.')[0] : undefined;
|
||||
}, 50);
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
console.log(form.value);
|
||||
}
|
||||
|
||||
// 新增/编辑
|
||||
function submitForm() {
|
||||
proxy.$refs['orgRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.id == undefined) {
|
||||
if (form.value.busNoParent) {
|
||||
form.value.busNo = form.value.busNoParent;
|
||||
}
|
||||
addOrganization(form.value).then((res) => {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
open.value = false;
|
||||
getPageList();
|
||||
});
|
||||
} else {
|
||||
updateOrganization(form.value).then((res) => {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
open.value = false;
|
||||
getPageList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 添加下级
|
||||
function handleAddInferior(row) {
|
||||
title.value = '添加下级';
|
||||
open.value = true;
|
||||
form.value.busNoParent = row.busNo;
|
||||
}
|
||||
|
||||
// 删除
|
||||
function handleDelete() {
|
||||
loading.value = true;
|
||||
deleteOrganization(selectRowIds.value.join(',')).then((res) => {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
loading.value = false;
|
||||
getPageList();
|
||||
});
|
||||
}
|
||||
// 停用
|
||||
function handleDisabled(id) {
|
||||
disableOrg(id).then((res) => {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
getPageList();
|
||||
});
|
||||
}
|
||||
|
||||
// 启用
|
||||
function handelEnable(id) {
|
||||
enableOrg(id).then((res) => {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
getPageList();
|
||||
});
|
||||
}
|
||||
|
||||
function handleSelectionChange() {
|
||||
selectRowIds.value = orgTableRef.value.getSelectionRows().map((item) => item.id);
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,62 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 初始化
|
||||
export function getPharmacyDepartmentList(query) {
|
||||
return request({
|
||||
url: '/base-data-manage/org-loc/org-loc',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询诊疗目录详细
|
||||
export function getPharmacyDepartmentOne(query) {
|
||||
return request({
|
||||
url: '/base-data-manage/org-loc/org-loc',
|
||||
method: 'get',
|
||||
params: query // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 新增
|
||||
export function addPharmacyDepartment(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/org-loc/org-loc',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function editPharmacyDepartment(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/org-loc/org-loc',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deletePharmacyDepartment(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/org-loc/org-loc?orgLocId=' + data.orgLocId,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 目录分类查询
|
||||
export function getDiseaseTreatmentInit(id) {
|
||||
return request({
|
||||
url: '/base-data-manage/org-loc/init/',
|
||||
method: 'get',
|
||||
params: { id } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 目录分类子查询
|
||||
export function getDiseaseTreatmentInitLoc(id) {
|
||||
return request({
|
||||
url: '/base-data-manage/org-loc/loc-list?locationForm=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,387 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--诊疗目录-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-title">取药科室</div>
|
||||
<div>
|
||||
<el-tree
|
||||
:data="pharmacyDepartmentOptions"
|
||||
:props="{ label: 'label', children: 'children' }"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="treeRef"
|
||||
node-key="id"
|
||||
check-strictly
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
<!--诊疗目录-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openAddPharmacyDepartment"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>添加新项目</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="diagnosisTreatmentList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<!-- <el-table-column type="selection" width="50" align="center" /> -->
|
||||
<el-table-column
|
||||
label="取药科室"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
<el-select
|
||||
v-model="scope.row.organizationId"
|
||||
placeholder="请选择"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in departmentOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="药品类别"
|
||||
align="center"
|
||||
key="pyStr"
|
||||
prop="pyStr"
|
||||
:show-overflow-tooltip="true"
|
||||
width="300"
|
||||
>
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: center">
|
||||
<el-select
|
||||
v-model="scope.row.distributionCategoryCode"
|
||||
placeholder="药品类别"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
:class="{ 'error-border': scope.row.error }"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in distribution_category_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="开始时间"
|
||||
align="center"
|
||||
key="wbStr"
|
||||
prop="wbStr"
|
||||
:show-overflow-tooltip="true"
|
||||
width="300"
|
||||
>
|
||||
<template #default="scope">
|
||||
<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>
|
||||
<el-table-column
|
||||
label="结束时间"
|
||||
align="center"
|
||||
key="categoryCode_dictText"
|
||||
prop="categoryCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="300"
|
||||
>
|
||||
<template #default="scope">
|
||||
<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 label="备注" align="center" key="typeEnum_enumText" prop="typeEnum_enumText"
|
||||
:show-overflow-tooltip="true" width="300">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.detailJson" placeholder="" />
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<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="openSavePharmacyDepartment(scope.row, scope.$index)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
:disabled="scope.row.id == ''"
|
||||
@click="deleteSelectedRows(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"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="pharmacyDepartment">
|
||||
import {
|
||||
getPharmacyDepartmentList,
|
||||
getDiseaseTreatmentInit,
|
||||
getPharmacyDepartmentOne,
|
||||
getDiseaseTreatmentInitLoc,
|
||||
addPharmacyDepartment,
|
||||
editPharmacyDepartment,
|
||||
deletePharmacyDepartment,
|
||||
} from './components/pharmacyDepartment';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { distribution_category_code } = proxy.useDict('distribution_category_code');
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
const diagnosisTreatmentList = ref([]);
|
||||
const loading = ref(false);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref('');
|
||||
const pharmacyDepartmentOptions = ref(undefined);
|
||||
const currentCategoryEnum = ref('');
|
||||
const departmentOptions = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
tableRules: {
|
||||
organizationId: [{ required: true, message: '取药科室不能为空', trigger: 'blur' }],
|
||||
distributionCategoryCode: [{ required: true, message: '药品类别不能为空', trigger: 'blur' }],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, tableRules } = toRefs(data);
|
||||
|
||||
/** 通过条件过滤节点 */
|
||||
const filterNode = (value, data) => {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
};
|
||||
|
||||
/** 目录分类查询 */
|
||||
function getDiseaseTreatmentList() {
|
||||
getDiseaseTreatmentInit().then((response) => {
|
||||
console.log(response, 'response诊疗目录分类查询下拉树结构');
|
||||
pharmacyDepartmentOptions.value = response.data.locationFormOptions;
|
||||
departmentOptions.value = response.data.departmentOptions;
|
||||
// 调用 getDiseaseInitLoc 并在 then 回调中赋值
|
||||
getDiseaseInitLoc(response.data.locationFormOptions[0].value).then((children) => {
|
||||
pharmacyDepartmentOptions.value[0].children = children;
|
||||
});
|
||||
|
||||
getDiseaseInitLoc(response.data.locationFormOptions[1].value).then((children) => {
|
||||
pharmacyDepartmentOptions.value[1].children = children;
|
||||
});
|
||||
|
||||
console.log(pharmacyDepartmentOptions.value);
|
||||
});
|
||||
}
|
||||
|
||||
function getDiseaseInitLoc(id) {
|
||||
return getDiseaseTreatmentInitLoc(id).then((response) => {
|
||||
return response.data.locationOptions;
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取绑定科室列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getPharmacyDepartmentList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
if (res.code === 200) {
|
||||
diagnosisTreatmentList.value =
|
||||
res.data.records.length > 0
|
||||
? res.data.records.map((res) => {
|
||||
return {
|
||||
...res,
|
||||
isEditing: false, // 标记当前行是否正在编辑
|
||||
error: false, // 新增 error 字段
|
||||
};
|
||||
})
|
||||
: [];
|
||||
}
|
||||
console.log(diagnosisTreatmentList.value, 'res.data');
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data, node) {
|
||||
// 检查节点是否有子节点
|
||||
if (node.data.children && node.data.children.length > 0) {
|
||||
proxy.$message.warning('不能选择父节点');
|
||||
return;
|
||||
}
|
||||
queryParams.value.defLocationId = data.value;
|
||||
currentCategoryEnum.value = data.value;
|
||||
handleQuery();
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
console.log(queryParams, 'queryParams搜索');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
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;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
function openAddPharmacyDepartment() {
|
||||
if (data.isAdding) {
|
||||
proxy.$message.warning('请先保存当前行后再新增!');
|
||||
return;
|
||||
}
|
||||
const newRow = {
|
||||
id: '',
|
||||
organizationId: '',
|
||||
defLocationId: '',
|
||||
distributionCategoryCode: '',
|
||||
startTime: '00:00:00',
|
||||
endTime: '23:59:59',
|
||||
isEditing: true, // 标记当前行是否正在编辑
|
||||
error: false, // 新增 error 字段
|
||||
};
|
||||
diagnosisTreatmentList.value.push(newRow);
|
||||
total.value = diagnosisTreatmentList.value.length;
|
||||
data.isAdding = true; // 设置标志位为 true,表示有未保存的
|
||||
}
|
||||
|
||||
function handleBlur(row, index) {
|
||||
console.log(row);
|
||||
let hasError = false;
|
||||
const fields = ['organizationId', 'distributionCategoryCode'];
|
||||
|
||||
fields.forEach((field) => {
|
||||
if (!row[field]) {
|
||||
hasError = true;
|
||||
console.log(tableRules.value[field]);
|
||||
proxy.$message.error(tableRules.value[field][0].message);
|
||||
}
|
||||
});
|
||||
|
||||
console.log(hasError);
|
||||
|
||||
row.error = hasError;
|
||||
}
|
||||
|
||||
function openSavePharmacyDepartment(row) {
|
||||
console.log(row, 'row');
|
||||
let params = { ...row };
|
||||
let hasError = false;
|
||||
// this.purchaseinventoryList.forEach((row) => {
|
||||
handleBlur(row);
|
||||
if (row.error) {
|
||||
hasError = true;
|
||||
}
|
||||
// });
|
||||
|
||||
if (hasError) {
|
||||
proxy.$message.error('请填写完整信息');
|
||||
return;
|
||||
}
|
||||
if (currentCategoryEnum.value) {
|
||||
params.defLocationId = currentCategoryEnum.value;
|
||||
}
|
||||
if (row.id) {
|
||||
editPharmacyDepartment(params).then((res) => {
|
||||
data.isAdding = false; // 允许新增下一行
|
||||
proxy.$message.success('保存成功!');
|
||||
console.log(res, 'res');
|
||||
});
|
||||
} else {
|
||||
delete params.id;
|
||||
addPharmacyDepartment(params).then((res) => {
|
||||
console.log(res, 'res');
|
||||
proxy.$message.success('保存成功!');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function deleteSelectedRows(row) {
|
||||
deletePharmacyDepartment({ orgLocId: row.id }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getDiseaseTreatmentList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
.error-border {
|
||||
border: 1px solid red;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询厂商列表
|
||||
export function getSupplierList(query) {
|
||||
return request({
|
||||
url: '/data-dictionary/supplier/get-supplier-list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询厂商详细
|
||||
export function getSupplierOne(id) {
|
||||
return request({
|
||||
url: '/data-dictionary/supplier/get-supplier-detail',
|
||||
method: 'get',
|
||||
params: {id}
|
||||
})
|
||||
}
|
||||
|
||||
// 新增厂商
|
||||
export function addSupplier(data) {
|
||||
return request({
|
||||
url: '/data-dictionary/supplier/add-supplier',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改厂商
|
||||
export function editSupplier(data) {
|
||||
return request({
|
||||
url: '/data-dictionary/supplier/edit-supplier',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// // 删除厂商
|
||||
// export function delUser(userId) {
|
||||
// return request({
|
||||
// url: '/system/user/' + userId,
|
||||
// method: 'delete'
|
||||
// })
|
||||
// }
|
||||
|
||||
// 停用厂商
|
||||
export function stopSupplier(ids) {
|
||||
return request({
|
||||
url: '/data-dictionary/supplier/information-stop',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
// 启用厂商
|
||||
export function startSupplier(ids) {
|
||||
return request({
|
||||
url: '/data-dictionary/supplier/information-start',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
// 查询厂商类型
|
||||
export function getSupplierInit() {
|
||||
return request({
|
||||
url: '/data-dictionary/supplier/information-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门树结构
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
526
openhis-ui-vue3/src/views/basicmanage/supplier/index.vue
Normal file
526
openhis-ui-vue3/src/views/basicmanage/supplier/index.vue
Normal file
@@ -0,0 +1,526 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<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="typeEnum">
|
||||
<el-select
|
||||
v-model="queryParams.typeEnum"
|
||||
placeholder="生产商/供应商"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in supplierTypeOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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="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-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="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
>清空条件</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<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
|
||||
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="typeEnum_enumText"
|
||||
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="activeFlag_enumText"
|
||||
prop="activeFlag_enumText"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
label="机构"
|
||||
align="center"
|
||||
key="orgId_dictText"
|
||||
prop="orgId_dictText"
|
||||
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
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleView(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"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="600px" append-to-body>
|
||||
<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-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-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="拼音" prop="pyStr">
|
||||
<el-input v-model="form.pyStr" maxlength="11" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="五笔码" prop="wbStr">
|
||||
<el-input v-model="form.wbStr" maxlength="11" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="类型" prop="typeEnum">
|
||||
<!-- <el-input v-model="form.typeEnum" maxlength="11" /> -->
|
||||
<el-select
|
||||
v-model="form.typeEnum"
|
||||
placeholder="生产商/供应商"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in supplierTypeOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input v-model="form.address" maxlength="255" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人电话" prop="phone">
|
||||
<el-input v-model="form.phone" maxlength="11" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人邮箱" prop="email">
|
||||
<el-input v-model="form.email" maxlength="255" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动标识" prop="activeFlag">
|
||||
<el-checkbox v-model="form.activeFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</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-form-item> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer v-if="title != '查看'">
|
||||
<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="Supplier">
|
||||
import {
|
||||
getSupplierList,
|
||||
editSupplier,
|
||||
addSupplier,
|
||||
getSupplierOne,
|
||||
stopSupplier,
|
||||
startSupplier,
|
||||
getSupplierInit,
|
||||
deptTreeSelect,
|
||||
} 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 supplierList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const supplierTypeOptions = ref(undefined);
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
// const initPassword = ref(undefined);
|
||||
// const postOptions = ref([]);
|
||||
// const roleOptions = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
// busNo: undefined, // 编码
|
||||
typeEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
// sourceEnum: undefined, // 来源(包括 1:厂商/产地目录分类,2:自定义)
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
typeEnum: [{ required: true, message: "类型不能为空", trigger: "blur" }],
|
||||
// address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
|
||||
// phone: [{ required: true, message: "联系人电话不能为空", trigger: "blur" }],
|
||||
// email: [{ required: true, message: "联系人邮箱不能为空", trigger: "blur" },
|
||||
// { validator: validateEmail, trigger: 'blur' }
|
||||
// ],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 验证邮箱地址是否有效*/
|
||||
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");
|
||||
supplierTypeOptions.value = response.data.supplierTypeOptions;
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
console.log("查询部门下拉树结构");
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
deptOptions.value = response.data.records;
|
||||
console.log(deptOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询厂商/产地目录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// queryParams.value.statusEnum = +queryParams.value.statusEnum
|
||||
console.log(queryParams.value, "queryParams.value");
|
||||
getSupplierList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
console.log(res, "res", res.data.records);
|
||||
supplierList.value = res.data.records;
|
||||
console.log(supplierList.value, "supplierList.value");
|
||||
total.value = res.data.total;
|
||||
console.log(total.value, "total.value");
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data) {
|
||||
queryParams.value.sourceEnum = data.id;
|
||||
handleQuery();
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 启用按钮操作 */
|
||||
function handleStart(row) {
|
||||
const stardIds = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确定启用数据!")
|
||||
.then(function () {
|
||||
return startSupplier(stardIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("启用成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 停用按钮操作 */
|
||||
function handleClose(row) {
|
||||
const stopIds = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确认停用数据!")
|
||||
.then(function () {
|
||||
return stopSupplier(stopIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("停用成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// queryParams.value.pageNo = 1;
|
||||
// queryParams.value.searchKey = undefined;
|
||||
// queryParams.value.statusEnum = undefined;
|
||||
// queryParams.value.sourceEnum = undefined;
|
||||
// queryParams.value.busNo = undefined;
|
||||
// 清空查询条件
|
||||
proxy.resetForm("queryRef");
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
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;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
conditionCode: undefined,
|
||||
pyStr: undefined,
|
||||
status: undefined,
|
||||
statusEnum: undefined,
|
||||
};
|
||||
proxy.resetForm("supplierRef");
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "新增";
|
||||
}
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
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 = "厂商/产地编辑";
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["supplierRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
form.value.activeFlag == true ? (form.value.activeFlag = 1) : (form.value.activeFlag = 0); //是否为活性
|
||||
console.log(form.value, "*****************");
|
||||
if (form.value.id != undefined) {
|
||||
console.log(form.value, "editSupplier");
|
||||
editSupplier(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addSupplier(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 详细按钮操作 */
|
||||
function handleView(row) {
|
||||
reset();
|
||||
title.value = "查看";
|
||||
open.value = true;
|
||||
getSupplierOne(row.id).then((response) => {
|
||||
console.log(response, "responsebbbb", row.id);
|
||||
form.value = response.data;
|
||||
});
|
||||
}
|
||||
getsupplierTypeList();
|
||||
getList();
|
||||
getDeptTree();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
90
openhis-ui-vue3/src/views/basicmanage/ward/components/api.js
Normal file
90
openhis-ui-vue3/src/views/basicmanage/ward/components/api.js
Normal file
@@ -0,0 +1,90 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 收费患者列表
|
||||
*/
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/location-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取科室下拉列表
|
||||
*/
|
||||
export function getOrgList() {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/base-data-manage/location/init',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增病区/床位/病房
|
||||
*/
|
||||
export function addLocation(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/location',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑病区/床位/病房
|
||||
*/
|
||||
export function editLocation(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/location',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增病区/床位/病房
|
||||
*/
|
||||
export function deleteLocation(busNo) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/location?busNo=' + busNo,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 启用病区/床位/病房
|
||||
*/
|
||||
export function enableLocation(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/enable',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 停用病区/床位/病房
|
||||
*/
|
||||
export function unableLocation(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/deactivate',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
541
openhis-ui-vue3/src/views/basicmanage/ward/index.vue
Normal file
541
openhis-ui-vue3/src/views/basicmanage/ward/index.vue
Normal file
@@ -0,0 +1,541 @@
|
||||
<template>
|
||||
<div style="display: flex; justify-content: space-between; height: 90vh" class="app-container">
|
||||
<el-card style="width: 30%">
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">病区</span>
|
||||
</template>
|
||||
<div style="width: 100%">
|
||||
<el-button type="primary" @click="open = true" class="mb8"> 新增 </el-button>
|
||||
<el-button type="success" plain @click="handleEnableBatch('wardRef')" class="mb8">
|
||||
批量启用
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="handleUnableBatch('wardRef')" class="mb8">
|
||||
批量停用
|
||||
</el-button>
|
||||
<el-button style="float: right" @click="getWardList()" class="mb8" icon="refresh" />
|
||||
<el-table
|
||||
max-height="630"
|
||||
:data="wardList"
|
||||
@cell-click="(row) => clickRow(row, 10)"
|
||||
highlight-current-row
|
||||
ref="wardRef"
|
||||
>
|
||||
<el-table-column type="selection" :selectable="checkSelectable" width="55" />
|
||||
<el-table-column label="病区" align="center" prop="name" />
|
||||
<el-table-column label="病区号" align="center" prop="startTime">
|
||||
<template #default="scope">
|
||||
{{ getLastPartOfString(scope.row.busNo) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="statusEnum_enumText">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
:type="
|
||||
scope.row.statusEnum === 1 || scope.row.statusEnum === 6
|
||||
? 'success'
|
||||
: scope.row.statusEnum === 2
|
||||
? 'primary'
|
||||
: 'warning'
|
||||
"
|
||||
>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link @click.stop="handleEdit(scope.row)"> 编辑 </el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
:disabled="scope.row.statusEnum === 5"
|
||||
@click.stop="
|
||||
() => {
|
||||
handleUnable(scope.row, 10).then(() => {
|
||||
getWardList();
|
||||
});
|
||||
}
|
||||
"
|
||||
v-if="
|
||||
scope.row.statusEnum === 1 ||
|
||||
scope.row.statusEnum === 6 ||
|
||||
scope.row.statusEnum === 5
|
||||
"
|
||||
>
|
||||
停用
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
:disabled="scope.row.statusEnum === 5"
|
||||
@click.stop="
|
||||
() => {
|
||||
handleEnable(scope.row).then(() => {
|
||||
getWardList();
|
||||
});
|
||||
}
|
||||
"
|
||||
v-else-if="scope.row.statusEnum === 2"
|
||||
>
|
||||
启用
|
||||
</el-button>
|
||||
<el-button type="danger" link @click="handleDelete(scope.row)"> 删除 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
<div style="width: 69%; height: 100%; padding-bottom: 20px">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">病房</span>
|
||||
</template>
|
||||
<el-button type="success" plain @click="handleEnableBatch('hourseRef')">批量启用</el-button>
|
||||
<el-button type="primary" plain @click="handleUnableBatch('hourseRef')">批量停用</el-button>
|
||||
<el-table
|
||||
height="280"
|
||||
:data="houseList"
|
||||
@cell-click="(row) => clickRow(row, 8)"
|
||||
highlight-current-row
|
||||
v-loading="loading"
|
||||
ref="hourseRef"
|
||||
>
|
||||
<el-table-column type="selection" :selectable="checkSelectable" width="55" />
|
||||
<el-table-column label="病房" align="center" prop="name" />
|
||||
<el-table-column label="病房号" align="center" prop="busNo">
|
||||
<template #default="scope">
|
||||
{{ getLastPartOfString(scope.row.busNo) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="statusEnum_enumText">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
:type="
|
||||
scope.row.statusEnum === 1 || scope.row.statusEnum === 6
|
||||
? 'success'
|
||||
: scope.row.statusEnum === 2
|
||||
? 'primary'
|
||||
: 'warning'
|
||||
"
|
||||
>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link @click.stop="handleEdit(scope.row, 4)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
:disabled="scope.row.statusEnum === 5"
|
||||
@click.stop="
|
||||
() => {
|
||||
handleUnable(scope.row).then(() => {
|
||||
clickRow(houseRow, 10);
|
||||
});
|
||||
}
|
||||
"
|
||||
v-if="
|
||||
scope.row.statusEnum === 1 ||
|
||||
scope.row.statusEnum === 6 ||
|
||||
scope.row.statusEnum === 5
|
||||
"
|
||||
>
|
||||
停用
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
:disabled="scope.row.statusEnum === 5"
|
||||
@click.stop="
|
||||
() => {
|
||||
handleEnable(scope.row).then(() => {
|
||||
clickRow(houseRow, 10);
|
||||
});
|
||||
}
|
||||
"
|
||||
v-else-if="scope.row.statusEnum === 2"
|
||||
>
|
||||
启用
|
||||
</el-button>
|
||||
<el-button type="danger" link @click="handleDelete(scope.row)"> 删除 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">床位</span>
|
||||
</template>
|
||||
<el-button type="success" plain @click="handleEnableBatch('bedRef')">批量启用</el-button>
|
||||
<el-button type="primary" plain @click="handleUnableBatch('bedRef')">批量停用</el-button>
|
||||
<el-table ref="bedRef" height="270" :data="bedList" v-loading="loading" width="">
|
||||
<el-table-column type="selection" :selectable="checkSelectable" width="55" />
|
||||
<el-table-column label="病床" align="center" prop="name" />
|
||||
<el-table-column label="病床号" align="center" prop="busNo">
|
||||
<template #default="scope">
|
||||
{{ getLastPartOfString(scope.row.busNo) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="statusEnum_enumText">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
:type="
|
||||
scope.row.statusEnum === 1 || scope.row.statusEnum === 6
|
||||
? 'success'
|
||||
: scope.row.statusEnum === 2
|
||||
? 'primary'
|
||||
: 'warning'
|
||||
"
|
||||
>{{ scope.row.statusEnum_enumText }}</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link @click.stop="handleEdit(scope.row, 10)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
:disabled="scope.row.statusEnum === 5"
|
||||
@click.stop="
|
||||
() => {
|
||||
handleUnable(scope.row, 10).then(() => {
|
||||
clickRow(bedRow, 8);
|
||||
});
|
||||
}
|
||||
"
|
||||
v-if="
|
||||
scope.row.statusEnum === 1 ||
|
||||
scope.row.statusEnum === 6 ||
|
||||
scope.row.statusEnum === 5
|
||||
"
|
||||
>
|
||||
停用
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
:disabled="scope.row.statusEnum === 5"
|
||||
@click.stop="
|
||||
() => {
|
||||
handleEnable(scope.row, 10).then(() => {
|
||||
clickRow(bedRow, 8);
|
||||
});
|
||||
}
|
||||
"
|
||||
v-else-if="scope.row.statusEnum === 2"
|
||||
>
|
||||
启用
|
||||
</el-button>
|
||||
<el-button type="danger" link @click="handleDelete(scope.row)"> 删除 </el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<el-dialog :title="title" v-model="open" width="600px" @close="cancel" append-to-body>
|
||||
<el-form ref="orgRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="id" prop="id" v-show="false">
|
||||
<el-input v-model="form.id" placeholder="请输入科室编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="科室编号" prop="busNo" v-show="false">
|
||||
<el-input v-model="form.busNo" placeholder="请输入科室编号" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="type + '分类'" prop="formEnum">
|
||||
<el-radio-group v-model="form.formEnum" @change="handleRadioChange" :disabled="isEdit">
|
||||
<el-radio :label="4">病区</el-radio>
|
||||
<el-radio :label="10">病房</el-radio>
|
||||
<el-radio :label="8">床位</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="type + '名称'" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入科室名称" />
|
||||
</el-form-item>
|
||||
<el-col>
|
||||
<el-form-item :label="upLabel" prop="busNoParent">
|
||||
<template v-if="form.formEnum == 4">
|
||||
<el-tree-select
|
||||
clearable
|
||||
style="width: 100%"
|
||||
v-model="form.busNoParent"
|
||||
filterable
|
||||
:data="organization"
|
||||
:props="{
|
||||
value: 'id',
|
||||
label: 'name',
|
||||
children: 'children',
|
||||
}"
|
||||
value-key="id"
|
||||
check-strictly
|
||||
placeholder="请选择上级科室/病区/床位"
|
||||
/>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-select
|
||||
v-model="form.busNoParent"
|
||||
placeholder="请选择上级科室/病区/床位"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in wardListOption"
|
||||
:key="item.busNo"
|
||||
:label="item.name"
|
||||
:value="item.busNo"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</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="Ward">
|
||||
import {
|
||||
getList,
|
||||
addLocation,
|
||||
getOrgList,
|
||||
deleteLocation,
|
||||
editLocation,
|
||||
unableLocation,
|
||||
enableLocation,
|
||||
} from './components/api';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
formEnum: 4,
|
||||
// locationFormList: [4],
|
||||
});
|
||||
const type = ref('病区');
|
||||
const wardList = ref([]);
|
||||
const bedList = ref([]);
|
||||
const houseList = ref([]);
|
||||
const wardListOption = ref([]);
|
||||
const organization = ref([]);
|
||||
const loading = ref(false);
|
||||
const isEdit = ref(false);
|
||||
const open = ref(false);
|
||||
const bedRow = ref({});
|
||||
const houseRow = ref({});
|
||||
const form = reactive({
|
||||
formEnum: 4,
|
||||
});
|
||||
const upLabel = ref('关联科室');
|
||||
const title = ref('新增');
|
||||
const rules = ref({
|
||||
name: [
|
||||
{ required: true, message: '请输入科室名称', trigger: 'blur' },
|
||||
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' },
|
||||
],
|
||||
busNoParent: [
|
||||
{
|
||||
required: form.formEnum != 4,
|
||||
message: '请选择上级' + type.value,
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
});
|
||||
/**
|
||||
* 病区列表
|
||||
*/
|
||||
function getWardList() {
|
||||
queryParams.value.formEnum = 4;
|
||||
getList(queryParams.value).then((res) => {
|
||||
wardList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
function init() {
|
||||
getOrgList().then((res) => {
|
||||
organization.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
function handleRadioChange(val) {
|
||||
if (val == 4) {
|
||||
type.value = '病区';
|
||||
upLabel.value = '关联科室';
|
||||
return;
|
||||
} else if (val == 10) {
|
||||
type.value = '病房';
|
||||
upLabel.value = '所属病区';
|
||||
queryParams.value.formEnum = 4;
|
||||
} else {
|
||||
type.value = '床位';
|
||||
upLabel.value = '所属病房';
|
||||
queryParams.value.formEnum = 10;
|
||||
}
|
||||
getList(queryParams.value).then((res) => {
|
||||
wardListOption.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击患者列表行 获取处方列表
|
||||
*/
|
||||
function clickRow(row, val) {
|
||||
loading.value = true;
|
||||
queryParams.value.formEnum = val;
|
||||
queryParams.value.busNo = row.busNo;
|
||||
bedList.value = [];
|
||||
getList(queryParams.value).then((res) => {
|
||||
if (val == 10) {
|
||||
houseList.value = res.data.records;
|
||||
houseRow.value = row;
|
||||
} else if (val == 8) {
|
||||
bedRow.value = row;
|
||||
bedList.value = res.data.records;
|
||||
}
|
||||
setTimeout(() => {
|
||||
queryParams.value.busNo = undefined;
|
||||
loading.value = false;
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
|
||||
function checkSelectable(row, index) {
|
||||
return row.statusEnum !== 5;
|
||||
}
|
||||
|
||||
function handleEnable(row) {
|
||||
return enableLocation([row.id]).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('启用成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleUnable(row) {
|
||||
return unableLocation([row.id]).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('停用成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleEnableBatch(tableRef) {
|
||||
let list = proxy.$refs[tableRef].getSelectionRows().map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
if (list.length == 0) {
|
||||
proxy.$modal.msgError('请选择要启用的数据');
|
||||
return;
|
||||
}
|
||||
enableLocation(list).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleUnableBatch(tableRef) {
|
||||
let list = proxy.$refs[tableRef].getSelectionRows().map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
if (list.length == 0) {
|
||||
proxy.$modal.msgError('请选择要停用的数据');
|
||||
return;
|
||||
}
|
||||
unableLocation(list).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function submitForm() {
|
||||
if (form.busNoParent) {
|
||||
if (form.formEnum == 4) {
|
||||
form.organizationId = form.busNoParent;
|
||||
} else {
|
||||
form.busNo = form.busNoParent;
|
||||
}
|
||||
}
|
||||
console.log(form);
|
||||
if (!isEdit.value) {
|
||||
addLocation(form).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
cancel();
|
||||
getWardList();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
editLocation(form).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
cancel();
|
||||
getWardList();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function handleDelete(row) {
|
||||
deleteLocation(row.busNo).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getLastPartOfString(str) {
|
||||
const parts = str.split('.');
|
||||
return parts.pop();
|
||||
}
|
||||
|
||||
function handleEdit(row, val) {
|
||||
form.id = row.id;
|
||||
form.name = row.name;
|
||||
form.formEnum = row.formEnum;
|
||||
form.busNo = row.busNo;
|
||||
if (row.organizationId) {
|
||||
form.busNoParent = row.organizationId;
|
||||
} else {
|
||||
form.busNoParent = row.busNo.split('.').slice(0, -1).join('.');
|
||||
}
|
||||
isEdit.value = true;
|
||||
title.value = '编辑';
|
||||
if (val) {
|
||||
queryParams.value.formEnum = val;
|
||||
getList(queryParams.value).then((res) => {
|
||||
wardListOption.value = res.data.records;
|
||||
});
|
||||
}
|
||||
open.value = true;
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
form.id = undefined;
|
||||
form.name = '';
|
||||
form.formEnum = 4;
|
||||
form.busNo = '';
|
||||
form.busNoParent = '';
|
||||
form.organizationId = '';
|
||||
isEdit.value = false;
|
||||
title.value = '新增';
|
||||
}
|
||||
|
||||
init();
|
||||
getWardList();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,66 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 新增
|
||||
export function addWarehouse(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/location',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询菜单列表
|
||||
export function getList(query) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/location-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/base-data-manage/location/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function updateWarehouse(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/location',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteWarehouse(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/location?locationId=' + data.locationId,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 启用病区/床位/病房
|
||||
*/
|
||||
export function enableLocation(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/enable',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 停用病区/床位/病房
|
||||
*/
|
||||
export function unableLocation(data) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/deactivate',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,323 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true">
|
||||
<el-form-item label="" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="仓库名称"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</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-tooltip
|
||||
:content="selectRowIds.length == 0 ? '至少选择一条数据' : ''"
|
||||
placement="top"
|
||||
:disabled="selectRowIds.length != 0"
|
||||
>
|
||||
<el-button
|
||||
type=""
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="selectRowIds.length == 0"
|
||||
@click="handleDelete"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-tooltip>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="" plain icon="Download" @click="handleExport">
|
||||
导出
|
||||
</el-button>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="" plain icon="Refresh" @click="getPageList">刷新</el-button>
|
||||
</el-col>
|
||||
<!-- <right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar> -->
|
||||
</el-row>
|
||||
<el-table
|
||||
ref="orgTableRef"
|
||||
v-loading="loading"
|
||||
:data="organization"
|
||||
row-key="id"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="仓库名称" align="left" prop="name" />
|
||||
<el-table-column label="仓库类型" align="center" prop="formEnum_enumText" />
|
||||
<!-- <el-table-column
|
||||
label="存放药品类型"
|
||||
align="center"
|
||||
prop="classEnum_dictText"
|
||||
/> -->
|
||||
<el-table-column label="是否使用" align="center" prop="operationalEnum_enumText" />
|
||||
<el-table-column label="停用状态" align="center" prop="statusEnum_enumText" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handelEdit(scope.row)">编辑</el-button>
|
||||
<!-- <el-button
|
||||
type="primary"
|
||||
link
|
||||
@click.stop="handleUnable(scope.row, 10)"
|
||||
v-if="scope.row.statusEnum === 1 || scope.row.statusEnum === 6"
|
||||
>
|
||||
停用
|
||||
</el-button>
|
||||
<el-button type="primary" link @click.stop="handleEnable(scope.row, 10)" v-else>
|
||||
启用
|
||||
</el-button> -->
|
||||
<el-button
|
||||
type="danger"
|
||||
link
|
||||
icon="Delete"
|
||||
:disabled="scope.row.busNo == ''"
|
||||
@click="handelDelete(scope.row)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="600px" @close="cancel" append-to-body>
|
||||
<el-form ref="orgRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="id" prop="busNo" v-show="false">
|
||||
<el-input v-model="form.id" placeholder="请输入科室编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="formEnum">
|
||||
<el-select
|
||||
v-model="form.formEnum"
|
||||
placeholder="请选择类型"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
:disabled="editShow"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in warehous_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Organization">
|
||||
import {
|
||||
getList,
|
||||
addWarehouse,
|
||||
updateWarehouse,
|
||||
deleteWarehouse,
|
||||
enableLocation,
|
||||
unableLocation,
|
||||
// disableOrg,
|
||||
init,
|
||||
// enableOrg,
|
||||
} from './components/api';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const loading = ref(true);
|
||||
const organization = ref([]);
|
||||
const queryParams = ref({
|
||||
locationFormList: [11, 16],
|
||||
});
|
||||
const open = ref(false);
|
||||
const form = ref({
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
formEnum: undefined,
|
||||
});
|
||||
const orgTableRef = ref();
|
||||
const orgRef = ref();
|
||||
const orgTypeOption = ref([]);
|
||||
const classEnumOption = ref([]);
|
||||
const selectRowIds = ref([]);
|
||||
const total = ref(0);
|
||||
const title = ref('');
|
||||
const editShow = ref(false);
|
||||
const { warehous_type } = proxy.useDict('warehous_type');
|
||||
const rules = ref({
|
||||
busNo: [{ required: false, message: '请输入科室编号', trigger: 'change' }],
|
||||
name: [
|
||||
{ required: true, message: '请输入仓库名称', trigger: 'change' },
|
||||
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'change' },
|
||||
],
|
||||
formEnum: [{ required: true, message: '请选择仓库类型', trigger: 'change' }],
|
||||
});
|
||||
|
||||
getPageList();
|
||||
initOption();
|
||||
function initOption() {
|
||||
if (orgTypeOption.value.length == 0) {
|
||||
init().then((res) => {
|
||||
orgTypeOption.value = res.data.organizationTypeOptions;
|
||||
classEnumOption.value = res.data.organizationClassOptions;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
formEnum: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getPageList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm('queryRef');
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
function handleEnable(row) {
|
||||
enableLocation([row.id]).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('启用成功');
|
||||
handleQuery();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleUnable(row) {
|
||||
unableLocation([row.id]).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('停用成功');
|
||||
handleQuery();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getPageList() {
|
||||
loading.value = true;
|
||||
getList(queryParams.value).then((res) => {
|
||||
organization.value = res.data.records.map((record) => {
|
||||
return {
|
||||
...record,
|
||||
formEnum: record.formEnum.toString(), // 确保 formEnum 是字符串
|
||||
};
|
||||
});
|
||||
total.value = res.data.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function handleAdd() {
|
||||
title.value = '添加药库药房';
|
||||
open.value = true;
|
||||
editShow.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
function handelEdit(row) {
|
||||
console.log(warehous_type);
|
||||
title.value = '编辑药库药房';
|
||||
open.value = true;
|
||||
editShow.value = true;
|
||||
setTimeout(() => {
|
||||
form.value.id = row.id;
|
||||
form.value.name = row.name;
|
||||
form.value.formEnum = row.formEnum.toString();
|
||||
}, 10);
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
console.log(form.value);
|
||||
}
|
||||
|
||||
// 新增/编辑
|
||||
function submitForm() {
|
||||
proxy.$refs['orgRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.busNoParent) {
|
||||
form.value.busNo = form.value.busNoParent;
|
||||
}
|
||||
if (form.value.id == undefined) {
|
||||
addWarehouse(form.value).then((res) => {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
open.value = false;
|
||||
getPageList();
|
||||
});
|
||||
} else {
|
||||
alert('456789');
|
||||
updateWarehouse(form.value).then((res) => {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
open.value = false;
|
||||
getPageList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 删除
|
||||
function handelDelete(data) {
|
||||
loading.value = true;
|
||||
deleteWarehouse({ locationId: data.id }).then((res) => {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
loading.value = false;
|
||||
getPageList();
|
||||
});
|
||||
}
|
||||
// // 停用
|
||||
// function handleDisabled(id) {
|
||||
// disableOrg(id).then((res) => {
|
||||
// proxy.$modal.msgSuccess("操作成功");
|
||||
// getPageList();
|
||||
// });
|
||||
// }
|
||||
|
||||
// // 启用
|
||||
// function handelEnable(id) {
|
||||
// enableOrg(id).then((res) => {
|
||||
// proxy.$modal.msgSuccess("操作成功");
|
||||
// getPageList();
|
||||
// });
|
||||
// }
|
||||
|
||||
function handleSelectionChange() {
|
||||
selectRowIds.value = orgTableRef.value.getSelectionRows().map((item) => item.id);
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,82 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询服务管理列表
|
||||
export function getRegistrationfeeList(query) {
|
||||
return request({
|
||||
url: '/basic-service/healthcare/healthcare-service-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询服务管理详细
|
||||
export function getRegistrationfeeOne(id) {
|
||||
return request({
|
||||
url: '/basic-service/healthcare/healthcare-service-detail',
|
||||
method: 'get',
|
||||
params: { id }
|
||||
})
|
||||
}
|
||||
|
||||
// 新增服务管理
|
||||
export function addRegistrationfee(data) {
|
||||
return request({
|
||||
url: '/basic-service/healthcare/healthcare-service',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改服务管理
|
||||
export function editRegistrationfee(data) {
|
||||
return request({
|
||||
url: '/basic-service/healthcare/healthcare-service',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询厂商类型
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/basic-service/healthcare/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门树形数据
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/location-page-tree',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 删除收费挂号项目
|
||||
export function delRegistrationfee(param) {
|
||||
return request({
|
||||
url: '/basic-service/healthcare/healthcare-service',
|
||||
method: 'delete',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
|
||||
// 获取诊疗项目下拉列表
|
||||
export function getInitOption(param) {
|
||||
return request({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-page',
|
||||
method: 'get',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,769 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<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="appointmentRequiredFlag" label-width="120px">
|
||||
<el-select
|
||||
v-model="queryParams.appointmentRequiredFlag"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in appointmentRequiredFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动标记:" prop="activeFlag">
|
||||
<el-select v-model="queryParams.activeFlag" placeholder="" clearable style="width: 240px">
|
||||
<el-option
|
||||
v-for="dict in activeFlagOptions"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</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="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
|
||||
>删除</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="warning" plain icon="CircleClose" @click="handleClear">清空条件</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="registrationfeeList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="服务名称" align="center" key="name" prop="name" />
|
||||
<el-table-column
|
||||
label="活动标记"
|
||||
align="center"
|
||||
key="activeFlag_enumText"
|
||||
prop="activeFlag_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="提供部门"
|
||||
align="center"
|
||||
key="offeredOrgId_dictText"
|
||||
prop="offeredOrgId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="服务分类"
|
||||
align="center"
|
||||
key="categoryCode_dictText"
|
||||
prop="categoryCode_dictText"
|
||||
: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="specialtyCode_dictText"
|
||||
prop="specialtyCode_dictText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="地点"
|
||||
align="center"
|
||||
key="locationId_dictText"
|
||||
prop="locationId_dictText"
|
||||
/>
|
||||
<el-table-column label="说明" align="center" key="comment" prop="comment" />
|
||||
<el-table-column label="额外细节" align="center" key="extraDetails" prop="extraDetails" />
|
||||
<el-table-column label="联系方式" align="center" key="contact" prop="contact" width="120" />
|
||||
<el-table-column
|
||||
label="预约要求"
|
||||
align="center"
|
||||
key="appointmentRequiredFlag_enumText"
|
||||
prop="appointmentRequiredFlag_enumText"
|
||||
/>
|
||||
<el-table-column label="名称" align="center" key="chargeName" prop="chargeName" />
|
||||
<el-table-column label="基础价格" align="center" key="price" prop="price" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="140"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<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>
|
||||
</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="800px" append-to-body>
|
||||
<el-form :model="form" :rules="rules" ref="registrationfeeRef" label-width="100px">
|
||||
<div class="title">服务管理</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="诊疗项目" prop="name">
|
||||
<el-select
|
||||
v-model="form.name"
|
||||
placeholder="请选择诊疗项目"
|
||||
:disabled="form.id != undefined"
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in definitionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
@click="
|
||||
() => {
|
||||
form.ybNo = item.ybNo;
|
||||
form.price = item.retailPrice;
|
||||
}
|
||||
"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="服务分类" prop="categoryCode">
|
||||
<el-select v-model="form.categoryCode" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in category_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="服务类型" prop="fwTypeCode">
|
||||
<el-select v-model="form.fwTypeCode" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in service_type_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="服务专业" prop="specialtyCode">
|
||||
<el-select v-model="form.specialtyCode" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in specialty_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="地点" prop="locationId">
|
||||
<el-tree-select
|
||||
v-model="form.locationId"
|
||||
:data="locationOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择地点"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="科室" prop="offeredOrgId">
|
||||
<el-tree-select
|
||||
v-model="form.offeredOrgId"
|
||||
:data="deptOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择提供部门"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="活动标记" prop="activeFlag">
|
||||
<el-select v-model="form.activeFlag" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="item in activeFlagOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="预约要求" prop="appointmentRequiredFlag">
|
||||
<el-select v-model="form.appointmentRequiredFlag" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="item in appointmentRequiredFlagOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="额外细节" prop="extraDetails;">
|
||||
<el-input v-model="form.extraDetails" maxlength="11" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="联系方式" prop="contact">
|
||||
<el-input v-model="form.contact" maxlength="11" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="服务说明" prop="comment">
|
||||
<el-input
|
||||
v-model="form.comment"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="title">费用管理</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="名称" prop="chargeName;">
|
||||
<el-input v-model="form.chargeName" :disabled="form.id != undefined" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="基础价格" prop="price">
|
||||
<el-input v-model="form.price" :disabled="form.id != undefined" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保编码" prop="price">
|
||||
<el-input v-model="form.ybNo" :disabled="form.id != undefined" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="form.id == undefined">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收费项目标题" prop="title">
|
||||
<el-input v-model="form.title" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保类别" prop="ybType">
|
||||
<el-select
|
||||
v-model="form.ybType"
|
||||
placeholder="医保类别"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_chrgitm_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="财务类型" prop="cwTypeCode">
|
||||
<el-select v-model="form.cwTypeCode" placeholder="请选择" clearable disabled>
|
||||
<el-option
|
||||
v-for="dict in fin_type_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24" v-if="form.id == undefined">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="收费说明" prop="description">
|
||||
<el-input
|
||||
v-model="form.description"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer v-if="title != '查看'">
|
||||
<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="Registrationfee">
|
||||
import {
|
||||
getRegistrationfeeList,
|
||||
editRegistrationfee,
|
||||
addRegistrationfee,
|
||||
getRegistrationfeeOne,
|
||||
getInit,
|
||||
deptTreeSelect,
|
||||
locationTreeSelect,
|
||||
delRegistrationfee,
|
||||
getInitOption,
|
||||
} from './components/registrationfee';
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const registrationfeeRef = ref(null); // 初始化 ref
|
||||
const {
|
||||
adm_location,
|
||||
category_code,
|
||||
service_type_code,
|
||||
specialty_code,
|
||||
med_chrgitm_type,
|
||||
fin_type_code,
|
||||
yb_type,
|
||||
} = proxy.useDict(
|
||||
'adm_location',
|
||||
'category_code',
|
||||
'service_type_code',
|
||||
'specialty_code',
|
||||
'med_chrgitm_type',
|
||||
'fin_type_code',
|
||||
'yb_type'
|
||||
);
|
||||
|
||||
const registrationfeeList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const definitionList = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref('');
|
||||
const activeFlagOptions = ref(undefined);
|
||||
const appointmentRequiredFlagOptions = ref(undefined);
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
const locationOptions = ref(undefined); // 地点树选项
|
||||
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 供应商名称
|
||||
busNo: undefined, // 编码
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
sourceEnum: undefined, // 来源(包括 1:厂商/产地目录分类,2:自定义)
|
||||
},
|
||||
rules: {
|
||||
offeredOrgId: [{ required: true, message: '提供部门不能为空', trigger: 'blur' }],
|
||||
categoryCode: [{ required: true, message: '服务分类不能为空', trigger: 'blur' }],
|
||||
fwTypeCode: [{ required: true, message: '服务类型不能为空', trigger: 'blur' }],
|
||||
specialtyCode: [{ required: true, message: '服务专业不能为空', trigger: 'blur' }],
|
||||
// locationId: [{ required: true, message: "地点不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: '服务名称不能为空', trigger: 'blur' }],
|
||||
contact: [{ required: true, message: '联系人电话不能为空', trigger: 'blur' }],
|
||||
appointmentRequiredFlag: [{ required: true, message: '预约要求不能为空', trigger: 'blur' }],
|
||||
activeFlag: [{ required: true, message: '活动标识不能为空', trigger: 'blur' }],
|
||||
chargeName: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
description: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||
cwTypeCode: [{ required: true, message: '财务类别不能为空', trigger: 'blur' }],
|
||||
ybType: [{ required: true, message: '医保类别不能为空', trigger: 'blur' }],
|
||||
ybNo: [{ required: true, message: '医保编码不能为空', trigger: 'blur' }],
|
||||
price: [{ required: true, message: '基础价格不能为空', trigger: 'blur' }],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function init() {
|
||||
getInitOption({ statusEnum: 2, pageSize: 1000, pageNo: 1 }).then((res) => {
|
||||
definitionList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
/** 挂号收费查询下拉树结构 */
|
||||
function getRegistrationfeeTypeList() {
|
||||
getInit().then((response) => {
|
||||
console.log(response, 'response');
|
||||
activeFlagOptions.value = response.data.activeFlagOptions; // 活动标记
|
||||
appointmentRequiredFlagOptions.value = response.data.appointmentRequiredFlagOptions; // 预约必填标记
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, 'response查询部门下拉树结构');
|
||||
|
||||
deptOptions.value = response.data.records;
|
||||
console.log(deptOptions.value, '部门下拉树结构');
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询地点下拉树结构 */
|
||||
function getLocationTree() {
|
||||
locationTreeSelect().then((response) => {
|
||||
console.log(response, 'response查询部门下拉树结构');
|
||||
locationOptions.value = response.data.records;
|
||||
console.log(locationOptions.value, '部门下拉树结构');
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询挂号收费项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// queryParams.value.statusEnum = +queryParams.value.statusEnum
|
||||
console.log(queryParams.value, 'queryParams.value');
|
||||
getRegistrationfeeList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
console.log(res, 'res');
|
||||
registrationfeeList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
console.log(total.value, 'total.value');
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
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;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
categoryCode: undefined,
|
||||
cwTypeCode: '1011',
|
||||
fwTypeCode: undefined,
|
||||
specialtyCode: undefined,
|
||||
// locationId: undefined,
|
||||
offeredOrgId: undefined,
|
||||
activeFlag: undefined,
|
||||
extraDetails: undefined,
|
||||
contact: undefined,
|
||||
appointmentRequiredFlag: undefined,
|
||||
chargeName: undefined,
|
||||
price: undefined,
|
||||
description: undefined,
|
||||
ybType: undefined,
|
||||
title: undefined,
|
||||
comment: undefined,
|
||||
};
|
||||
proxy.resetForm('registrationfeeRef');
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
form.value.fwTypeCode = form.value.typeCode;
|
||||
form.value.cwTypeCode = '1011';
|
||||
title.value = '新增';
|
||||
}
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
form.value = JSON.parse(JSON.stringify(row));
|
||||
form.value.fwTypeCode = form.value.typeCode;
|
||||
form.value.cwTypeCode = '1011';
|
||||
open.value = true;
|
||||
title.value = '编辑';
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
if (form.value.id != undefined) {
|
||||
// 移除规则
|
||||
rules.value.chargeName = [];
|
||||
rules.value.description = [];
|
||||
rules.value.cwTypeCode = [];
|
||||
rules.value.ybType = [];
|
||||
rules.value.price = [];
|
||||
} else {
|
||||
// 恢复规则
|
||||
rules.value.cwTypeCode = [{ required: true, message: '财务类别不能为空', trigger: 'blur' }];
|
||||
rules.value.ybType = [{ required: true, message: '医保类别不能为空', trigger: 'blur' }];
|
||||
rules.value.price = [{ required: true, message: '基础价格不能为空', trigger: 'blur' }];
|
||||
|
||||
rules.value.chargeName = [{ required: true, message: '名称不能为空', trigger: 'blur' }];
|
||||
rules.value.description = [{ required: true, message: '描述不能为空', trigger: 'blur' }];
|
||||
}
|
||||
|
||||
// const nameData = name || chargeName;
|
||||
// 服务名称
|
||||
form.value.name = getName();
|
||||
// 收费名称
|
||||
form.value.chargeName = getName();
|
||||
proxy.$refs['registrationfeeRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.id != undefined) {
|
||||
// 调用转换函数
|
||||
const transformFormEditParam = transformFormEditData(form);
|
||||
console.log(transformFormEditData, 'transformFormEditData');
|
||||
console.log(form.value, 'editRegistrationfee', form.value.statusEnum);
|
||||
editRegistrationfee(transformFormEditParam).then((response) => {
|
||||
proxy.$modal.msgSuccess('修改成功');
|
||||
open.value = false;
|
||||
reset();
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
// 调用转换函数
|
||||
const transformedData = transformFormData(form);
|
||||
console.log(transformedData, 'transformedData');
|
||||
addRegistrationfee(transformedData).then((response) => {
|
||||
reset();
|
||||
proxy.$modal.msgSuccess('新增成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 获取完整地址字符串
|
||||
function getName() {
|
||||
console.log(service_type_code.value, 'service_type_code.value');
|
||||
// 服务类型
|
||||
const serviceTypeText = proxy.selectDictLabel(service_type_code.value, form.value.fwTypeCode);
|
||||
// 服务分类
|
||||
const categoryCodeText = proxy.selectDictLabel(category_code.value, form.value.categoryCode);
|
||||
// 服务专业
|
||||
const specialtyCodeText = proxy.selectDictLabel(specialty_code.value, form.value.specialtyCode);
|
||||
console.log(serviceTypeText, 'serviceTypeText', categoryCodeText, specialtyCodeText);
|
||||
const nameParts = [serviceTypeText, form.value.addressCity, categoryCodeText, specialtyCodeText];
|
||||
|
||||
// 使用 reduce 方法拼接地址,非空字段之间用 '-' 连接
|
||||
return nameParts.reduce((acc, part) => {
|
||||
if (part) {
|
||||
if (acc) {
|
||||
acc += ' - '; // 在非空字段之间添加 '-'
|
||||
}
|
||||
acc += part;
|
||||
}
|
||||
return acc;
|
||||
}, '');
|
||||
}
|
||||
/** 详细按钮操作 */
|
||||
function handleView(row) {
|
||||
reset();
|
||||
title.value = '查看';
|
||||
open.value = true;
|
||||
getRegistrationfeeOne(row.id).then((response) => {
|
||||
console.log(response, 'responsebbbb', row.id);
|
||||
form.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const delId = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除以上数据?')
|
||||
.then(function () {
|
||||
return delRegistrationfee({ ids: delId.join(',') });
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess('删除成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
// 转换insert参数函数
|
||||
const transformFormData = (form) => {
|
||||
const {
|
||||
id,
|
||||
name,
|
||||
categoryCode,
|
||||
// typeCode,
|
||||
cwTypeCode,
|
||||
fwTypeCode,
|
||||
specialtyCode,
|
||||
// locationId,
|
||||
offeredOrgId,
|
||||
activeFlag,
|
||||
extraDetails,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
chargeName,
|
||||
price,
|
||||
description,
|
||||
ybType,
|
||||
title,
|
||||
comment,
|
||||
} = form.value;
|
||||
|
||||
return {
|
||||
healthcareServiceFormData: {
|
||||
id,
|
||||
activeFlag,
|
||||
offeredOrgId,
|
||||
categoryCode,
|
||||
typeCode: fwTypeCode,
|
||||
specialtyCode,
|
||||
// locationId,
|
||||
name,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
extraDetails,
|
||||
comment,
|
||||
},
|
||||
chargeItemDefinitionFormData: {
|
||||
id,
|
||||
chargeName,
|
||||
title,
|
||||
orgId: offeredOrgId,
|
||||
description,
|
||||
typeCode: cwTypeCode,
|
||||
ybType,
|
||||
price,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
// 转换insert参数函数
|
||||
const transformFormEditData = (form) => {
|
||||
const {
|
||||
id,
|
||||
name,
|
||||
categoryCode,
|
||||
// typeCode,
|
||||
cwTypeCode,
|
||||
fwTypeCode,
|
||||
specialtyCode,
|
||||
// locationId,
|
||||
offeredOrgId,
|
||||
activeFlag,
|
||||
extraDetails,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
chargeName,
|
||||
price,
|
||||
description,
|
||||
ybType,
|
||||
title,
|
||||
comment,
|
||||
} = form.value;
|
||||
|
||||
return {
|
||||
healthcareServiceFormData: {
|
||||
id,
|
||||
activeFlag,
|
||||
offeredOrgId,
|
||||
categoryCode,
|
||||
typeCode: fwTypeCode,
|
||||
specialtyCode,
|
||||
// locationId,
|
||||
name,
|
||||
contact,
|
||||
appointmentRequiredFlag,
|
||||
extraDetails,
|
||||
comment,
|
||||
},
|
||||
};
|
||||
};
|
||||
getRegistrationfeeTypeList();
|
||||
getDeptTree();
|
||||
getLocationTree();
|
||||
getList();
|
||||
init();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
101
openhis-ui-vue3/src/views/catalog/device/components/device.js
Normal file
101
openhis-ui-vue3/src/views/catalog/device/components/device.js
Normal file
@@ -0,0 +1,101 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询器材目录列表
|
||||
export function getDeviceList(query) {
|
||||
console.log(query,'aaaaa')
|
||||
return request({
|
||||
url: '/data-dictionary/device/information-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询器材目录详细
|
||||
export function getDeviceOne(id) {
|
||||
return request({
|
||||
url: '/data-dictionary/device/information-one',
|
||||
method: 'get',
|
||||
params: { id } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 新增器材目录
|
||||
export function addDevice(data) {
|
||||
return request({
|
||||
url: '/data-dictionary/device/information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改器材目录
|
||||
export function editDevice(data) {
|
||||
return request({
|
||||
url: '/data-dictionary/device/information',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// // 删除器材目录
|
||||
// export function delUser(userId) {
|
||||
// return request({
|
||||
// url: '/system/user/' + userId,
|
||||
// method: 'delete'
|
||||
// })
|
||||
// }
|
||||
|
||||
// 器材目录分类查询
|
||||
export function getDiseaseTreatmentInit() {
|
||||
return request({
|
||||
url: '/data-dictionary/device/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 停用病种目录
|
||||
export function stopDevice(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
url: '/data-dictionary/device/information-stop',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
// 启用病种目录
|
||||
export function startDevice(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
url: '/data-dictionary/device/information-start',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门树形数据
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/location-page-tree',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取医疗服务项目目录
|
||||
export function getYbDeviceList(queryParams) {
|
||||
return request({
|
||||
url: '/catalog/page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,634 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" v-model="visible" width="955px" append-to-body>
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="deviceDialogRef"
|
||||
label-width="110px"
|
||||
label-position="left"
|
||||
>
|
||||
<div class="title">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="handleImportYb()"
|
||||
size="small"
|
||||
style="margin-left: 5px; margin-top: -10px; margin-bottom: 20px"
|
||||
>从医保目录导入</el-button
|
||||
>
|
||||
</div>
|
||||
<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-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="器材名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入器材名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="器材分类" prop="categoryCode">
|
||||
<el-tree-select
|
||||
v-model="form.categoryCode"
|
||||
:data="deviceCategories"
|
||||
:props="{ value: 'value', label: 'info', children: 'children' }"
|
||||
:disabled="false"
|
||||
value-key="value"
|
||||
placeholder=""
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="器材种类" prop="typeCode">
|
||||
<el-select v-model="form.typeCode" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in device_type_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<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-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地点" prop="locationId">
|
||||
<el-tree-select
|
||||
v-model="form.locationId"
|
||||
:data="locationOptions"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
placeholder="请选择地点"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="包装单位" prop="unitCode">
|
||||
<el-select
|
||||
v-model="form.unitCode"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
@change="handleUnitCodeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="销售单位" prop="salesUnitCode">
|
||||
<el-select v-model="form.salesUnitCode" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最小单位" prop="minUnitCode">
|
||||
<el-select v-model="form.minUnitCode" placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in unit_code"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
: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="size">
|
||||
<el-input v-model="form.size" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拆零比" prop="partPercent">
|
||||
<el-input v-model="form.partPercent" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="产品型号" prop="modelNumber">
|
||||
<el-input v-model="form.modelNumber" placeholder="" />
|
||||
</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-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保编码" prop="ybNo">
|
||||
<el-input v-model="form.ybNo" placeholder="" />
|
||||
</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-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="主要成分" prop="substanceText">
|
||||
<el-input v-model="form.substanceText" placeholder="" />
|
||||
</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-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-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-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-option
|
||||
v-for="supplier in supplierListOptions"
|
||||
:key="supplier.value"
|
||||
:label="supplier.label"
|
||||
:value="supplier.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="过敏标记" prop="allergenFlag">
|
||||
<el-checkbox v-model="form.allergenFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保标记" prop="ybFlag">
|
||||
<el-checkbox v-model="form.ybFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保对码标记" prop="ybMatchFlag">
|
||||
<el-checkbox v-model="form.ybMatchFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="高值器材标志" prop="hvcmFlag">
|
||||
<el-checkbox v-model="form.hvcmFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="财务类型" prop="itemTypeCode">
|
||||
<el-select v-model="form.itemTypeCode" clearable>
|
||||
<el-option
|
||||
v-for="category in fin_type_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保类别" prop="ybType">
|
||||
<el-select
|
||||
v-model="form.ybType"
|
||||
placeholder="医保类别"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_chrgitm_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="适用范围" prop="jurisdiction">
|
||||
<el-input v-model="form.jurisdiction" placeholder="" />
|
||||
</el-form-item>
|
||||
</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="false"
|
||||
@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-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最高零售价" prop="maximumRetailPrice">
|
||||
<el-input v-model="form.maximumRetailPrice" placeholder="" :disabled="false" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保等级" prop="chrgitmLv">
|
||||
<el-select
|
||||
v-model="form.chrgitmLv"
|
||||
placeholder="医保等级"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in chrgitm_lv"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="说明" prop="description">
|
||||
<el-input
|
||||
v-model="form.description"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer v-if="title != '查看'">
|
||||
<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="MedicineDialog">
|
||||
import { editDevice, addDevice, deptTreeSelect, locationTreeSelect } from './device';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { device_type_code, unit_code, fin_type_code, chrgitm_lv, med_chrgitm_type } = proxy.useDict(
|
||||
'device_type_code',
|
||||
'unit_code',
|
||||
'fin_type_code',
|
||||
'chrgitm_lv',
|
||||
'med_chrgitm_type'
|
||||
);
|
||||
|
||||
const title = ref('');
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
const locationOptions = ref(undefined); // 地点树选项
|
||||
const deviceCategories = ref([]); // 器材分类
|
||||
const statusFlagOptions = ref([]); // 状态标记
|
||||
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 props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
deviceCategories: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
statusFlagOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
currentCategoryEnum: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
supplierListOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
function handleImportYb() {
|
||||
emits('ybDialog');
|
||||
}
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
reset();
|
||||
title.value = '';
|
||||
title.value = props.title;
|
||||
deviceCategories.value = props.deviceCategories;
|
||||
statusFlagOptions.value = props.statusFlagOptions;
|
||||
form.value.categoryCode = props.currentCategoryEnum;
|
||||
supplierListOptions.value = props.supplierListOptions;
|
||||
form.value.partPercent = 1;
|
||||
form.value.itemTypeCode = '2005';
|
||||
form.value.ybType = '8';
|
||||
console.log(props, '22222', title.value, props.deviceCategories);
|
||||
getDeptTree();
|
||||
getLocationTree();
|
||||
visible.value = true;
|
||||
}
|
||||
//医保目录对照后,赋值
|
||||
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;
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询地点下拉树结构 */
|
||||
function getLocationTree() {
|
||||
locationTreeSelect({ formList: '11,16' }).then((response) => {
|
||||
console.log(response, 'response查询部门下拉树结构');
|
||||
locationOptions.value = response.data.records;
|
||||
});
|
||||
}
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
reset();
|
||||
title.value = '';
|
||||
title.value = props.title;
|
||||
form.value = props.item;
|
||||
form.value.chrgitmLv = form.value.chrgitmLv ? form.value.chrgitmLv.toString() : undefined;
|
||||
deviceCategories.value = props.deviceCategories;
|
||||
statusFlagOptions.value = props.statusFlagOptions;
|
||||
supplierListOptions.value = props.supplierListOptions;
|
||||
getDeptTree();
|
||||
getLocationTree();
|
||||
visible.value = true;
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
busNo: undefined, // 编码
|
||||
name: undefined, // 名称
|
||||
pyStr: undefined, // 拼音码
|
||||
wbStr: undefined, // 五笔码
|
||||
categoryCode: undefined, // 类别
|
||||
typeCode: undefined, // 类型编码
|
||||
unitCode: undefined, // 单位编码
|
||||
size: undefined, // 规格
|
||||
partPercent: undefined, // 占比
|
||||
minUnitCode: undefined, // 最小单位编码
|
||||
modelNumber: undefined, // 型号
|
||||
hvcmFlag: undefined, // 高值器材标志
|
||||
salesUnitCode: undefined, // 销售单位编码
|
||||
approvalNumber: undefined, // 批准文号
|
||||
ybFlag: undefined, // 医保标志
|
||||
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
|
||||
locationId: undefined, // 地点ID
|
||||
ybType: undefined, // 医保类型
|
||||
itemTypeCode: undefined, // 最小收费
|
||||
purchasePrice: undefined, // 购入价
|
||||
retailPrice: undefined, // 零售价
|
||||
maximumRetailPrice: undefined, // 最高零售价
|
||||
chrgitmLv: undefined, // 医保等级
|
||||
};
|
||||
proxy.resetForm('deviceDialogRef');
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs['deviceDialogRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
form.value.hvcmFlag ? (form.value.hvcmFlag = 1) : (form.value.hvcmFlag = 0);
|
||||
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) => {
|
||||
// 触发自定义事件,并传递数据给父组件
|
||||
emits('submit');
|
||||
proxy.$modal.msgSuccess('修改成功');
|
||||
visible.value = false;
|
||||
reset(); // 重置表单数据
|
||||
});
|
||||
} else {
|
||||
addDevice(form.value).then((response) => {
|
||||
// 触发自定义事件,并传递数据给父组件
|
||||
emits('submit');
|
||||
proxy.$modal.msgSuccess('新增成功');
|
||||
visible.value = false;
|
||||
reset(); // 重置表单数据
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 当用户选择包装单位时,销售单位和最小单位的值设置为与包装单位相同的值 */
|
||||
function handleUnitCodeChange(value) {
|
||||
form.value.salesUnitCode = value;
|
||||
form.value.minUnitCode = value;
|
||||
}
|
||||
|
||||
// 在这里可以根据购入价来更新零售价
|
||||
function updatePrices(value) {
|
||||
form.value.retailPrice = form.value.purchasePrice;
|
||||
form.value.maximumRetailPrice = form.value.purchasePrice;
|
||||
}
|
||||
function formatValue(str) {
|
||||
if (str === null || str === undefined || str === '' || str === 'null') {
|
||||
return undefined;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
visible.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
edit,
|
||||
setValue,
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
|
||||
/* 使用深度选择器 */
|
||||
.custom-label-spacing :deep(.el-form-item__label) {
|
||||
line-height: 1.2; /* 调整行间距 */
|
||||
margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-dialog
|
||||
title="医用耗材目录"
|
||||
v-model="visible"
|
||||
width="1500px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@close="cancel"
|
||||
>
|
||||
<div>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入耗材名"
|
||||
clearable
|
||||
style="width: 20%; margin-bottom: 10px"
|
||||
@keyup.enter="getList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getList" />
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-table v-loading="listLoading" border :data="list" highlight-current-row max-height="450">
|
||||
<el-table-column align="center" label="医保目录编码" prop="medicalCatalogCode" />
|
||||
<el-table-column align="center" label="耗材名称" prop="consumableName" />
|
||||
<el-table-column align="center" label="产品型号" prop="productModel">
|
||||
<template #default="scope">
|
||||
{{ formatStr(scope.row.drugCategoryName) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="耗材材质" prop="materialType" />
|
||||
<el-table-column align="center" label="规格" prop="specification" />
|
||||
<el-table-column align="center" label="生产厂家" prop="manufacturerName" />
|
||||
<el-table-column align="center" label="操作" width="80">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handlewAddDevice(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"
|
||||
/>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getYbDeviceList } from './device';
|
||||
|
||||
const emit = defineEmits(['selectDevice']);
|
||||
const visible = ref(false);
|
||||
const total = ref(0);
|
||||
const listLoading = ref(false);
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
//医用耗材目录
|
||||
catalogType: 1306,
|
||||
});
|
||||
const list = ref([]);
|
||||
getList();
|
||||
function getList() {
|
||||
listLoading.value = true;
|
||||
getYbDeviceList(queryParams.value).then((res) => {
|
||||
total.value = res.data.data.total;
|
||||
list.value = res.data.data.records;
|
||||
listLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function show() {
|
||||
getList();
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
function handlewAddDevice(row) {
|
||||
emit('selectDevice', row);
|
||||
cancel();
|
||||
}
|
||||
|
||||
function formatStr(str) {
|
||||
if (str === null || str === undefined || str === '' || str === 'null') {
|
||||
return '-';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-dialog__body .pagination-container .el-pagination) {
|
||||
padding-right: 20px !important;
|
||||
}
|
||||
</style>
|
||||
620
openhis-ui-vue3/src/views/catalog/device/index.vue
Normal file
620
openhis-ui-vue3/src/views/catalog/device/index.vue
Normal file
@@ -0,0 +1,620 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--器材目录-->
|
||||
<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"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
<!--器材目录-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<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-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-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-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-col>
|
||||
<el-col :span="1.5">
|
||||
<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-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="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
>导出Excel</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="deviceList"
|
||||
@selection-change="handleSelectionChange"
|
||||
width="90%"
|
||||
>
|
||||
<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"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ 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="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="manufacturerId"
|
||||
prop="manufacturerId"
|
||||
: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"
|
||||
>
|
||||
<template #default="scope">
|
||||
<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"
|
||||
/>
|
||||
</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);
|
||||
}
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Device">
|
||||
import {
|
||||
getDeviceList,
|
||||
stopDevice,
|
||||
startDevice,
|
||||
getDiseaseTreatmentInit,
|
||||
getDeviceOne,
|
||||
} from "./components/device";
|
||||
import deviceDialog from "./components/deviceDialog";
|
||||
import DeviceYbDialog from "./components/deviceYbDialog";
|
||||
import { nextTick } from "vue";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const deviceList = ref([]);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const deviceCategories = ref(undefined);
|
||||
const deviceCategorieList = ref(undefined);
|
||||
const statusFlagOptions = ref(undefined);
|
||||
const statusYBWeatherOptions = ref(undefined);
|
||||
const supplierListOptions = ref(undefined);
|
||||
// 使用 ref 定义当前器材数据
|
||||
const currentData = ref({});
|
||||
// 使用 ref 定义当前查看器材数据
|
||||
const viewData = ref({});
|
||||
const currentCategoryEnum = ref("");
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 品名/商品名/英文品名/编码/拼音
|
||||
typeEnum: undefined, // 类型(包括 1:中药,2:成药)
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
ybMatchFlag: undefined, // 是否医保匹配(包括 1:是,0:否)
|
||||
ruleId: undefined, // 执行科室
|
||||
categoryCode: undefined, // 目录分类
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 通过条件过滤节点 */
|
||||
const filterNode = (value, data) => {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
};
|
||||
|
||||
/** 器材目录分类查询下拉树结构 */
|
||||
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: "" });
|
||||
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;
|
||||
});
|
||||
}
|
||||
/** 查询器材目录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getDeviceList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
deviceList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
console.log(deviceList.value, "getList", total.value);
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data) {
|
||||
queryParams.value.categoryCode = data.value;
|
||||
currentCategoryEnum.value = data.value;
|
||||
handleQuery();
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 启用按钮操作 */
|
||||
function handleStart() {
|
||||
const stardIds = ids.value;
|
||||
// selectedData
|
||||
proxy.$modal
|
||||
.confirm("是否确定启用数据!")
|
||||
.then(function () {
|
||||
return startDevice(stardIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("启用成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 停用按钮操作 */
|
||||
function handleClose() {
|
||||
const stopIds = ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确认停用数据!")
|
||||
.then(function () {
|
||||
return stopDevice(stopIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("停用成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download(
|
||||
"system/user/export",
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`user_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
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;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 打开新增弹窗 */
|
||||
function openAddDevice() {
|
||||
// if (!currentCategoryEnum.value) {
|
||||
// return proxy.$modal.msgError("请选择器材目录分类");
|
||||
// }
|
||||
console.log("打开新增弹窗");
|
||||
title.value = "新增";
|
||||
nextTick(() => {
|
||||
proxy.$refs.deviceRef.show();
|
||||
});
|
||||
}
|
||||
/** 打开编辑弹窗 */
|
||||
function openEditDevice(row) {
|
||||
currentData.value = {};
|
||||
console.log("打开编辑弹窗");
|
||||
getDeviceOne(row.id).then((response) => {
|
||||
console.log(response, "currentDataform");
|
||||
currentData.value = response.data;
|
||||
if (currentData.value) {
|
||||
currentData.value.hvcmFlag == 1
|
||||
? (currentData.value.hvcmFlag = true)
|
||||
: (currentData.value.hvcmFlag = false);
|
||||
currentData.value.ybFlag == 1
|
||||
? (currentData.value.ybFlag = true)
|
||||
: (currentData.value.ybFlag = false);
|
||||
currentData.value.ybMatchFlag == 1
|
||||
? (currentData.value.ybMatchFlag = true)
|
||||
: (currentData.value.ybMatchFlag = false);
|
||||
currentData.value.allergenFlag == 1
|
||||
? (currentData.value.allergenFlag = true)
|
||||
: (currentData.value.allergenFlag = false);
|
||||
}
|
||||
title.value = "编辑";
|
||||
nextTick(() => {
|
||||
proxy.$refs["deviceRef"].edit();
|
||||
});
|
||||
getList();
|
||||
});
|
||||
}
|
||||
getDiseaseTreatmentList();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
.el-select{
|
||||
width: 150px!important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-dialog
|
||||
title="医疗服务项目目录"
|
||||
v-model="visible"
|
||||
width="1500px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@close="cancel"
|
||||
>
|
||||
<div>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入服务项目名"
|
||||
clearable
|
||||
style="width: 20%; margin-bottom: 10px"
|
||||
@keyup.enter="getList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getList" />
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-table v-loading="listLoading" border :data="list" highlight-current-row max-height="450">
|
||||
<el-table-column align="center" label="医保目录编码" prop="medicalCatalogCode" />
|
||||
<el-table-column align="center" label="医疗服务项目名称" prop="medicalServiceName" />
|
||||
<el-table-column align="center" label="服务项目类别" prop="serviceCategory">
|
||||
<template #default="scope">
|
||||
{{ formatStr(scope.row.drugCategoryName) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="诊疗项目说明" prop="medicalItemDesc" />
|
||||
<el-table-column align="center" label="计价单位" prop="billingUnit" />
|
||||
<el-table-column align="center" label="操作" width="80">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handlewAddDiadTre(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"
|
||||
/>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getYbDiagnosisTreatmentList } from './diagnosistreatment';
|
||||
|
||||
const emit = defineEmits(['selectDiagnosisTreatment']);
|
||||
const visible = ref(false);
|
||||
const total = ref(0);
|
||||
const listLoading = ref(false);
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
//医疗服务项目目录
|
||||
catalogType: 1305,
|
||||
});
|
||||
const list = ref([]);
|
||||
getList();
|
||||
function getList() {
|
||||
listLoading.value = true;
|
||||
getYbDiagnosisTreatmentList(queryParams.value).then((res) => {
|
||||
total.value = res.data.data.total;
|
||||
list.value = res.data.data.records;
|
||||
listLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function show() {
|
||||
getList();
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
function handlewAddDiadTre(row) {
|
||||
emit('selectDiagnosisTreatment', row);
|
||||
cancel();
|
||||
}
|
||||
|
||||
function formatStr(str) {
|
||||
if (str === null || str === undefined || str === '' || str === 'null') {
|
||||
return '-';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-dialog__body .pagination-container .el-pagination) {
|
||||
padding-right: 20px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,612 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" v-model="visible" width="800px" append-to-body>
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="diagnosisTreatmentRef"
|
||||
label-width="110px"
|
||||
label-position="left"
|
||||
>
|
||||
<div class="title">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="handleImportYb()"
|
||||
size="small"
|
||||
style="margin-left: 5px; margin-top: -10px; margin-bottom: 20px"
|
||||
>从医保目录导入</el-button
|
||||
>
|
||||
</div>
|
||||
<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-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<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
|
||||
filterable
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地点" prop="locationId">
|
||||
<el-tree-select
|
||||
v-model="form.locationId"
|
||||
:data="locationOptions"
|
||||
:props="{
|
||||
value: 'id',
|
||||
label: 'name',
|
||||
children: 'children',
|
||||
}"
|
||||
value-key="id"
|
||||
placeholder="请选择地点"
|
||||
check-strictly
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="目录分类" prop="categoryCode">
|
||||
<el-select v-model="form.categoryCode" clearable filterable :disabled="false">
|
||||
<el-option
|
||||
v-for="category in activity_category_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="业务类型" prop="typeEnum">
|
||||
<el-select v-model="form.typeEnum" placeholder="" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in typeEnumOptions"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</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">
|
||||
<el-form-item label="医保标记" prop="ybFlag">
|
||||
<el-checkbox v-model="form.ybFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保对码标记" prop="ybMatchFlag">
|
||||
<el-checkbox v-model="form.ybMatchFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保编码" prop="conditionCode">
|
||||
<el-input v-model="form.ybNo" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保类别" prop="ybType">
|
||||
<el-select
|
||||
v-model="form.ybType"
|
||||
placeholder="医保类别"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in med_chrgitm_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="身体部位" prop="bodySiteCode">
|
||||
<el-tree-select
|
||||
v-model="form.bodySiteCode"
|
||||
:data="bodyOptions"
|
||||
:props="{
|
||||
value: 'id',
|
||||
label: 'name',
|
||||
children: 'children',
|
||||
}"
|
||||
value-key="id"
|
||||
placeholder="请选择身体部位"
|
||||
check-strictly
|
||||
filterable
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所需标本" prop="specimenCode">
|
||||
<el-select v-model="form.specimenCode" clearable filterable>
|
||||
<el-option
|
||||
v-for="category in specimen_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保等级" prop="chrgitmLv">
|
||||
<el-select v-model="form.chrgitmLv" placeholder="" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in chrgitm_lv"
|
||||
: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="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>
|
||||
<el-option
|
||||
v-for="category in unit_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="财务类型" prop="itemTypeCode">
|
||||
<el-select v-model="form.itemTypeCode" clearable filterable>
|
||||
<el-option
|
||||
v-for="category in fin_type_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</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"
|
||||
/>
|
||||
</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-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="划价标记" prop="maximumRetailPrice">
|
||||
<el-checkbox
|
||||
v-model="form.pricing_flag"
|
||||
:true-value="1"
|
||||
:false-value="0"
|
||||
></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="treatment-items-section">
|
||||
<div v-for="(item, index) in treatmentItems" :key="index" class="form-row">
|
||||
<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"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="执行次数">
|
||||
<el-input-number
|
||||
v-model="item.childrenRequestNum"
|
||||
controls-position="right"
|
||||
:min="1"
|
||||
:max="999"
|
||||
/>
|
||||
</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" />
|
||||
<el-button
|
||||
@click="removeItem(index)"
|
||||
circle
|
||||
type="danger"
|
||||
size="small"
|
||||
plain
|
||||
icon="Minus"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="说明" prop="descriptionText">
|
||||
<el-input
|
||||
v-model="form.descriptionText"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer v-if="title != '查看'">
|
||||
<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="DiagnosisTreatmentDialog">
|
||||
import {
|
||||
getDiagnosisTreatmentList,
|
||||
editDiagnosisTreatment,
|
||||
addDiagnosisTreatment,
|
||||
deptTreeSelect,
|
||||
bodyTreeSelect,
|
||||
locationTreeSelect,
|
||||
} from './diagnosistreatment';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { unit_code, med_chrgitm_type, fin_type_code, activity_category_code, chrgitm_lv } =
|
||||
proxy.useDict(
|
||||
'unit_code',
|
||||
'med_chrgitm_type',
|
||||
'fin_type_code',
|
||||
'activity_category_code',
|
||||
'chrgitm_lv'
|
||||
);
|
||||
|
||||
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); // 地点树选项
|
||||
const diagnosisCategoryOptions = ref(undefined);
|
||||
const statusFlagOptions = ref(undefined);
|
||||
const exeOrganizations = ref(undefined);
|
||||
const typeEnumOptions = ref(undefined);
|
||||
const diagnosisTreatmentList = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
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 props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
currentCategoryEnum: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
diagnosisCategoryOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
statusFlagOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
exeOrganizations: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
typeEnumOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 表单数组,初始一条记录
|
||||
const treatmentItems = ref([{ adviceDefinitionId: '', childrenRequestNum: 1 }]);
|
||||
|
||||
// 添加表单项
|
||||
function addItem() {
|
||||
treatmentItems.value.push({ adviceDefinitionId: '', childrenRequestNum: 1 });
|
||||
}
|
||||
|
||||
// 删除表单项
|
||||
function removeItem(index) {
|
||||
if (treatmentItems.value.length > 1) {
|
||||
treatmentItems.value.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
function handleImportYb() {
|
||||
emits('ybDialog');
|
||||
}
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
reset();
|
||||
getLocationTree();
|
||||
getItemList();
|
||||
getBodyTree();
|
||||
getDeptTree();
|
||||
title.value = '';
|
||||
title.value = props.title;
|
||||
diagnosisCategoryOptions.value = props.diagnosisCategoryOptions;
|
||||
statusFlagOptions.value = props.statusFlagOptions;
|
||||
exeOrganizations.value = props.exeOrganizations;
|
||||
typeEnumOptions.value = props.typeEnumOptions;
|
||||
form.value.categoryCode = props.currentCategoryEnum;
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
function setValue(row) {
|
||||
form.value = {
|
||||
name: formatValue(row.medicalServiceName), //医疗服务项目名称
|
||||
ybNo: formatValue(row.medicalCatalogCode), // 医保编码
|
||||
categoryCode: props.currentCategoryEnum,
|
||||
// chrgitmLv: formatValue(
|
||||
// row.insuranceClass == '甲' ? '1' : row.insuranceClass == '乙' ? '2' : '3'
|
||||
// ), // 医保等级
|
||||
};
|
||||
}
|
||||
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
reset();
|
||||
getLocationTree();
|
||||
getItemList();
|
||||
getBodyTree();
|
||||
getDeptTree();
|
||||
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 }];
|
||||
form.value.permittedUnitCode = form.value.permittedUnitCode
|
||||
? form.value.permittedUnitCode.toString()
|
||||
: undefined;
|
||||
diagnosisCategoryOptions.value = props.diagnosisCategoryOptions;
|
||||
statusFlagOptions.value = props.statusFlagOptions;
|
||||
exeOrganizations.value = props.exeOrganizations;
|
||||
typeEnumOptions.value = props.typeEnumOptions;
|
||||
visible.value = true;
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
busNo: undefined, // 编码
|
||||
name: undefined, // 名称
|
||||
locationId: undefined, // 地点
|
||||
orgId: undefined, // 执行科室
|
||||
pyStr: undefined, // 拼音码
|
||||
wbStr: undefined, // 五笔码
|
||||
categoryCode: undefined, // 类别
|
||||
typeEnum: undefined, // 类型编码
|
||||
// statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
ybFlag: undefined, // 医保标记
|
||||
ybMatchFlag: undefined, // 医保对码标记
|
||||
ybNo: undefined, // 医保编码
|
||||
ybType: undefined, // 医保类型
|
||||
bodySiteCode: undefined, // 身体部位
|
||||
specimenCode: undefined, // 所需标本
|
||||
ruleId: undefined, // 执行科室
|
||||
permittedUnitCode: undefined, // 使用单位
|
||||
itemTypeCode: undefined, // 最小收费
|
||||
// purchasePrice: undefined, // 购入价
|
||||
retailPrice: undefined, // 零售价
|
||||
maximumRetailPrice: undefined, // 最高零售价
|
||||
descriptionText: undefined, // 说明
|
||||
chrgitmLv: undefined, //医保等级
|
||||
};
|
||||
treatmentItems.value = [{ adviceDefinitionId: '', childrenRequestNum: 1 }];
|
||||
proxy.resetForm('diagnosisTreatmentRef');
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
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.ruleId ? (form.value.ruleId = 1) : (form.value.ruleId = 0);
|
||||
form.value.childrenJson =
|
||||
treatmentItems.value.length > 0 && treatmentItems.value[0].adviceDefinitionId != ''
|
||||
? JSON.stringify(treatmentItems.value)
|
||||
: undefined;
|
||||
proxy.$refs['diagnosisTreatmentRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.id != undefined) {
|
||||
editDiagnosisTreatment(form.value).then((response) => {
|
||||
// 触发自定义事件,并传递数据给父组件
|
||||
emits('submit');
|
||||
proxy.$modal.msgSuccess('修改成功');
|
||||
visible.value = false;
|
||||
reset(); // 重置表单数据
|
||||
});
|
||||
} else {
|
||||
addDiagnosisTreatment(form.value).then((response) => {
|
||||
// 触发自定义事件,并传递数据给父组件
|
||||
emits('submit');
|
||||
proxy.$modal.msgSuccess('新增成功');
|
||||
visible.value = false;
|
||||
reset(); // 重置表单数据
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/** 查询部门下拉树结构 */
|
||||
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 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 updatePrices(value) {
|
||||
form.value.maximumRetailPrice = form.value.retailPrice;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
edit,
|
||||
setValue,
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
|
||||
/* 使用深度选择器 */
|
||||
.custom-label-spacing :deep(.el-form-item__label) {
|
||||
line-height: 1.2; /* 调整行间距 */
|
||||
margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,99 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询诊疗目录列表
|
||||
export function getDiagnosisTreatmentList(query) {
|
||||
return request({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询诊疗目录详细
|
||||
export function getDiagnosisTreatmentOne(id) {
|
||||
return request({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-one/',
|
||||
method: 'get',
|
||||
params: { id } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 新增诊疗目录
|
||||
export function addDiagnosisTreatment(data) {
|
||||
return request({
|
||||
url: '/data-dictionary/diagnosis-treatment/information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改诊疗目录
|
||||
export function editDiagnosisTreatment(data) {
|
||||
return request({
|
||||
url: '/data-dictionary/diagnosis-treatment/information',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 诊疗目录分类查询
|
||||
export function getDiseaseTreatmentInit() {
|
||||
return request({
|
||||
url: '/data-dictionary/diagnosis-treatment/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 停用诊疗目录
|
||||
export function stopDiseaseTreatment(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-stop',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
// 启用诊疗目录
|
||||
export function startDiseaseTreatment(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
url: '/data-dictionary/diagnosis-treatment/information-start',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门树形数据
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
// 查询身体部位树形数据
|
||||
export function bodyTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/body-structure/body',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/location-page-tree',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取医用耗材目录
|
||||
export function getYbDiagnosisTreatmentList(queryParams) {
|
||||
return request({
|
||||
url: '/catalog/page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
532
openhis-ui-vue3/src/views/catalog/diagnosistreatment/index.vue
Normal file
532
openhis-ui-vue3/src/views/catalog/diagnosistreatment/index.vue
Normal file
@@ -0,0 +1,532 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--诊疗目录-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-title">诊疗目录</div>
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
:data="diagnosisCategoryOptions"
|
||||
: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-row :gutter="24">
|
||||
<!-- <el-col :span="5"> -->
|
||||
<el-form-item label="项目名" prop="searchKey" label-width="55">
|
||||
<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="80">
|
||||
<el-select v-model="queryParams.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-col :span="5"> -->
|
||||
<el-form-item label="医保是否对码" prop="ybMatchFlag" label-width="120">
|
||||
<el-select v-model="queryParams.ybMatchFlag" placeholder="" clearable>
|
||||
<el-option
|
||||
v-for="item in statusWeatherOption"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</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
|
||||
v-for="item in typeEnumOptions"
|
||||
: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="openAddDiagnosisTreatment"
|
||||
>添加新项目</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<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-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="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:user:export']"
|
||||
>导出Excel</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="diagnosisTreatmentList"
|
||||
@selection-change="handleSelectionChange"
|
||||
width="90%"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
:show-overflow-tooltip="true"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
align="center"
|
||||
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"
|
||||
/>
|
||||
<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="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"
|
||||
key="retailPrice"
|
||||
prop="retailPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="说明"
|
||||
align="center"
|
||||
key="descriptionText"
|
||||
prop="descriptionText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="执行科室"
|
||||
align="center"
|
||||
key="ruleId"
|
||||
prop="ruleId"
|
||||
: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="openEditDiagnosisTreatment(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"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<diagnosis-treatment-dialog
|
||||
ref="diagnosisTreatmentRef"
|
||||
:currentCategoryEnum="currentCategoryEnum"
|
||||
:diagnosisCategoryOptions="diagnosisCategoryOptions"
|
||||
:statusFlagOptions="statusFlagOptions"
|
||||
:exeOrganizations="exeOrganizations"
|
||||
:typeEnumOptions="typeEnumOptions"
|
||||
:title="title"
|
||||
:item="currentData"
|
||||
@submit="getList()"
|
||||
@ybDialog="
|
||||
() => {
|
||||
proxy.$refs['diagTreYbRef'].show();
|
||||
}
|
||||
"
|
||||
/>
|
||||
<DiagTreYbDialog
|
||||
ref="diagTreYbRef"
|
||||
@selectDiagnosisTreatment="
|
||||
(row) => {
|
||||
proxy.$refs['diagnosisTreatmentRef'].setValue(row);
|
||||
}
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="DiagnosisTreatment">
|
||||
import {
|
||||
getDiagnosisTreatmentList,
|
||||
stopDiseaseTreatment,
|
||||
startDiseaseTreatment,
|
||||
getDiseaseTreatmentInit,
|
||||
getDiagnosisTreatmentOne,
|
||||
} from './components/diagnosistreatment';
|
||||
import diagnosisTreatmentDialog from './components/diagnosisTreatmentDialog';
|
||||
import DiagTreYbDialog from './components/diagTreYbDialog';
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const diagnosisTreatmentList = ref([]);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref('');
|
||||
const diagnosisCategoryOptions = ref(undefined);
|
||||
const statusFlagOptions = ref(undefined);
|
||||
const exeOrganizations = ref(undefined);
|
||||
const typeEnumOptions = ref(undefined);
|
||||
const statusWeatherOption = ref(undefined);
|
||||
// 使用 ref 定义当前诊疗数据
|
||||
const currentData = ref({});
|
||||
// 使用 ref 定义当前查看诊疗数据
|
||||
const viewData = ref({});
|
||||
const currentCategoryEnum = ref('');
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 品名/商品名/英文品名/编码/拼音
|
||||
typeEnum: undefined, // 类型(包括 1:中药,2:成药)
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
ybMatchFlag: undefined, // 是否医保匹配(包括 1:是,0:否)
|
||||
ruleId: undefined, // 执行科室
|
||||
categoryCode: undefined, // 目录分类
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 通过条件过滤节点 */
|
||||
const filterNode = (value, data) => {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
};
|
||||
|
||||
/** 诊断目录分类查询下拉树结构 */
|
||||
function getDiseaseTreatmentList() {
|
||||
getDiseaseTreatmentInit().then((response) => {
|
||||
console.log(response, 'response诊疗目录分类查询下拉树结构');
|
||||
diagnosisCategoryOptions.value = response.data.diagnosisCategoryOptions.sort((a, b) => {
|
||||
return parseInt(a.value) - parseInt(b.value);
|
||||
});
|
||||
diagnosisCategoryOptions.value.push({ info: '全部', value: '' });
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
exeOrganizations.value = response.data.exeOrganizations;
|
||||
typeEnumOptions.value = response.data.typeEnumOptions;
|
||||
statusWeatherOption.value = response.data.statusWeatherOption;
|
||||
});
|
||||
}
|
||||
/** 查询诊断目录列表 */
|
||||
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();
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
console.log(queryParams, 'queryParams搜索');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 启用按钮操作 */
|
||||
function handleStart() {
|
||||
const stardIds = ids.value;
|
||||
// selectedData
|
||||
proxy.$modal
|
||||
.confirm('是否确定启用数据!')
|
||||
.then(function () {
|
||||
return startDiseaseTreatment(stardIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess('启用成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 停用按钮操作 */
|
||||
function handleClose() {
|
||||
const stopIds = ids.value;
|
||||
proxy.$modal
|
||||
.confirm('是否确认停用数据!')
|
||||
.then(function () {
|
||||
return stopDiseaseTreatment(stopIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess('停用成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download(
|
||||
'system/user/export',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`user_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
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;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 打开新增弹窗 */
|
||||
function openAddDiagnosisTreatment() {
|
||||
// if (currentCategoryEnum.value) {
|
||||
console.log('打开新增弹窗');
|
||||
title.value = '新增';
|
||||
nextTick(() => {
|
||||
proxy.$refs.diagnosisTreatmentRef.show();
|
||||
});
|
||||
// } else {
|
||||
// proxy.$modal.msgError("请先选择目录分类!");
|
||||
// }
|
||||
}
|
||||
/** 打开编辑弹窗 */
|
||||
function openEditDiagnosisTreatment(row) {
|
||||
getDiagnosisTreatmentOne(row.id).then((response) => {
|
||||
console.log(response, 'response88888');
|
||||
|
||||
currentData.value = response.data;
|
||||
currentData.value.ybFlag == 1
|
||||
? (currentData.value.ybFlag = true)
|
||||
: (currentData.value.ybFlag = false);
|
||||
currentData.value.ybMatchFlag == 1
|
||||
? (currentData.value.ybMatchFlag = true)
|
||||
: (currentData.value.ybMatchFlag = false);
|
||||
title.value = '编辑';
|
||||
nextTick(() => {
|
||||
proxy.$refs['diagnosisTreatmentRef'].edit();
|
||||
});
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
getDiseaseTreatmentList();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
.el-select {
|
||||
width: 150px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询病种目录列表
|
||||
export function getDiseaseList(query) {
|
||||
return request({
|
||||
url: '/data-dictionary/disease/information-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询病种目录详细
|
||||
export function getDiseaseOne(id) {
|
||||
return request({
|
||||
url: '/data-dictionary/disease/information-one',
|
||||
method: 'get',
|
||||
params: { id } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 新增病种目录
|
||||
export function addDisease(data) {
|
||||
return request({
|
||||
url: '/data-dictionary/disease/information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改病种目录
|
||||
export function editDisease(data) {
|
||||
return request({
|
||||
url: '/data-dictionary/disease/information',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// // 删除病种目录
|
||||
// export function delUser(userId) {
|
||||
// return request({
|
||||
// url: '/system/user/' + userId,
|
||||
// method: 'delete'
|
||||
// })
|
||||
// }
|
||||
|
||||
// 病种目录分类查询
|
||||
export function getDiseaseCategory() {
|
||||
return request({
|
||||
url: '/data-dictionary/disease/information-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 停用病种目录
|
||||
export function stopDisease(ids) {
|
||||
return request({
|
||||
url: '/data-dictionary/disease/information-stop',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
// 启用病种目录
|
||||
export function startDisease(ids) {
|
||||
return request({
|
||||
url: '/data-dictionary/disease/information-start',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
507
openhis-ui-vue3/src/views/catalog/disease/index.vue
Normal file
507
openhis-ui-vue3/src/views/catalog/disease/index.vue
Normal file
@@ -0,0 +1,507 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--疾病目录数据-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-title">疾病目录</div>
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
:data="conditionDefinitionOptions"
|
||||
:props="{ label: 'info', children: 'children' }"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="deptTreeRef"
|
||||
node-key="value"
|
||||
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-item label="疾病:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="名称/ICD10编码/拼音助记码"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否停用" prop="statusEnum">
|
||||
<el-select v-model="queryParams.statusEnum" style="width: 240px" clearable>
|
||||
<el-option
|
||||
v-for="status in statusFlagOptions"
|
||||
:key="status.value"
|
||||
:label="status.info"
|
||||
:value="status.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="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-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="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:user:export']"
|
||||
>导出Excel</el-button
|
||||
>
|
||||
</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
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="600px" append-to-body>
|
||||
<el-form :model="form" :rules="rules" ref="diseaseRef" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder="请输入名称"
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="form.id != undefined">
|
||||
<el-form-item label="编码" prop="conditionCode">
|
||||
<el-input v-model="form.conditionCode" placeholder="请输入编码" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="疾病类型" prop="sourceEnum">
|
||||
<el-select
|
||||
v-model="form.sourceEnum"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
:disabled="form.sourceEnum != '' && form.sourceEnum != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in conditionDefinitionList"
|
||||
:key="dict.value"
|
||||
:label="dict.info"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="类型" prop="typeCode">
|
||||
<el-select v-model="form.typeCode" placeholder="请选择" 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-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<!-- <el-col :span="12">
|
||||
<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-col :span="12">
|
||||
<el-form-item label="医保编码" prop="ybNo">
|
||||
<el-input v-model="form.ybNo" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="医保标记" prop="ybFlag">
|
||||
<el-checkbox v-model="form.ybFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="医保对码" prop="ybMatchFlag">
|
||||
<el-checkbox v-model="form.ybMatchFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="说明" prop="description">
|
||||
<el-input
|
||||
v-model="form.description"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
placeholder=""
|
||||
/>
|
||||
</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="Disease">
|
||||
import {
|
||||
getDiseaseList,
|
||||
editDisease,
|
||||
addDisease,
|
||||
getDiseaseCategory,
|
||||
getDiseaseOne,
|
||||
stopDisease,
|
||||
startDisease,
|
||||
} from './components/disease';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { condition_type_code } = proxy.useDict('condition_type_code');
|
||||
|
||||
const diseaseList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref('');
|
||||
const conditionDefinitionOptions = ref(undefined);
|
||||
const conditionDefinitionList = ref(undefined);
|
||||
const conditionDefinition = ref(undefined);
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 疾病名称
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
sourceEnum: undefined, // 来源(包括 1:病种目录分类,2:自定义)
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||
//typeCode: [{ required: true, message: "类型不能为空", trigger: "blur" }],
|
||||
// statusEnum: [{ required: true, message: "状态不能为空", trigger: "blur" }],
|
||||
// ybFlag: [{ required: true, message: "医保标记不能为空", trigger: "blur" }],
|
||||
// ybMatchFlag: [
|
||||
// { required: true, message: "医保对码标记不能为空", trigger: "blur" },
|
||||
// ],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 通过条件过滤节点 */
|
||||
const filterNode = (value, data) => {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
};
|
||||
|
||||
/** 病种目录分类查询下拉树结构 */
|
||||
function getDiseaseCategoryList() {
|
||||
getDiseaseCategory().then((response) => {
|
||||
console.log(response, 'response病种目录分类查询下拉树结构');
|
||||
conditionDefinitionOptions.value = JSON.parse(
|
||||
JSON.stringify(response.data.diseaseCategoryList)
|
||||
).sort((a, b) => {
|
||||
return parseInt(a.value) - parseInt(b.value);
|
||||
});
|
||||
conditionDefinitionOptions.value.push({ info: '全部', value: '' });
|
||||
conditionDefinitionList.value = JSON.parse(
|
||||
JSON.stringify(response.data.diseaseCategoryList)
|
||||
).sort((a, b) => {
|
||||
return parseInt(a.value) - parseInt(b.value);
|
||||
});
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
});
|
||||
}
|
||||
/** 查询病种目录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getDiseaseList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
diseaseList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
console.log(total.value, 'total.value', res, 'res');
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data) {
|
||||
queryParams.value.sourceEnum = data.value;
|
||||
conditionDefinition.value = data.value;
|
||||
handleQuery();
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 启用按钮操作 */
|
||||
function handleStart(row) {
|
||||
const stardIds = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm('是否确定启用数据!')
|
||||
.then(function () {
|
||||
return startDisease(stardIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess('启用成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 停用按钮操作 */
|
||||
function handleClose(row) {
|
||||
const stopIds = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm('是否确认停用数据!')
|
||||
.then(function () {
|
||||
return stopDisease(stopIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess('停用成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download(
|
||||
'system/user/export',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`user_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
conditionCode: undefined,
|
||||
pyStr: undefined,
|
||||
statusEnum: undefined,
|
||||
sourceEnum: undefined,
|
||||
typeCode: undefined,
|
||||
description: undefined,
|
||||
ybFlag: undefined,
|
||||
ybNo: undefined,
|
||||
ybMatchFlag: undefined,
|
||||
};
|
||||
proxy.resetForm('diseaseRef');
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
// if (conditionDefinition.value === undefined) {
|
||||
// return proxy.$modal.msgError("请选择病种目录分类");
|
||||
// }
|
||||
reset();
|
||||
form.value.sourceEnum = conditionDefinition.value;
|
||||
open.value = true;
|
||||
title.value = '新增';
|
||||
}
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
getDiseaseOne(row.id).then((response) => {
|
||||
console.log(response, 'responsebbbb', row.id);
|
||||
form.value = response.data;
|
||||
form.value.ybFlag == 1 ? (form.value.ybFlag = true) : (form.value.ybFlag = false);
|
||||
form.value.ybMatchFlag == 1
|
||||
? (form.value.ybMatchFlag = true)
|
||||
: (form.value.ybMatchFlag = false);
|
||||
getList();
|
||||
});
|
||||
// console.log(row, "row");
|
||||
// form.value = JSON.parse(JSON.stringify(row));
|
||||
open.value = true;
|
||||
title.value = '病种编辑';
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs['diseaseRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
form.value.sourceEnum = conditionDefinition.value;
|
||||
form.value.ybFlag ? (form.value.ybFlag = 1) : (form.value.ybFlag = 0);
|
||||
form.value.ybMatchFlag ? (form.value.ybMatchFlag = 1) : (form.value.ybMatchFlag = 0);
|
||||
if (form.value.id != undefined) {
|
||||
console.log(form.value, 'editDisease', form.value.statusEnum);
|
||||
editDisease(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess('修改成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addDisease(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess('新增成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getDiseaseCategoryList();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,108 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询药品目录列表
|
||||
export function getMedicationList(query) {
|
||||
return request({
|
||||
url: '/data-dictionary/medication/information-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询药品目录详细
|
||||
export function getMedicationOne(id) {
|
||||
return request({
|
||||
url: '/data-dictionary/medication/information-one',
|
||||
method: 'get',
|
||||
params: { id } // 确保参数正确传递
|
||||
})
|
||||
}
|
||||
|
||||
// 新增药品目录
|
||||
export function addMedication(data) {
|
||||
return request({
|
||||
url: '/data-dictionary/medication/information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改药品目录
|
||||
export function editMedication(data) {
|
||||
return request({
|
||||
url: '/data-dictionary/medication/information',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除药品目录
|
||||
export function delUser(userId) {
|
||||
return request({
|
||||
url: '/system/user/' + userId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 药品目录分类查询
|
||||
export function getMedicationCategory() {
|
||||
return request({
|
||||
url: '/data-dictionary/medication/information-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 停用药品目录
|
||||
export function stopMedication(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
url: '/data-dictionary/medication/information-stop',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
// 启用药品目录
|
||||
export function startMedication(ids) {
|
||||
console.log(ids)
|
||||
return request({
|
||||
url: '/data-dictionary/medication/information-start',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
// 查询部门树形数据
|
||||
export function deptTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/location/location-page-tree',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 获取医保药品目录
|
||||
export function getYbMedicationList(queryParams) {
|
||||
return request({
|
||||
url: '/catalog/page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
// 获取药品限制标志
|
||||
export function queryYbCatalogue(queryParams) {
|
||||
return request({
|
||||
url: '/yb-request/query-yb-catalogue?hilistCode=' + queryParams.hilistCode + '&dateStr=' + queryParams.dateStr,
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,151 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-dialog
|
||||
title="医保药品目录"
|
||||
v-model="visible"
|
||||
width="1500px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@close="cancel"
|
||||
>
|
||||
<div>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入药品名"
|
||||
clearable
|
||||
style="width: 20%; margin-bottom: 10px"
|
||||
@keyup.enter="getList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getList" />
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-table v-loading="listLoading" border :data="list" highlight-current-row max-height="450">
|
||||
<el-table-column align="center" label="医保目录编码" prop="medicalCatalogCode" />
|
||||
<el-table-column align="center" label="药品名称" prop="registeredName">
|
||||
<template #default="scope">
|
||||
<span v-if="props.currentCategoryEnum == '4'">{{ scope.row.singleDrugName }}</span>
|
||||
<span v-else>{{ scope.row.registeredName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="药品类别" prop="drugCategoryName">
|
||||
<template #default="scope">
|
||||
{{ formatStr(scope.row.drugCategoryName) }}
|
||||
</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">
|
||||
<template #default="scope">
|
||||
{{ formatStr(scope.row.otcFlagName) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="批准文号" prop="approvalNo" />
|
||||
<el-table-column align="center" label="操作" width="80">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handlewAddMedicine(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"
|
||||
/>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getYbMedicationList, queryYbCatalogue } from './medicine';
|
||||
|
||||
const emit = defineEmits(['selectMedicine']);
|
||||
const visible = ref(false);
|
||||
const total = ref(0);
|
||||
const listLoading = ref(false);
|
||||
const props = defineProps({
|
||||
currentCategoryEnum: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const list = ref([]);
|
||||
function getList() {
|
||||
(queryParams.value.catalogType = props.currentCategoryEnum == '4' ? 1302 : 1301),
|
||||
console.log(props.currentCategoryEnum, 'props.currentCategoryEnum');
|
||||
|
||||
listLoading.value = true;
|
||||
getYbMedicationList(queryParams.value).then((res) => {
|
||||
total.value = res.data.data.total;
|
||||
list.value = res.data.data.records;
|
||||
listLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function show() {
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
function handlewAddMedicine(row) {
|
||||
queryYbCatalogue({ hilistCode: row.medicalCatalogCode, dateStr: '2020-01-01' }).then((res) => {
|
||||
if (res.data.length > 0) {
|
||||
let resultList = res.data.filter((item) => {
|
||||
return (
|
||||
item.memo != null &&
|
||||
item.memo != '' &&
|
||||
item.memo != 'null' &&
|
||||
item.memo != '目录变更' &&
|
||||
item.memo != '历史数据迁移' &&
|
||||
item.memo != '0' &&
|
||||
item.memo != ' '
|
||||
);
|
||||
});
|
||||
if (resultList.length > 0) {
|
||||
row.restrictedFlag = 1;
|
||||
row.restrictedScope = resultList[0].memo;
|
||||
}
|
||||
}
|
||||
emit('selectMedicine', row);
|
||||
}).catch(() => {
|
||||
emit('selectMedicine', row);
|
||||
});
|
||||
cancel();
|
||||
}
|
||||
|
||||
function formatStr(str) {
|
||||
if (str === null || str === undefined || str === '' || str === 'null') {
|
||||
return '-';
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-dialog__body .pagination-container .el-pagination) {
|
||||
padding-right: 20px !important;
|
||||
}
|
||||
</style>
|
||||
542
openhis-ui-vue3/src/views/catalog/medicine/index.vue
Normal file
542
openhis-ui-vue3/src/views/catalog/medicine/index.vue
Normal file
@@ -0,0 +1,542 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--药品目录-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-container">
|
||||
<div class="head-title">药品目录</div>
|
||||
<el-tree
|
||||
:data="medicationOptions"
|
||||
:props="{ label: 'info', children: 'children' }"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="medicationTreeRef"
|
||||
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-row :gutter="24">
|
||||
<!-- <el-col :span="5"> -->
|
||||
<el-form-item label="药品" prop="searchKey" label-width="40">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="品名/商品名/英文品名/编码/拼音"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- </el-col> -->
|
||||
<!-- <el-col :span="5"> -->
|
||||
<el-form-item label="状态" prop="statusEnum" label-width="100">
|
||||
<el-select v-model="queryParams.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-col :span="4"> -->
|
||||
<el-form-item label="医保对码" prop="ybMatchFlag" label-width="100">
|
||||
<el-select v-model="queryParams.ybMatchFlag" placeholder="" clearable>
|
||||
<el-option
|
||||
v-for="ybMatch in statusWeatherOption"
|
||||
:key="ybMatch.value"
|
||||
:label="ybMatch.info"
|
||||
:value="ybMatch.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- </el-col> -->
|
||||
</el-row>
|
||||
<!-- <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="openAddMedicine"
|
||||
>添加新项目</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<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-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>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
>导出Excel</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="medicationList"
|
||||
@selection-change="handleSelectionChange"
|
||||
width="90%"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="药品编号"
|
||||
align="center"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/>
|
||||
<el-table-column
|
||||
label="药品状态"
|
||||
align="center"
|
||||
key="statusEnum_enumText"
|
||||
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>
|
||||
<el-table-column
|
||||
label="药品分类"
|
||||
align="center"
|
||||
key="categoryCode_dictText"
|
||||
prop="categoryCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<!-- <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="totalVolume"
|
||||
prop="totalVolume"
|
||||
:show-overflow-tooltip="true"
|
||||
width="200px"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保编码"
|
||||
align="center"
|
||||
key="ybNo"
|
||||
prop="ybNo"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保是否对码"
|
||||
align="center"
|
||||
key="ybMatchFlag_enumText"
|
||||
prop="ybMatchFlag_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="医保上传"
|
||||
align="center"
|
||||
key="ybNo"
|
||||
prop="ybNo"
|
||||
:show-overflow-tooltip="true"
|
||||
width="90"
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="采购价"
|
||||
align="center"
|
||||
key="purchasePrice"
|
||||
prop="purchasePrice"
|
||||
: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"
|
||||
width="150"
|
||||
class-name="small-padding fixed-width"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="openEditMedicine(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"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<medicine-dialog
|
||||
ref="medicineRef"
|
||||
:item="currentData"
|
||||
:domainEnum="domainEnumOptions"
|
||||
:status="statusFlagOptions"
|
||||
:supplierListOptions="supplierListOptions"
|
||||
:statusRestrictedOptions="statusRestrictedOptions"
|
||||
:currentCategoryEnum="currentCategoryEnum"
|
||||
:partAttributeEnumOptions="partAttributeEnumOptions"
|
||||
:tempOrderSplitPropertyOptions="tempOrderSplitPropertyOptions"
|
||||
@submit="submitForm"
|
||||
@ybDialog="
|
||||
() => {
|
||||
proxy.$refs['medicineYbRef'].show();
|
||||
}
|
||||
"
|
||||
/>
|
||||
<MedicineYbDialog
|
||||
ref="medicineYbRef"
|
||||
:currentCategoryEnum="currentCategoryEnum"
|
||||
@selectMedicine="
|
||||
(row) => {
|
||||
proxy.$refs['medicineRef'].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-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="Medication">
|
||||
import { getToken } from "@/utils/auth";
|
||||
import {
|
||||
getMedicationList,
|
||||
editMedication,
|
||||
addMedication,
|
||||
getMedicationCategory,
|
||||
getMedicationOne,
|
||||
startMedication,
|
||||
stopMedication,
|
||||
} from './components/medicine';
|
||||
import medicineDialog from './components/medicineDialog';
|
||||
import MedicineYbDialog from './components/medicineYbDialog';
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const medicationList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const medicationOptions = ref(undefined);
|
||||
const statusFlagOptions = ref(undefined);
|
||||
const domainEnumOptions = ref(undefined);
|
||||
const supplierListOptions = ref(undefined);
|
||||
const statusWeatherOption = ref(undefined);
|
||||
const statusRestrictedOptions = ref(undefined);
|
||||
const currentCategoryEnum = ref('');
|
||||
const partAttributeEnumOptions = ref(undefined);
|
||||
const tempOrderSplitPropertyOptions = ref(undefined);
|
||||
// 使用 ref 定义当前药品数据
|
||||
const currentData = ref({});
|
||||
// 使用 ref 定义当前查看药品数据
|
||||
const viewData = ref({});
|
||||
|
||||
// 使用 ref 定义当前查看药品数据
|
||||
const viewFlg = ref(false);
|
||||
|
||||
/*** 药品目录导入参数 */
|
||||
const upload = reactive({
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 是否更新已经存在的数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url: import.meta.env.VITE_APP_BASE_API + "/data-dictionary/medication/import-data"
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 品名/商品名/英文品名/编码/拼音
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
ybMatchFlag: undefined, // 是否医保匹配(包括 1:是,0:否)
|
||||
categoryCode: undefined, // 目录
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 通过条件过滤节点 */
|
||||
const filterNode = (value, data) => {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
};
|
||||
|
||||
/** 病种目录分类查询下拉树结构 */
|
||||
function getMedicationCategoryList() {
|
||||
getMedicationCategory().then((response) => {
|
||||
console.log(response, 'response药品目录分类查询下拉树结构');
|
||||
medicationOptions.value = response.data.medicationCategoryCodeOptions;
|
||||
medicationOptions.value.unshift({ info: '全部', value: '' });
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
domainEnumOptions.value = response.data.domainFlagOptions;
|
||||
supplierListOptions.value = response.data.supplierListOptions;
|
||||
statusWeatherOption.value = response.data.statusWeatherOptions;
|
||||
statusRestrictedOptions.value = response.data.statusRestrictedOptions;
|
||||
partAttributeEnumOptions.value = response.data.partAttributeEnumOptions;
|
||||
tempOrderSplitPropertyOptions.value = response.data.tempOrderSplitPropertyEnumOptions;
|
||||
});
|
||||
}
|
||||
/** 查询病种目录列表 */
|
||||
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 handleNodeClick(data) {
|
||||
queryParams.value.categoryCode = data.value;
|
||||
currentCategoryEnum.value = data.value;
|
||||
handleQuery();
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
console.log(queryParams.value, 'queryParams');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 启用按钮操作 */
|
||||
function handleStart() {
|
||||
const startIds = ids.value;
|
||||
proxy.$modal
|
||||
.confirm('是否确定启用数据!')
|
||||
.then(function () {
|
||||
return startMedication(startIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess('启用成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 停用按钮操作 */
|
||||
function handleClose() {
|
||||
const stopIds = ids.value;
|
||||
console.log(data, 'data');
|
||||
proxy.$modal
|
||||
.confirm('是否确认停用数据!')
|
||||
.then(function () {
|
||||
return stopMedication(stopIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess('停用成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download(
|
||||
'system/user/export',
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`user_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
/** 导入按钮操作 */
|
||||
function handleImport() {
|
||||
upload.title = '药品目录导入';
|
||||
upload.open = true;
|
||||
}
|
||||
/** 下载模板操作 */
|
||||
function importTemplate() {
|
||||
proxy.download('/data-dictionary/medication/import-template', {}, `medication_template_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
/** 提交上传文件 */
|
||||
function submitFileForm() {
|
||||
proxy.$refs['uploadRef'].submit();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 打开新增弹窗 */
|
||||
function openAddMedicine() {
|
||||
// if (!currentCategoryEnum.value) {
|
||||
// return proxy.$modal.msgError("请选择药品目录分类");
|
||||
// }
|
||||
// proxy.$refs['medicineYbRef'].show();
|
||||
proxy.$refs['medicineRef'].show();
|
||||
}
|
||||
/** 打开编辑弹窗 */
|
||||
function openEditMedicine(row) {
|
||||
getMedicationOne(row.id).then((response) => {
|
||||
currentData.value = response.data;
|
||||
nextTick(() => {
|
||||
proxy.$refs['medicineRef'].edit();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm(formData) {
|
||||
console.log(formData, 'submitForm');
|
||||
if (formData.id != undefined) {
|
||||
editMedication(formData).then((response) => {
|
||||
proxy.$modal.msgSuccess('修改成功');
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addMedication(formData).then((response) => {
|
||||
if (response.code == 200) {
|
||||
proxy.$modal.msgSuccess('新增成功');
|
||||
proxy.$refs['medicineRef'].cancel();
|
||||
open.value = false;
|
||||
getList();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getMedicationCategoryList();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
.el-select {
|
||||
width: 150px !important;
|
||||
}
|
||||
</style>
|
||||
2
openhis-ui-vue3/src/views/catalog/service/index.vue
Normal file
2
openhis-ui-vue3/src/views/catalog/service/index.vue
Normal file
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
@@ -0,0 +1,46 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取支付记录列表
|
||||
export function getList(query) {
|
||||
return request({
|
||||
url: '/payment/payment/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function invoiceMzInvoice(data) {
|
||||
return request({
|
||||
url: '/invoice/mzInvoice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function invoiceReissue(data) {
|
||||
return request({
|
||||
url: '/invoice/invoiceReissue',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function invoiceWriteoff(data) {
|
||||
return request({
|
||||
url: '/invoice/invoiceWriteoff',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function invoiceOpen(invoiceId) {
|
||||
return request({
|
||||
url: '/invoice/invoiceOpen?invoiceId=' + invoiceId,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
// 收费详情
|
||||
export function paymentDetail(data) {
|
||||
return request({
|
||||
url: '/payment/payment/detail',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
276
openhis-ui-vue3/src/views/charge/clinicRecord/index.vue
Normal file
276
openhis-ui-vue3/src/views/charge/clinicRecord/index.vue
Normal file
@@ -0,0 +1,276 @@
|
||||
<template>
|
||||
<div class="app-continer">
|
||||
<div style="margin: 15px 0; padding: 0 20px">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="90px">
|
||||
<el-form-item label="患者姓名:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="患者姓名"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="getClinicRecord"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发票号:" prop="invoiceNo" label-width="120px">
|
||||
<el-input
|
||||
v-model="queryParams.invoiceNo"
|
||||
placeholder="发票号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="getClinicRecord"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算时间:" prop="activeFlag">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px; margin-bottom: 10px; margin-left: 20px"
|
||||
value-format="YYYY-MM-DD"
|
||||
:clearable="false"
|
||||
@change="getClinicRecord"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div style="float: right">
|
||||
<el-button type="primary" plain @click="getClinicRecord">查询</el-button>
|
||||
<el-button type="warning" plain @click="handleReset">重置</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</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"/>
|
||||
<el-table-column label="支付状态" align="center" prop="statusEnum_dictText" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="费用类型" align="center" prop="paymentEnum_dictText" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="医保结算Id" align="center" prop="ybSettleIds" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="收费流水号" align="center" prop="paymentNo" width="280" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="发票号" align="center" prop="invoiceNo" :show-overflow-tooltip="true"/>
|
||||
<el-table-column
|
||||
label="结算金额"
|
||||
align="right"
|
||||
prop="tenderedAmount"
|
||||
header-align="center"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.tenderedAmount + ' 元' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="支付金额"
|
||||
align="right"
|
||||
prop="displayAmount"
|
||||
header-align="center"
|
||||
width="100"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.displayAmount + ' 元' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="结算时间"
|
||||
align="center"
|
||||
key="billDate"
|
||||
prop="billDate"
|
||||
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.billDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收款人" align="center" prop="entererName" :show-overflow-tooltip="true"/>
|
||||
<!-- <el-table-column label="医生" align="center" prop="paymentEnum_enumText" /> -->
|
||||
<el-table-column label="支付结果" align="center" prop="outcomeEnum_dictText" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="打印次数" align="center" prop="printCount" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作" align="center" prop="paymentEnum_enumText" width="340">
|
||||
<template #default="scope">
|
||||
<!-- <el-button type="primary" link @click="handlePrint(scope.row)">单据</el-button> -->
|
||||
<!-- <el-button type="primary" link @click="handleEdit(scope.row)">冲红</el-button> -->
|
||||
<el-button type="primary" link @click="handleOpen(scope.row,4)">收费详情</el-button>
|
||||
<el-button type="primary" link @click="handleOpen(scope.row,1)" :disabled="scope.row.invoiceNo || scope.row.statusEnum == 3">开具电子发票</el-button>
|
||||
<el-button :disabled="!scope.row.relationId" type="primary" link @click="handleOpenReasonDialog(scope.row)">冲销发票</el-button>
|
||||
<el-button type="primary" link @click="handleOpen(scope.row,3)" :disabled="!scope.row.invoiceNo">调阅发票</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getLists"
|
||||
/>
|
||||
<el-dialog title="收费详情" v-model="paymentDetailShow" width="1000" append-to-body style="height:90vh">
|
||||
<el-table :data="paymentDetailList" border style="height: 80vh">
|
||||
<el-table-column label="支付类型" align="center" prop="payEnum_dictText" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="金额" align="center" prop="amount" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="找零" align="center" prop="returnAmount" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="交款" align="center" prop="chargeAmount" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<el-dialog title="请输入原因" v-model="reasonDialogVisible" width="30%">
|
||||
<el-form :model="reasonForm" label-width="80px">
|
||||
<el-form-item label="冲销原因">
|
||||
<el-input v-model="reasonForm.reason" placeholder="请输入原因" type="textarea" :rows="3" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="reasonDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitReason">确 定</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ClinicRecord">
|
||||
const { proxy } = getCurrentInstance();
|
||||
import { getList ,invoiceMzInvoice,invoiceReissue,invoiceWriteoff,invoiceOpen,paymentDetail} from './components/api.js';
|
||||
import { formatDate } from '@/utils/index';
|
||||
const occurrenceTime = ref([formatDate(new Date()),formatDate(new Date())]);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
billDateSTime:"",
|
||||
billDateETime:"",
|
||||
searchKey:"",
|
||||
kinsEnum: 1
|
||||
});
|
||||
const paymentDetailShow = ref(false)
|
||||
const clinicRecord = ref([]);
|
||||
const reasonDialogVisible = ref(false);
|
||||
const reasonForm = ref({
|
||||
reason: ''
|
||||
});
|
||||
const currentRow = ref(null);
|
||||
const paymentDetailList = ref([])
|
||||
getLists();
|
||||
function getClinicRecord() {
|
||||
queryParams.value.billDateSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.billDateETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getLists()
|
||||
}
|
||||
function getLists(){
|
||||
getList(queryParams.value).then((res) => {
|
||||
total.value = res.data.total;
|
||||
clinicRecord.value = res.data.records;
|
||||
});
|
||||
}
|
||||
function handleOpenReasonDialog(row) {
|
||||
// 可选:保存当前行数据以便后续使用
|
||||
currentRow.value = row;
|
||||
reasonForm.value.reason = ''; // 清空上次输入
|
||||
reasonDialogVisible.value = true;
|
||||
}
|
||||
// 提交原因
|
||||
function submitReason() {
|
||||
if (!reasonForm.value.reason.trim()) {
|
||||
proxy.$message.warning('请输入原因');
|
||||
return;
|
||||
}
|
||||
|
||||
invoiceWriteoff({paymentId:currentRow.value.relationIdStr,reason:reasonForm.value.reason}).then((res) => {
|
||||
if (res.data) {
|
||||
if(res.data.includes(" 电子票据红冲失败")){
|
||||
proxy.$message.error(res.data);
|
||||
}else{
|
||||
proxy.$message.success('红冲成功');
|
||||
// 关闭弹窗
|
||||
reasonDialogVisible.value = false;
|
||||
|
||||
// 可选:重置表单
|
||||
reasonForm.value.reason = '';
|
||||
window.open(res.data)
|
||||
}
|
||||
}
|
||||
getLists();
|
||||
}).catch((err)=>{
|
||||
})
|
||||
}
|
||||
/** 清空条件按钮操作 */
|
||||
function handleReset() {
|
||||
// 清空查询条件
|
||||
occurrenceTime.value = ""
|
||||
queryParams.value.billDateSTime = ""
|
||||
queryParams.value.billDateETime = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getLists();
|
||||
}
|
||||
// function handlePrint(row){
|
||||
|
||||
// }
|
||||
// function handleEdit(row){
|
||||
|
||||
// }
|
||||
function handleOpen(row,type){
|
||||
if(type==1){
|
||||
invoiceReissue({paymentId:row.id,encounterId:row.encounterId?row.encounterId:""}).then((res) => {
|
||||
if (res.data) {
|
||||
// 门诊电子发票开具失败 住院电子发票开具失败 电子发票类型不明确
|
||||
if(res.data.includes(" 挂号电子发票开具失败")||res.data.includes(" 住院电子发票开具失败")||res.data.includes(" 门诊电子发票开具失败")||res.data.includes(" 电子发票类型不明确")){
|
||||
proxy.$message.error(res.data);
|
||||
}else{
|
||||
window.open(res.data)
|
||||
}
|
||||
}
|
||||
if(res.code == 200) {
|
||||
getLists();
|
||||
}
|
||||
proxy.$message.error(res.data);
|
||||
}).catch((err)=>{
|
||||
})
|
||||
}else if(type==2) {
|
||||
invoiceWriteoff({paymentId:row.id,encounterId:row.encounterId?row.encounterId:""}).then((res) => {
|
||||
if (res.data) {
|
||||
if(res.data.includes(" 电子票据红冲失败")){
|
||||
proxy.$message.error(res.data);
|
||||
}else{
|
||||
window.open(res.data)
|
||||
}
|
||||
}
|
||||
}).catch((err)=>{
|
||||
})
|
||||
}else if(type==3){
|
||||
// 调阅电子发票
|
||||
invoiceOpen(row.invoiceId?row.invoiceId:"").then((res) => {
|
||||
if (res.data) {
|
||||
window.open(res.data)
|
||||
}
|
||||
}).catch((err)=>{
|
||||
})
|
||||
}else{
|
||||
paymentDetail({id:row.id?row.id:""}).then((res) => {
|
||||
if (res.data) {
|
||||
paymentDetailShow.value = true
|
||||
paymentDetailList.value = res.data
|
||||
}
|
||||
}).catch((err)=>{
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-dialog{
|
||||
height: 90vh!important;
|
||||
}
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
.el-textarea__inner {
|
||||
resize: none;
|
||||
}
|
||||
</style>
|
||||
100
openhis-ui-vue3/src/views/charge/cliniccharge/components/api.js
Normal file
100
openhis-ui-vue3/src/views/charge/cliniccharge/components/api.js
Normal file
@@ -0,0 +1,100 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 收费患者列表
|
||||
*/
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
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',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 医保转自费
|
||||
*/
|
||||
export function changeToSelfPay(encounterId) {
|
||||
return request({
|
||||
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',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 收费
|
||||
*/
|
||||
export function savePayment(data) {
|
||||
return request({
|
||||
url: '/payment/payment/charge',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/charge-manage/charge/init',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 收费预结算
|
||||
*/
|
||||
export function precharge(data) {
|
||||
return request({
|
||||
url: '/payment/payment/precharge',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消预结算
|
||||
*/
|
||||
export function unprecharge(data) {
|
||||
return request({
|
||||
url: '/payment/payment/unprecharge',
|
||||
method: 'post',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发耗材
|
||||
*/
|
||||
export function dispenseMedicalConsumables(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/medical-consumables-dispense/consumables-dispense',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,530 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="确认收费"
|
||||
v-model="props.open"
|
||||
width="700px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
>
|
||||
<div v-loading="dialogLoading">
|
||||
<el-text size="large" style="display: block; margin-bottom: 15px">
|
||||
收费日期:{{ currentDate }}
|
||||
</el-text>
|
||||
<el-text size="large">费用性质:{{ '自费' }}</el-text>
|
||||
<div class="amount-row">
|
||||
<el-text size="large">应收金额:</el-text>
|
||||
<el-text size="large" type="primary" class="amount">
|
||||
{{ props.totalAmount.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)"
|
||||
/>
|
||||
</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>
|
||||
<div class="add-payment">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="addPayment"
|
||||
:disabled="formData.selfPay.length >= 4 || remainingAmount <= 0"
|
||||
>
|
||||
添加支付方式
|
||||
</el-button>
|
||||
<el-text v-if="remainingAmount <= 0" type="danger" class="tip">
|
||||
金额已满足应收,不可继续添加
|
||||
</el-text>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<el-table :data="props.details" max-height="200" border>
|
||||
<el-table-column prop="payEnumText" label="支付类型" align="center" />
|
||||
<el-table-column
|
||||
prop="amount"
|
||||
label="金额"
|
||||
header-align="center"
|
||||
align="right"
|
||||
width="200"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.amount ? scope.row.amount + ' 元' : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- 金额汇总 -->
|
||||
<div class="summary">
|
||||
<el-space :size="30">
|
||||
<div class="summary-item">
|
||||
<el-text type="info">实收合计:</el-text>
|
||||
<el-text type="success">{{ displayAmount + ' 元' }}</el-text>
|
||||
</div>
|
||||
<div class="summary-item">
|
||||
<el-text type="info">应找零:</el-text>
|
||||
<el-text type="warning">{{ returnedAmount + ' 元' }}</el-text>
|
||||
</div>
|
||||
</el-space>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="throttledGetList" :disabled="dialogLoading"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button @click="close" :disabled="dialogLoading">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { savePayment, unprecharge, dispenseMedicalConsumables } from './api';
|
||||
import { computed, watch, reactive, ref, getCurrentInstance, nextTick } from 'vue';
|
||||
import { Delete } from '@element-plus/icons-vue';
|
||||
import { debounce } from 'lodash-es';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
totalAmount: {
|
||||
type: Number,
|
||||
default: 0.0,
|
||||
},
|
||||
category: {
|
||||
type: String,
|
||||
},
|
||||
paymentId: {
|
||||
type: String,
|
||||
},
|
||||
userCardInfo: {
|
||||
type: Object,
|
||||
},
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
default: undefined,
|
||||
},
|
||||
chargeItemIds: {
|
||||
type: [],
|
||||
default: [],
|
||||
},
|
||||
consumablesIdList: {
|
||||
type: [],
|
||||
default: [],
|
||||
},
|
||||
chrgBchnoList: {
|
||||
type: [],
|
||||
default: [],
|
||||
},
|
||||
details: {
|
||||
type: Object,
|
||||
default: undefined,
|
||||
},
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
const formData = reactive({
|
||||
totalAmount: 0,
|
||||
selfPay: [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }],
|
||||
medicalInsurance: {
|
||||
account: '',
|
||||
poolPay: 0,
|
||||
personalPay: 0,
|
||||
},
|
||||
});
|
||||
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');
|
||||
|
||||
// 构造一个新的对象,添加头 "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_TC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 110000)?.amount ?? 0, // 基本医保统筹基金支出
|
||||
YB_BC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 120000)?.amount ?? 0, // 补充医疗保险基金支出
|
||||
YB_JZ_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 130000)?.amount ?? 0, // 医疗救助基金支出
|
||||
YB_OTHER_AMOUNT: param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
|
||||
|
||||
// 职工基本医疗保险
|
||||
YB_TC_ZG_FUND_VALUE: param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
|
||||
YB_TC_JM_FUND_VALUE: param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险(修正原错误注释)
|
||||
|
||||
// 补充医疗保险基金支出细分
|
||||
YB_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, // 医院负担金额
|
||||
|
||||
// 医保结算返回值
|
||||
FULAMT_OWNPAY_AMT: param.detail.find((t) => t.payEnum === 1)?.amount ?? 0, // 全自费金额
|
||||
OVERLMT_SELFPAY: param.detail.find((t) => t.payEnum === 3)?.amount ?? 0, // 超限价自费费用
|
||||
PRESELFPAY_AMT: param.detail.find((t) => t.payEnum === 4)?.amount ?? 0, // 先行自付金额
|
||||
INSCP_SCP_AMT: param.detail.find((t) => t.payEnum === 5)?.amount ?? 0, // 符合政策范围金额
|
||||
ACT_PAY_DEDC: param.detail.find((t) => t.payEnum === 6)?.amount ?? 0, // 实际支付起付线
|
||||
POOL_PROP_SELFPAY: param.detail.find((t) => t.payEnum === 7)?.amount ?? 0, // 基本医疗保险统筹基金支付比例
|
||||
BALC: param.detail.find((t) => t.payEnum === 8)?.amount ?? 0, // 余额
|
||||
|
||||
// 特殊支付方式
|
||||
SELF_YB_ZH_PAY: param.detail.find((t) => t.payEnum === 210000)?.amount ?? 0, // 个人医保账户支付
|
||||
SELF_YB_ZH_GJ_VALUE: param.detail.find((t) => t.payEnum === 210100)?.amount ?? 0, // 账户共济支付金额
|
||||
SELF_CASH_PAY: param.detail.find((t) => t.payEnum === 220000)?.amount ?? 0, // 个人现金支付金额
|
||||
SELF_VX_PAY: param.detail.find((t) => t.payEnum === 230000)?.amount ?? 0, // 微信支付金额
|
||||
SELF_ALI_PAY: param.detail.find((t) => t.payEnum === 240000)?.amount ?? 0, // 阿里支付金额
|
||||
|
||||
// 现金支付细分
|
||||
SELF_CASH_VALUE: param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0, // 个人现金支付金额(现金)
|
||||
SELF_CASH_VX_VALUE: param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0, // 个人现金支付金额(微信)
|
||||
SELF_CASH_ALI_VALUE: param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0, // 个人现金支付金额(支付宝)
|
||||
SELF_CASH_UNION_VALUE: param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0, // 个人现金支付金额(银联)
|
||||
|
||||
// 基金类型(扩展)
|
||||
BIRTH_FUND: param.detail.find((t) => t.payEnum === 510100)?.amount ?? 0, // 生育基金
|
||||
RETIREE_MEDICAL: param.detail.find((t) => t.payEnum === 340100)?.amount ?? 0, // 离休人员医疗保障基金
|
||||
URBAN_BASIC_MEDICAL: param.detail.find((t) => t.payEnum === 390100)?.amount ?? 0, // 城乡居民基本医疗保险基金
|
||||
URBAN_SERIOUS_ILLNESS: param.detail.find((t) => t.payEnum === 390200)?.amount ?? 0, // 城乡居民大病医疗保险基金
|
||||
MEDICAL_ASSISTANCE: param.detail.find((t) => t.payEnum === 610100)?.amount ?? 0, // 医疗救助基金
|
||||
GOVERNMENT_SUBSIDY: param.detail.find((t) => t.payEnum === 640100)?.amount ?? 0, // 政府兜底基金
|
||||
ACCIDENT_INSURANCE: param.detail.find((t) => t.payEnum === 390400)?.amount ?? 0, // 意外伤害基金
|
||||
CARE_INSURANCE: param.detail.find((t) => t.payEnum === 620100)?.amount ?? 0, // 照护保险基金
|
||||
FINANCIAL_FUND: param.detail.find((t) => t.payEnum === 360100)?.amount ?? 0, // 财政基金
|
||||
HOSPITAL_ADVANCE: param.detail.find((t) => t.payEnum === 999900)?.amount ?? 0, // 医院垫付
|
||||
SUPPLEMENTARY_INSURANCE: param.detail.find((t) => t.payEnum === 390300)?.amount ?? 0, // 城乡居民大病补充保险基金
|
||||
HEALTHCARE_PREPAYMENT: param.detail.find((t) => t.payEnum === 360300)?.amount ?? 0, // 保健预支基金
|
||||
Mr_QR_Code: param.regNo,
|
||||
sex: props.patientInfo.genderEnum_enumText,
|
||||
age: props.patientInfo.age,
|
||||
personType: '职工医保',
|
||||
fixmedinsName: param.fixmedinsName + '门诊收费明细',
|
||||
},
|
||||
],
|
||||
// feeDetial: param.detail, //收费项目,后端还未返回
|
||||
};
|
||||
// 将对象转换为 JSON 字符串
|
||||
let jsonString = JSON.stringify(result, null, 2);
|
||||
console.log(jsonString, 'jsonString');
|
||||
await CefSharp.BindObjectAsync('boundAsync');
|
||||
await boundAsync.printReport(
|
||||
'门诊收费明细单.grf',
|
||||
jsonString
|
||||
)
|
||||
.then((response) => {
|
||||
//返回结果是jsonString,可判断其调用是否成功
|
||||
console.log(response, 'response');
|
||||
var res = JSON.parse(response);
|
||||
if (!res.IsSuccess) {
|
||||
proxy.$modal.msgError('调用打印插件失败:' + res.ErrorMessage);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
proxy.$modal.msgError('调用打印插件失败:' + error);
|
||||
});
|
||||
}
|
||||
|
||||
const throttledGetList = debounce(submit, 300);
|
||||
|
||||
async function submit() {
|
||||
console.log(parseFloat(displayAmount.value), 'parseFloat(displayAmount.value)');
|
||||
console.log(formData.totalAmount, 'formData.totalAmount');
|
||||
|
||||
if (parseFloat(displayAmount.value) < formData.totalAmount.toFixed(2)) {
|
||||
proxy.$modal.msgError('请输入正确的结算金额');
|
||||
return;
|
||||
}
|
||||
|
||||
// if(chrome.webview === undefined) {
|
||||
// alert('当前版本不支持银联支付');
|
||||
// }
|
||||
// else {
|
||||
// try {
|
||||
// let jsonResult = await window.chrome.webview.hostObjects.CSharpAccessor.ReadCardAsync();
|
||||
// let cardInfo = JSON.parse(jsonResult);
|
||||
// console.log(cardInfo.CardType);
|
||||
// } catch (error) {
|
||||
// console.error('调用失败:', error);
|
||||
// }
|
||||
// }
|
||||
dialogLoading.value = true;
|
||||
savePayment({
|
||||
// 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);
|
||||
// 长春大学自动发耗材
|
||||
if (userStore.fixmedinsCode == 'H22010200672' && props.consumablesIdList.length > 0) {
|
||||
dispenseMedicalConsumables(props.consumablesIdList);
|
||||
}
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
dialogLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
const currentDate = ref(new Date().toLocaleString());
|
||||
|
||||
const selfPayMethods = [
|
||||
{ label: '现金', value: 220400 },
|
||||
{ label: '微信', value: 220100 },
|
||||
{ label: '支付宝', value: 220200 },
|
||||
{ label: '银联', value: 220300 },
|
||||
];
|
||||
|
||||
// 计算剩余可输入金额
|
||||
const remainingAmount = computed(() => {
|
||||
return (
|
||||
formData.totalAmount - formData.selfPay.reduce((sum, item) => sum + Number(item.amount), 0)
|
||||
);
|
||||
});
|
||||
|
||||
// 获取单个支付方式的最大可输入金额
|
||||
const getMax = (index) => {
|
||||
const otherSum = formData.selfPay.reduce(
|
||||
(sum, item, i) => (i !== index ? sum + Number(item.amount) : sum),
|
||||
0
|
||||
);
|
||||
if (formData.selfPay[index].payEnum == 220400) {
|
||||
return formData.totalAmount + 100 - otherSum;
|
||||
}
|
||||
return formData.totalAmount - otherSum;
|
||||
};
|
||||
|
||||
// 检查支付方式是否已使用
|
||||
const isMethodDisabled = (payEnum) => {
|
||||
return formData.selfPay.some((item) => item.payEnum === payEnum);
|
||||
};
|
||||
|
||||
const handleAmountChange = () => {
|
||||
// 不需要在这里直接设置 returnedAmount,依赖 computed 属性
|
||||
};
|
||||
|
||||
const addPayment = () => {
|
||||
if (remainingAmount.value <= 0) {
|
||||
return;
|
||||
}
|
||||
formData.selfPay.push({ payEnum: '', amount: remainingAmount.value });
|
||||
};
|
||||
|
||||
const removePayment = (index) => {
|
||||
formData.selfPay.splice(index, 1);
|
||||
};
|
||||
|
||||
const clearAmount = (index) => {
|
||||
// formData.selfPay[index].amount = 0;
|
||||
};
|
||||
|
||||
// 计算属性
|
||||
const displayAmount = computed(() => {
|
||||
return formData.selfPay.reduce((sum, item) => sum + (Number(item.amount) || 0), 0).toFixed(2);
|
||||
});
|
||||
|
||||
const returnedAmount = computed(() => {
|
||||
const display = parseFloat(displayAmount.value);
|
||||
if (isNaN(display) || display <= 0) {
|
||||
return '0.00';
|
||||
}
|
||||
const returned = display - formData.totalAmount;
|
||||
return returned >= 0 ? returned.toFixed(2) : '0.00';
|
||||
});
|
||||
|
||||
function close() {
|
||||
// unprecharge({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// emit('close');
|
||||
// } else {
|
||||
// proxy.$modal.msgError(res.message);
|
||||
// }
|
||||
// });
|
||||
emit('close');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep(.pagination-container .el-pagination) {
|
||||
right: 20px !important;
|
||||
}
|
||||
.charge-container {
|
||||
max-width: 600px;
|
||||
margin: 20px auto;
|
||||
padding: 20px 30px;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.amount-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.amount {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.payment-type {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.payment-container {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.payment-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.amount-input {
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
.add-payment {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.tip {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.summary {
|
||||
margin: 25px 0;
|
||||
padding: 15px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.summary-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
text-align: center;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.el-text.el-text--success {
|
||||
font-size: 18px !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-text.el-text--warning {
|
||||
font-size: 18px !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.suffix-wrapper {
|
||||
position: relative;
|
||||
display: inline-block; /* 保持行内布局 */
|
||||
}
|
||||
|
||||
.suffix-text {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #999;
|
||||
pointer-events: none; /* 避免点击干扰 */
|
||||
}
|
||||
|
||||
/* 调整输入框内边距 */
|
||||
.amount-input .el-input__inner {
|
||||
padding-right: 30px !important;
|
||||
}
|
||||
</style>
|
||||
535
openhis-ui-vue3/src/views/charge/cliniccharge/index.vue
Normal file
535
openhis-ui-vue3/src/views/charge/cliniccharge/index.vue
Normal file
@@ -0,0 +1,535 @@
|
||||
<template>
|
||||
<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"
|
||||
>
|
||||
<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>
|
||||
<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"
|
||||
/>
|
||||
<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-column label="病历号" align="center" prop="encounterBusNo" />
|
||||
<el-table-column label="姓名" align="center" prop="patientName" />
|
||||
<!-- <el-table-column label="时间" align="center" prop="receptionTime" width="160">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.receptionTime) }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="收费状态" align="center" prop="statusEnum_enumText" />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
<div style="width: 69%">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">基本信息</span>
|
||||
</template>
|
||||
<el-descriptions :column="4">
|
||||
<el-descriptions-item label="姓名:">{{ patientInfo.patientName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别:">
|
||||
{{ patientInfo.genderEnum_enumText }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="年龄:">{{ patientInfo.age }}</el-descriptions-item>
|
||||
<el-descriptions-item label="合同类型:">
|
||||
{{ patientInfo.categoryEnum_enumText }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="身份证号:">{{ patientInfo.idCard }}</el-descriptions-item> -->
|
||||
<!-- <el-descriptions-item label="手机号">{{ patientInfo.name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生日期">{{ patientInfo.name }}</el-descriptions-item> -->
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<el-card style="min-width: 1100px">
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">收费项目</span>
|
||||
</template>
|
||||
<div style="margin-bottom: 10px">
|
||||
<el-button type="primary" @click="confirmCharge()" :disabled="buttonDisabled">
|
||||
确认收费
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="handleReadCard('01')" style="width: 65px">
|
||||
电子凭证
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="handleReadCard('02')"
|
||||
style="width: 65px"
|
||||
:disabled="true"
|
||||
>
|
||||
身份证
|
||||
</el-button>
|
||||
<el-button type="primary" plain @click="handleReadCard('03')" style="width: 65px">
|
||||
医保卡
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="payToSelt()"
|
||||
style="margin-left: 20px"
|
||||
:disabled="buttonDisabled"
|
||||
>
|
||||
医保转自费
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="patToMedicalInsurance()"
|
||||
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-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" />
|
||||
<el-table-column label="数量" align="center" prop="quantityValue" width="80" />
|
||||
<el-table-column label="医疗类型" align="center" prop="medTypeCode_dictText" />
|
||||
<el-table-column label="医保编码" align="center" prop="ybNo" />
|
||||
<el-table-column label="费用性质" align="center" prop="contractName" />
|
||||
<el-table-column label="收费状态" align="center" prop="statusEnum_enumText" width="150">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
:type="scope.row.statusEnum === 1 ? 'default' : 'success'"
|
||||
disable-transitions
|
||||
>
|
||||
{{ scope.row.statusEnum_enumText }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="right" prop="totalPrice" header-align="center">
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalPrice.toFixed(2) + ' 元' || '0.00' + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收款人" align="center" prop="entererId_dictText" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<ChargeDialog
|
||||
:open="openDialog"
|
||||
@close="handleClose"
|
||||
:category="patientInfo.categoryEnum"
|
||||
:totalAmount="totalAmount"
|
||||
:patientInfo="patientInfo"
|
||||
:chargeItemIds="chargeItemIdList"
|
||||
:consumablesIdList="consumablesIdList"
|
||||
:chrgBchnoList="chrgBchnoList"
|
||||
:userCardInfo="userCardInfo"
|
||||
:paymentId="paymentId"
|
||||
:details="details"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ClinicCharge">
|
||||
import {
|
||||
getList,
|
||||
getChargeList,
|
||||
changeToSelfPay,
|
||||
changeToMedicalInsurance,
|
||||
init,
|
||||
precharge,
|
||||
} from './components/api';
|
||||
import { invokeYbPlugin } from '@/api/public';
|
||||
import ChargeDialog from './components/chargeDialog.vue';
|
||||
import { formatDateStr } from '@/utils';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const userStore = useUserStore();
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
statusEnum: 1,
|
||||
});
|
||||
const totalAmounts = ref(0);
|
||||
const selectedRows = ref([]);
|
||||
const patientList = ref([]);
|
||||
const chargeList = ref([]);
|
||||
const chargeItemIdList = ref([]);
|
||||
const chrgBchnoList = ref([]);
|
||||
const chargeLoading = ref(false);
|
||||
const encounterId = ref('');
|
||||
const paymentId = ref('');
|
||||
const patientInfo = ref({});
|
||||
const openDialog = ref(false);
|
||||
const totalAmount = ref(0);
|
||||
const chargeListRef = ref();
|
||||
const details = ref({});
|
||||
const chargeStatusOptions = ref([]);
|
||||
const receptionTime = ref([
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
]);
|
||||
const buttonDisabled = computed(() => {
|
||||
return Object.keys(patientInfo.value).length === 0;
|
||||
});
|
||||
|
||||
watch(
|
||||
() => selectedRows.value,
|
||||
(newVlaue) => {
|
||||
if (newVlaue && newVlaue.length > 0) {
|
||||
handleTotalAmount();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
function handleSelectionChange(selection) {
|
||||
selectedRows.value = selection;
|
||||
}
|
||||
function handleTotalAmount() {
|
||||
totalAmounts.value = selectedRows.value.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (Number(currentRow.totalPrice) || 0);
|
||||
}, 0);
|
||||
}
|
||||
getPatientList();
|
||||
initOption();
|
||||
/**
|
||||
* 患者列表
|
||||
*/
|
||||
function getPatientList() {
|
||||
if (receptionTime.value.length > 0) {
|
||||
queryParams.value.receptionTimeSTime = receptionTime.value[0] + ' 00:00:00';
|
||||
queryParams.value.receptionTimeETime = receptionTime.value[1] + ' 23:59:59';
|
||||
} else {
|
||||
queryParams.value.receptionTimeSTime = undefined;
|
||||
queryParams.value.receptionTimeETime = undefined;
|
||||
}
|
||||
getList(queryParams.value).then((res) => {
|
||||
patientList.value = res.data.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
function initOption() {
|
||||
init().then((res) => {
|
||||
chargeStatusOptions.value = res.data.chargeItemStatusOptions;
|
||||
});
|
||||
}
|
||||
|
||||
function checkSelectable(row, index) {
|
||||
// 已结算时禁用选择框
|
||||
return row.statusEnum === 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击患者列表行 获取处方列表
|
||||
*/
|
||||
function clickRow(row) {
|
||||
patientInfo.value = row;
|
||||
chargeLoading.value = true;
|
||||
encounterId.value = row.encounterId;
|
||||
getChargeList(row.encounterId).then((res) => {
|
||||
chargeList.value = res.data;
|
||||
setTimeout(() => {
|
||||
chargeLoading.value = false;
|
||||
chargeListRef.value.toggleAllSelection();
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
|
||||
function handleClose(value, msg) {
|
||||
openDialog.value = false;
|
||||
if (value == 'success') {
|
||||
proxy.$modal.msgSuccess(msg);
|
||||
chargeLoading.value = true;
|
||||
getChargeList(patientInfo.value.encounterId).then((res) => {
|
||||
chargeList.value = res.data;
|
||||
setTimeout(() => {
|
||||
chargeLoading.value = false;
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const consumablesIdList = ref([]);
|
||||
// 确认收费
|
||||
function confirmCharge() {
|
||||
let selectRows = chargeListRef.value.getSelectionRows();
|
||||
if (selectRows.length == 0) {
|
||||
proxy.$modal.msgWarning('请选择一条收费项目');
|
||||
return;
|
||||
}
|
||||
chargeItemIdList.value = selectRows.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
consumablesIdList.value = selectRows
|
||||
.filter((item) => {
|
||||
return item.serviceTable == 'wor_device_request';
|
||||
})
|
||||
.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
|
||||
// totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
|
||||
// return accumulator + (currentRow.totalPrice || 0);
|
||||
// }, 0);
|
||||
precharge({
|
||||
patientId: patientInfo.value.patientId,
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
chargeItemIds: chargeItemIdList.value,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// totalAmount.value = res.data.psnCashPay;
|
||||
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;
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg);
|
||||
}
|
||||
});
|
||||
// console.log(patientInfo)
|
||||
}
|
||||
|
||||
let userCardInfo = ref({});
|
||||
const readCardLoading = ref(false);
|
||||
const loadingText = ref('');
|
||||
const BusiCardInfo = ref(''); // miyao
|
||||
async function handleReadCard(value) {
|
||||
// if (window.CefSharp === undefined) {
|
||||
// alert('请在医保版本中调用读卡功能!');
|
||||
// } else {
|
||||
try {
|
||||
// await CefSharp.BindObjectAsync('boundAsync');
|
||||
// string url,
|
||||
// string fixmedins_code,
|
||||
// string businessType,
|
||||
// string operatorCode,
|
||||
// string operatorName,
|
||||
// string officeId,
|
||||
// string officeName
|
||||
|
||||
// readCardLoading.value = true;
|
||||
let jsonResult;
|
||||
let cardInfo;
|
||||
let userMessage = undefined;
|
||||
switch (value) {
|
||||
case '01': // 电子凭证
|
||||
// readCardLoading.value = true;
|
||||
await invokeYbPlugin({
|
||||
FunctionId: 3,
|
||||
url: 'http://10.47.0.67:8089/localcfc/api/hsecfc/localQrCodeQuery',
|
||||
orgId: 'H22010200672',
|
||||
businessType: '01101',
|
||||
operatorId: userStore.id.toString(),
|
||||
operatorName: userStore.name,
|
||||
officeId: 'D83',
|
||||
officeName: '财务科',
|
||||
})
|
||||
.then((res) => {
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
jsonResult = res.data;
|
||||
})
|
||||
.catch(() => {
|
||||
readCardLoading.value = false;
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
cardInfo = JSON.parse(JSON.stringify(jsonResult));
|
||||
let message = JSON.parse(cardInfo.message);
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '01', // 证件类型
|
||||
certNo: message.data.idNo, // 身份证号
|
||||
psnCertType: '01', // 居民身份证
|
||||
busiCardInfo: message.data.ecToken, // 令牌
|
||||
};
|
||||
BusiCardInfo.value = message.data.ecToken;
|
||||
console.log(BusiCardInfo.value);
|
||||
break;
|
||||
case '02':
|
||||
break;
|
||||
case '03': // 社保卡
|
||||
readCardLoading.value = true;
|
||||
loadingText.value = '正在读取...';
|
||||
await invokeYbPlugin(
|
||||
JSON.stringify({
|
||||
FunctionId: 1,
|
||||
IP: 'ddjk.jlhs.gov.cn',
|
||||
PORT: 20215,
|
||||
TIMEOUT: 60,
|
||||
SFZ_DRIVER_TYPE: 1,
|
||||
})
|
||||
)
|
||||
.then((res) => {
|
||||
jsonResult = JSON.stringify(res.data);
|
||||
})
|
||||
.finally(() => {
|
||||
readCardLoading.value = false;
|
||||
});
|
||||
// console.log(
|
||||
// 'jsonResult',
|
||||
// JSON.parse({
|
||||
// IssuingAreaCode: '310000',
|
||||
// SocialSecurityNumber: '371324198810224515',
|
||||
// CardNumber: 'M501A1A78',
|
||||
// CardIdentificationCode: '310000D15600000535925154E880AB97',
|
||||
// Name: '\u5218\u5CF0',
|
||||
// CardResetInfo: '00814A444686603100333E4FA9',
|
||||
// SpecificationVersion: '3.00',
|
||||
// IssuingDate: '20190313',
|
||||
// ExpirationDate: '20290313',
|
||||
// TerminalNumber: '000000000000',
|
||||
// TerminalDeviceNumber: '00041161201901000005',
|
||||
// Code: 0,
|
||||
// ErrorMessage: null,
|
||||
// })
|
||||
// );
|
||||
let message1 = JSON.parse(jsonResult);
|
||||
userMessage = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
};
|
||||
userCardInfo = {
|
||||
certType: '02', // 证件类型
|
||||
certNo: message1.SocialSecurityNumber, // 身份证号
|
||||
psnCertType: '02', // 居民身份证
|
||||
busiCardInfo: message1.BusiCardInfo, //卡号
|
||||
};
|
||||
BusiCardInfo.value = message1.BusiCardInfo;
|
||||
console.log(message1.BusiCardInfo);
|
||||
break;
|
||||
case '99':
|
||||
break;
|
||||
}
|
||||
readCardLoading.value = false;
|
||||
if (userMessage.certNo) {
|
||||
let selectRows = chargeListRef.value.getSelectionRows();
|
||||
if (selectRows.length == 0) {
|
||||
proxy.$modal.msgWarning('请选择一条收费项目');
|
||||
return;
|
||||
}
|
||||
chargeItemIdList.value = selectRows.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
|
||||
return accumulator + (currentRow.totalPrice || 0);
|
||||
}, 0);
|
||||
precharge({
|
||||
patientId: patientInfo.value.patientId,
|
||||
encounterId: patientInfo.value.encounterId,
|
||||
chargeItemIds: chargeItemIdList.value,
|
||||
ybMdtrtCertType: userCardInfo.psnCertType,
|
||||
busiCardInfo: userCardInfo.busiCardInfo,
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// totalAmount.value = res.data.psnCashPay;
|
||||
paymentId.value = res.data.paymentId;
|
||||
totalAmount.value = res.data.details.find((item) => item.payEnum == 220000).amount;
|
||||
details.value = res.data.details;
|
||||
// chrgBchnoList.value = res.data.chrgBchnoList;
|
||||
chargeItemIdList.value = selectRows.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
consumablesIdList.value = selectRows
|
||||
.filter((item) => {
|
||||
return item.serviceTable == 'wor_device_request';
|
||||
})
|
||||
.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgError(res.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('调用失败:', error);
|
||||
readCardLoading.value = false;
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 医保转自费
|
||||
*/
|
||||
function payToSelt() {
|
||||
changeToSelfPay(encounterId.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 自费转医保
|
||||
*/
|
||||
function patToMedicalInsurance() {
|
||||
changeToMedicalInsurance(encounterId.value).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
@@ -0,0 +1,97 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 收费患者列表
|
||||
*/
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/charge-manage/refund/encounter-patient-page',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 患者退费账单
|
||||
*/
|
||||
export function getRefundList(params) {
|
||||
return request({
|
||||
url: '/charge-manage/refund/patient-refund',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 未退费账单列表
|
||||
*/
|
||||
export function getChargeItemIds(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/refund/regenerate_charge?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 退费
|
||||
*/
|
||||
export function refund(data) {
|
||||
return request({
|
||||
url: '/payment/payment/uncharge',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/charge-manage/refund/init',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验退药
|
||||
*/
|
||||
export function validReturnDrug(params) {
|
||||
return request({
|
||||
url: '/charge-manage/refund/verify_refund?chargeItemIdList=' + params,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取退款详情列表
|
||||
*/
|
||||
export function getReturnDetail(data) {
|
||||
return request({
|
||||
url: '/payment/payment/detail',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 自动退耗材
|
||||
*/
|
||||
export function renturnDispenseMedical(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/return-medicine/medicine-return',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取退药列表
|
||||
*/
|
||||
export function getReturnMedicineList(data) {
|
||||
return request({
|
||||
url: '/pharmacy-manage/return-medicine/medicine-return-list',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,435 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="确认退费"
|
||||
v-model="props.open"
|
||||
width="700px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
>
|
||||
<div>
|
||||
<el-text size="large" style="display: block; margin-bottom: 15px">
|
||||
退费日期:{{ currentDate }}
|
||||
</el-text>
|
||||
<el-text size="large">费用性质:{{ '自费' }}</el-text>
|
||||
<div class="amount-row">
|
||||
<el-text size="large">应退金额:</el-text>
|
||||
<el-text size="large" type="primary" class="amount">
|
||||
{{ props.totalAmount.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)"
|
||||
/>
|
||||
</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>
|
||||
<div class="payment-container" style="position: relative">
|
||||
<span style="position: absolute; top: 5px">退费原因:</span>
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
v-model="reason"
|
||||
placeholder="退费原因"
|
||||
class="reason-textarea"
|
||||
@change="handleAmountChange"
|
||||
/>
|
||||
</div>
|
||||
<div class="add-payment">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="addPayment"
|
||||
:disabled="formData.selfPay.length >= 4 || remainingAmount <= 0"
|
||||
>
|
||||
添加退费方式
|
||||
</el-button>
|
||||
<el-text v-if="remainingAmount <= 0" type="danger" class="tip">
|
||||
金额已满足应退,不可继续添加
|
||||
</el-text>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<el-table :data="props.details" max-height="200" border>
|
||||
<el-table-column prop="payEnum_dictText" label="支付类型" align="center" />
|
||||
<el-table-column
|
||||
prop="amount"
|
||||
label="金额"
|
||||
header-align="center"
|
||||
align="right"
|
||||
width="200"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.amount ? scope.row.amount + ' 元' : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<!-- 金额汇总 -->
|
||||
<div class="summary">
|
||||
<el-space :size="30">
|
||||
<div class="summary-item">
|
||||
<el-text type="info">实退合计:</el-text>
|
||||
<el-text type="success">{{ displayAmount + ' 元' }}</el-text>
|
||||
</div>
|
||||
<!-- <div class="summary-item">
|
||||
<el-text type="info">应找零:</el-text>
|
||||
<el-text type="warning">{{ returnedAmount + ' 元' }}</el-text>
|
||||
</div> -->
|
||||
</el-space>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
<el-button @click="close">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { refund, renturnDispenseMedical, getReturnMedicineList } from './api';
|
||||
import { computed, watch, reactive, ref, getCurrentInstance } from 'vue';
|
||||
import { Delete } from '@element-plus/icons-vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
totalAmount: {
|
||||
type: Number,
|
||||
default: 0.0,
|
||||
},
|
||||
category: {
|
||||
type: String,
|
||||
},
|
||||
paymentId: {
|
||||
type: String,
|
||||
},
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
default: undefined,
|
||||
},
|
||||
chargeItemIds: {
|
||||
type: [],
|
||||
default: [],
|
||||
},
|
||||
medicineReturnList: {
|
||||
type: [],
|
||||
default: [],
|
||||
},
|
||||
details: {
|
||||
type: Object,
|
||||
default: undefined,
|
||||
},
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const reason = ref('');
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
const formData = reactive({
|
||||
totalAmount: 0,
|
||||
selfPay: [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }],
|
||||
medicalInsurance: {
|
||||
account: '',
|
||||
poolPay: 0,
|
||||
personalPay: 0,
|
||||
},
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.totalAmount,
|
||||
(newValue) => {
|
||||
formData.totalAmount = newValue;
|
||||
formData.selfPay[0].amount = newValue;
|
||||
}
|
||||
);
|
||||
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
function submit() {
|
||||
console.log(props.chargeItemIds);
|
||||
|
||||
if (parseFloat(displayAmount.value) < formData.totalAmount) {
|
||||
proxy.$modal.msgError('请输入正确的金额');
|
||||
return;
|
||||
}
|
||||
if (userStore.fixmedinsCode == '1123123') {
|
||||
getReturnMedicineList({ encounterId: props.patientInfo.encounterId, refundStatus: 11 }).then(
|
||||
(res) => {
|
||||
let returnMedicineList = [];
|
||||
returnMedicineList = res.data
|
||||
.filter((item) => {
|
||||
return item.serviceTable == 'wor_device_request';
|
||||
})
|
||||
.map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
dispenseId: item.dispenseId,
|
||||
tableName: 'wor_device_request',
|
||||
};
|
||||
});
|
||||
renturnDispenseMedical(returnMedicineList).then((res) => {
|
||||
if (res.code == 200) {
|
||||
refund({
|
||||
paymentEnum: 0,
|
||||
kindEnum: 1,
|
||||
patientId: props.patientInfo.patientId,
|
||||
id: props.paymentId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
paymentDetails: formData.selfPay,
|
||||
reason: reason.value,
|
||||
ybFlag: '0',
|
||||
eleFlag: '0',
|
||||
// returnedAmount: parseFloat(returnedAmount.value),
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emit('close', 'success');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
} else {
|
||||
refund({
|
||||
paymentEnum: 0,
|
||||
kindEnum: 1,
|
||||
patientId: props.patientInfo.patientId,
|
||||
id: props.paymentId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
chargeItemIds: props.chargeItemIds,
|
||||
paymentDetails: formData.selfPay,
|
||||
reason: reason.value,
|
||||
ybFlag: '0',
|
||||
eleFlag: '0',
|
||||
// returnedAmount: parseFloat(returnedAmount.value),
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 长春大学自动退耗材
|
||||
|
||||
emit('close', 'success');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const currentDate = ref(new Date().toLocaleString());
|
||||
|
||||
const selfPayMethods = [
|
||||
{ label: '现金', value: 220400 },
|
||||
{ label: '微信', value: 220100 },
|
||||
{ label: '支付宝', value: 220200 },
|
||||
{ label: '银联', value: 220300 },
|
||||
];
|
||||
|
||||
// 计算剩余可输入金额
|
||||
const remainingAmount = computed(() => {
|
||||
return (
|
||||
formData.totalAmount - formData.selfPay.reduce((sum, item) => sum + Number(item.amount), 0)
|
||||
);
|
||||
});
|
||||
|
||||
// 获取单个支付方式的最大可输入金额
|
||||
const getMax = (index) => {
|
||||
const otherSum = formData.selfPay.reduce(
|
||||
(sum, item, i) => (i !== index ? sum + Number(item.amount) : sum),
|
||||
0
|
||||
);
|
||||
if (formData.selfPay[index].payEnum == 220400) {
|
||||
return formData.totalAmount + 100 - otherSum;
|
||||
}
|
||||
return formData.totalAmount - otherSum;
|
||||
};
|
||||
|
||||
// 检查支付方式是否已使用
|
||||
const isMethodDisabled = (payEnum) => {
|
||||
return formData.selfPay.some((item) => item.payEnum === payEnum);
|
||||
};
|
||||
|
||||
const handleAmountChange = () => {
|
||||
// 不需要在这里直接设置 returnedAmount,依赖 computed 属性
|
||||
};
|
||||
|
||||
const addPayment = () => {
|
||||
if (remainingAmount.value <= 0) {
|
||||
return;
|
||||
}
|
||||
formData.selfPay.push({ payEnum: '', amount: remainingAmount.value });
|
||||
};
|
||||
|
||||
const removePayment = (index) => {
|
||||
formData.selfPay.splice(index, 1);
|
||||
};
|
||||
|
||||
const clearAmount = (index) => {
|
||||
// formData.selfPay[index].amount = 0;
|
||||
};
|
||||
|
||||
// 计算属性
|
||||
const displayAmount = computed(() => {
|
||||
return formData.selfPay.reduce((sum, item) => sum + (Number(item.amount) || 0), 0).toFixed(2);
|
||||
});
|
||||
|
||||
const returnedAmount = computed(() => {
|
||||
const display = parseFloat(displayAmount.value);
|
||||
if (isNaN(display) || display <= 0) {
|
||||
return '0.00';
|
||||
}
|
||||
const returned = display - formData.totalAmount;
|
||||
return returned >= 0 ? returned.toFixed(2) : '0.00';
|
||||
});
|
||||
|
||||
function close() {
|
||||
emit('close');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.pagination-container .el-pagination) {
|
||||
right: 20px !important;
|
||||
}
|
||||
.charge-container {
|
||||
max-width: 600px;
|
||||
margin: 20px auto;
|
||||
padding: 20px 30px;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.amount-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.amount {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.payment-type {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.payment-container {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.payment-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.amount-input {
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
.reason-textarea {
|
||||
margin-left: 80px;
|
||||
width: 59%;
|
||||
}
|
||||
|
||||
.add-payment {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.tip {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.summary {
|
||||
margin: 25px 0;
|
||||
padding: 15px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.summary-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
text-align: center;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.el-text.el-text--success {
|
||||
font-size: 18px !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-text.el-text--warning {
|
||||
font-size: 18px !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
.suffix-wrapper {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.suffix-text {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #999;
|
||||
pointer-events: none; /* 避免点击干扰 */
|
||||
}
|
||||
|
||||
/* 调整输入框内边距 */
|
||||
.amount-input .el-input__inner {
|
||||
padding-right: 30px !important;
|
||||
}
|
||||
</style>
|
||||
361
openhis-ui-vue3/src/views/charge/clinicrefund/index.vue
Normal file
361
openhis-ui-vue3/src/views/charge/clinicrefund/index.vue
Normal file
@@ -0,0 +1,361 @@
|
||||
<template>
|
||||
<div style="display: flex; justify-content: space-between" class="app-container">
|
||||
<el-card style="width: 30%">
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">患者列表</span>
|
||||
</template>
|
||||
<div style="width: 100%">
|
||||
<el-input
|
||||
v-model="queryParams.patientName"
|
||||
placeholder="请输入患者名"
|
||||
clearable
|
||||
style="width: 49%; 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: 49%; margin-bottom: 10px"
|
||||
placeholder="收费状态"
|
||||
@change="getPatientList"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in chargeOption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="maxBillDate"
|
||||
type="daterange"
|
||||
range-separator="~"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
placement="bottom"
|
||||
:clearable="false"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 84%; margin-bottom: 10px; margin-right: 10px"
|
||||
/>
|
||||
<el-button type="primary" style="margin-bottom: 10px" @click="getPatientList">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-table
|
||||
ref="patientListRef"
|
||||
height="630"
|
||||
:data="patientList"
|
||||
row-key="encounterId"
|
||||
@cell-click="clickRow"
|
||||
highlight-current-row
|
||||
width=""
|
||||
>
|
||||
<el-table-column label="病历号" align="center" prop="encounterBusNo" />
|
||||
<el-table-column label="姓名" align="center" prop="patientName" />
|
||||
<!-- <el-table-column label="时间" align="center" prop="startTime">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.startTime) }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="收费状态" align="center" prop="statusEnum_enumText" />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
<div style="width: 69%">
|
||||
<el-card style="margin-bottom: 20px; height: 15%">
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">基本信息</span>
|
||||
</template>
|
||||
<el-descriptions :column="4">
|
||||
<el-descriptions-item label="就诊号:">
|
||||
{{ patientInfo.encounterId }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名:">
|
||||
{{ patientInfo.patientName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性别:">
|
||||
{{ patientInfo.genderEnum_enumText }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="年龄:">
|
||||
{{ patientInfo.age }}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="合同类型:">
|
||||
{{ patientInfo.categoryEnum_enumText }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="结算时间:">
|
||||
{{ patientInfo.billDate ? formatDate(patientInfo.billDate) : '' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="账单总额:">
|
||||
{{ patientInfo.totalAmount ? patientInfo.totalAmount.toFixed(2) + ' 元' : '' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="医保支付:">
|
||||
{{ patientInfo.insurancePrice }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="自费金额:">
|
||||
{{ patientInfo.selfAmount ? patientInfo.selfAmount.toFixed(2) + ' 元' : '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="支付方式:">
|
||||
{{ patientInfo.typeCode_dictText }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="发票号:">
|
||||
{{ patientInfo.idCard }}
|
||||
</el-descriptions-item> -->
|
||||
<!-- <el-descriptions-item label="手机号">{{ patientInfo.name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生日期">{{ patientInfo.name }}</el-descriptions-item> -->
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<el-card style="height: 83%">
|
||||
<template #header>
|
||||
<span style="vertical-align: middle">退费单据</span>
|
||||
</template>
|
||||
<!-- <el-button type="primary" @click="handleRefund()" :disabled="buttonDisabled">
|
||||
确认退费
|
||||
</el-button> -->
|
||||
<el-table
|
||||
ref="chargeListRef"
|
||||
height="510"
|
||||
:data="chargeList"
|
||||
row-key="encounterId"
|
||||
v-loading="chargeLoading"
|
||||
:span-method="spanMethod"
|
||||
class="no-hover-table"
|
||||
border
|
||||
width=""
|
||||
>
|
||||
<!-- <el-table-column type="selection" :selectable="checkSelectable" width="55" /> -->
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleRefund(scope.row)">退费</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="paymentId" label="支付单据号" align="center" />
|
||||
<el-table-column label="项目单据号" align="center" prop="busNo" width="150" />
|
||||
<el-table-column label="项目名称" align="center" prop="itemName" />
|
||||
<el-table-column
|
||||
label="收费状态"
|
||||
align="center"
|
||||
prop="chargeStatus_enumText"
|
||||
width="100"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="发药/执行状态"
|
||||
align="center"
|
||||
prop="dispenseStatus_enumText"
|
||||
width="130"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.dispenseStatus_enumText || scope.row.serviceStatus_enumText }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="数量" align="center" width="100">
|
||||
<template #default="scope">
|
||||
{{ scope.row.quantityValue + ' ' + scope.row.quantityUnit_dictText }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="付款总额"
|
||||
align="right"
|
||||
prop="totalPrice"
|
||||
header-align="center"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalPrice.toFixed(2) + ' 元' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="处方号" align="center" prop="prescriptionNo" /> -->
|
||||
<el-table-column label="收款人" align="center" prop="entererName" width="120" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
<RefundDialog
|
||||
:open="openDialog"
|
||||
@close="handleClose"
|
||||
:totalAmount="totalAmount"
|
||||
:patientInfo="patientInfo"
|
||||
:paymentId="paymentId"
|
||||
:chargeItemIds="chargeItemIdList"
|
||||
:details="details"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="ClinicCharge">
|
||||
import {
|
||||
getList,
|
||||
getRefundList,
|
||||
refund,
|
||||
getReturnDetail,
|
||||
init,
|
||||
getChargeItemIds,
|
||||
validReturnDrug,
|
||||
} from './components/api';
|
||||
import { formatDate, formatDateStr } from '@/utils/index';
|
||||
import RefundDialog from './components/refundDialog.vue';
|
||||
import Decimal from 'decimal.js';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
statusEnum: 7,
|
||||
});
|
||||
const spanMap = ref({});
|
||||
const patientList = ref([]);
|
||||
const patientInfo = ref({});
|
||||
const chargeList = ref([]);
|
||||
const totalAmount = ref(0);
|
||||
const chargeOption = ref([]);
|
||||
const chargeLoading = ref(false);
|
||||
const openDialog = ref(false);
|
||||
const chargeItemIdList = ref([]);
|
||||
const details = ref({});
|
||||
const encounterId = ref('');
|
||||
const paymentId = ref('');
|
||||
const maxBillDate = ref([
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
]);
|
||||
getPatientList();
|
||||
initOptions();
|
||||
/**
|
||||
* 患者列表
|
||||
*/
|
||||
function getPatientList() {
|
||||
if (maxBillDate.value.length > 0) {
|
||||
queryParams.value.maxBillDateSTime = maxBillDate.value[0] + ' 00:00:00';
|
||||
queryParams.value.maxBillDateETime = maxBillDate.value[1] + ' 23:59:59';
|
||||
} else {
|
||||
queryParams.value.maxBillDateSTime = undefined;
|
||||
queryParams.value.maxBillDateETime = undefined;
|
||||
}
|
||||
getList(queryParams.value).then((res) => {
|
||||
patientList.value = res.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
function initOptions() {
|
||||
init().then((res) => {
|
||||
chargeOption.value = res.data.chargeItemStatusOptions;
|
||||
});
|
||||
}
|
||||
|
||||
// 生成合并行
|
||||
const generateSpanMap = () => {
|
||||
spanMap.value = {};
|
||||
let currentId = null;
|
||||
let startIndex = 0;
|
||||
|
||||
chargeList.value.forEach((row, index) => {
|
||||
if (row.paymentId !== currentId) {
|
||||
if (currentId !== null) {
|
||||
spanMap.value[currentId] = {
|
||||
start: startIndex,
|
||||
count: index - startIndex,
|
||||
};
|
||||
}
|
||||
currentId = row.paymentId;
|
||||
startIndex = index;
|
||||
}
|
||||
});
|
||||
|
||||
// 处理最后一个分组
|
||||
if (currentId !== null) {
|
||||
spanMap.value[currentId] = {
|
||||
start: startIndex,
|
||||
count: chargeList.value.length - startIndex,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
// 合并方法(同时处理多选列和paymentId列)
|
||||
const spanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
||||
if (columnIndex <= 1) {
|
||||
// 合并前两列
|
||||
const group = spanMap.value[row.paymentId];
|
||||
if (!group) return;
|
||||
|
||||
if (rowIndex === group.start) {
|
||||
return { rowspan: group.count, colspan: 1 };
|
||||
} else {
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 点击患者列表行 获取处方列表
|
||||
*/
|
||||
function clickRow(row) {
|
||||
patientInfo.value = row;
|
||||
chargeLoading.value = true;
|
||||
encounterId.value = row.encounterId;
|
||||
getRefundList({
|
||||
encounterId: row.encounterId,
|
||||
billDateSTime: maxBillDate.value[0] + ' 00:00:00',
|
||||
billDateETime: maxBillDate.value[1] + ' 23:59:59',
|
||||
}).then((res) => {
|
||||
chargeList.value = res.data;
|
||||
spanMap.value = {};
|
||||
chargeList.value.sort((a, b) => a.paymentId.localeCompare(b.paymentId));
|
||||
console.log(chargeList.value);
|
||||
generateSpanMap();
|
||||
setTimeout(() => {
|
||||
chargeLoading.value = false;
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
|
||||
function handleRefund(row) {
|
||||
// totalAmount.value = chargeList.value
|
||||
// .filter((item) => {
|
||||
// return item.paymentId === row.paymentId;
|
||||
// })
|
||||
// .reduce((accumulator, currentRow) => {
|
||||
// return new Decimal(accumulator).add(new Decimal(currentRow.totalPrice || 0));
|
||||
// }, 0);
|
||||
getReturnDetail({ id: row.paymentId }).then((res) => {
|
||||
if (res.data.length > 0) {
|
||||
totalAmount.value = res.data.find((item) => item.payEnum === 220000).amount;
|
||||
}
|
||||
details.value = res.data;
|
||||
});
|
||||
paymentId.value = row.paymentId;
|
||||
patientInfo.value.patientId = row.patientId;
|
||||
getChargeItemIds(row.encounterId).then((res) => {
|
||||
chargeItemIdList.value = res.data;
|
||||
validReturnDrug(row.chargeItemIds.split(',')).then((res) => {
|
||||
if (res.code == 200) {
|
||||
openDialog.value = true;
|
||||
} else {
|
||||
proxy.$modal.msgWarning(res.msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
// refund(
|
||||
// chargeList.value.map((item) => {
|
||||
// item.id;
|
||||
// })
|
||||
// ).then((res) => {
|
||||
// if (res.code == 200) {
|
||||
// proxy.$modal.msgSuccess('操作成功');
|
||||
// }
|
||||
// getPatientList();
|
||||
// });
|
||||
}
|
||||
|
||||
function handleClose(value) {
|
||||
openDialog.value = false;
|
||||
if (value == 'success') {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
clickRow(patientInfo.value);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.no-hover-table) .el-table__body tr:hover > td {
|
||||
background: inherit !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,466 @@
|
||||
<template>
|
||||
<el-dialog title="确认收费" v-model="props.open" width="700px" append-to-body destroy-on-close>
|
||||
<div v-loading="dialogLoading">
|
||||
<el-text size="large" style="display: block; margin-bottom: 15px">
|
||||
收费日期:{{ currentDate }}
|
||||
</el-text>
|
||||
<el-text size="large">费用性质:{{ '自费' }}</el-text>
|
||||
<div class="amount-row">
|
||||
<el-text size="large">应收金额:</el-text>
|
||||
<el-text size="large" type="primary" class="amount">
|
||||
{{ props.totalAmount.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)"
|
||||
/>
|
||||
</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>
|
||||
<div class="add-payment">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="addPayment"
|
||||
:disabled="formData.selfPay.length >= 4 || remainingAmount <= 0"
|
||||
>
|
||||
添加支付方式
|
||||
</el-button>
|
||||
<el-text v-if="remainingAmount <= 0" type="danger" class="tip">
|
||||
金额已满足应收,不可继续添加
|
||||
</el-text>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 金额汇总 -->
|
||||
<div class="summary">
|
||||
<el-space :size="30">
|
||||
<div class="summary-item">
|
||||
<el-text type="info">实收合计:</el-text>
|
||||
<el-text type="success">{{ displayAmount + ' 元' }}</el-text>
|
||||
</div>
|
||||
<div class="summary-item">
|
||||
<el-text type="info">应找零:</el-text>
|
||||
<el-text type="warning">{{ returnedAmount + ' 元' }}</el-text>
|
||||
</div>
|
||||
</el-space>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="throttledGetList" :disabled="dialogLoading"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button @click="close" :disabled="dialogLoading">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { savePayment } from './outpatientregistration';
|
||||
import { computed, watch, reactive, ref, getCurrentInstance, nextTick } from 'vue';
|
||||
import { Delete } from '@element-plus/icons-vue';
|
||||
import { debounce } from 'lodash-es';
|
||||
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
totalAmount: {
|
||||
type: Number,
|
||||
default: 0.0,
|
||||
},
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
default: undefined,
|
||||
},
|
||||
chargeItemIds: {
|
||||
type: [],
|
||||
default: [],
|
||||
},
|
||||
chrgBchnoList: {
|
||||
type: [],
|
||||
default: [],
|
||||
},
|
||||
chrgBchno: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
registerBusNo: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
transformedData: {
|
||||
type: Object,
|
||||
default: undefined,
|
||||
},
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const dialogLoading = ref(false);
|
||||
const throttledGetList = debounce(submit, 300);
|
||||
const formData = reactive({
|
||||
totalAmount: 0,
|
||||
selfPay: [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }],
|
||||
medicalInsurance: {
|
||||
account: '',
|
||||
poolPay: 0,
|
||||
personalPay: 0,
|
||||
},
|
||||
});
|
||||
|
||||
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');
|
||||
|
||||
// 构造一个新的对象,添加头 "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_TC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 110000)?.amount ?? 0, // 基本医保统筹基金支出
|
||||
YB_BC_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 120000)?.amount ?? 0, // 补充医疗保险基金支出
|
||||
YB_JZ_FUND_AMOUNT: param.detail.find((t) => t.payEnum === 130000)?.amount ?? 0, // 医疗救助基金支出
|
||||
YB_OTHER_AMOUNT: param.detail.find((t) => t.payEnum === 140000)?.amount ?? 0, // 其他支出
|
||||
|
||||
// 职工基本医疗保险
|
||||
YB_TC_ZG_FUND_VALUE: param.detail.find((t) => t.payEnum === 110100)?.amount ?? 0, // 职工基本医疗保险
|
||||
YB_TC_JM_FUND_VALUE: param.detail.find((t) => t.payEnum === 110200)?.amount ?? 0, // 居民基本医疗保险(修正原错误注释)
|
||||
|
||||
// 补充医疗保险基金支出细分
|
||||
YB_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, // 医院负担金额
|
||||
|
||||
// 医保结算返回值
|
||||
FULAMT_OWNPAY_AMT: param.detail.find((t) => t.payEnum === 1)?.amount ?? 0, // 全自费金额
|
||||
OVERLMT_SELFPAY: param.detail.find((t) => t.payEnum === 3)?.amount ?? 0, // 超限价自费费用
|
||||
PRESELFPAY_AMT: param.detail.find((t) => t.payEnum === 4)?.amount ?? 0, // 先行自付金额
|
||||
INSCP_SCP_AMT: param.detail.find((t) => t.payEnum === 5)?.amount ?? 0, // 符合政策范围金额
|
||||
ACT_PAY_DEDC: param.detail.find((t) => t.payEnum === 6)?.amount ?? 0, // 实际支付起付线
|
||||
POOL_PROP_SELFPAY: param.detail.find((t) => t.payEnum === 7)?.amount ?? 0, // 基本医疗保险统筹基金支付比例
|
||||
BALC: param.detail.find((t) => t.payEnum === 8)?.amount ?? 0, // 余额
|
||||
|
||||
// 特殊支付方式
|
||||
SELF_YB_ZH_PAY: param.detail.find((t) => t.payEnum === 210000)?.amount ?? 0, // 个人医保账户支付
|
||||
SELF_YB_ZH_GJ_VALUE: param.detail.find((t) => t.payEnum === 210100)?.amount ?? 0, // 账户共济支付金额
|
||||
SELF_CASH_PAY: param.detail.find((t) => t.payEnum === 220000)?.amount ?? 0, // 个人现金支付金额
|
||||
SELF_VX_PAY: param.detail.find((t) => t.payEnum === 230000)?.amount ?? 0, // 微信支付金额
|
||||
SELF_ALI_PAY: param.detail.find((t) => t.payEnum === 240000)?.amount ?? 0, // 阿里支付金额
|
||||
|
||||
// 现金支付细分
|
||||
SELF_CASH_VALUE: param.detail.find((t) => t.payEnum === 220400)?.amount ?? 0, // 个人现金支付金额(现金)
|
||||
SELF_CASH_VX_VALUE: param.detail.find((t) => t.payEnum === 220100)?.amount ?? 0, // 个人现金支付金额(微信)
|
||||
SELF_CASH_ALI_VALUE: param.detail.find((t) => t.payEnum === 220200)?.amount ?? 0, // 个人现金支付金额(支付宝)
|
||||
SELF_CASH_UNION_VALUE: param.detail.find((t) => t.payEnum === 220300)?.amount ?? 0, // 个人现金支付金额(银联)
|
||||
|
||||
// 基金类型(扩展)
|
||||
BIRTH_FUND: param.detail.find((t) => t.payEnum === 510100)?.amount ?? 0, // 生育基金
|
||||
RETIREE_MEDICAL: param.detail.find((t) => t.payEnum === 340100)?.amount ?? 0, // 离休人员医疗保障基金
|
||||
URBAN_BASIC_MEDICAL: param.detail.find((t) => t.payEnum === 390100)?.amount ?? 0, // 城乡居民基本医疗保险基金
|
||||
URBAN_SERIOUS_ILLNESS: param.detail.find((t) => t.payEnum === 390200)?.amount ?? 0, // 城乡居民大病医疗保险基金
|
||||
MEDICAL_ASSISTANCE: param.detail.find((t) => t.payEnum === 610100)?.amount ?? 0, // 医疗救助基金
|
||||
GOVERNMENT_SUBSIDY: param.detail.find((t) => t.payEnum === 640100)?.amount ?? 0, // 政府兜底基金
|
||||
ACCIDENT_INSURANCE: param.detail.find((t) => t.payEnum === 390400)?.amount ?? 0, // 意外伤害基金
|
||||
CARE_INSURANCE: param.detail.find((t) => t.payEnum === 620100)?.amount ?? 0, // 照护保险基金
|
||||
FINANCIAL_FUND: param.detail.find((t) => t.payEnum === 360100)?.amount ?? 0, // 财政基金
|
||||
HOSPITAL_ADVANCE: param.detail.find((t) => t.payEnum === 999900)?.amount ?? 0, // 医院垫付
|
||||
SUPPLEMENTARY_INSURANCE: param.detail.find((t) => t.payEnum === 390300)?.amount ?? 0, // 城乡居民大病补充保险基金
|
||||
HEALTHCARE_PREPAYMENT: param.detail.find((t) => t.payEnum === 360300)?.amount ?? 0, // 保健预支基金
|
||||
Mr_QR_Code: param.regNo,
|
||||
sex: props.patientInfo.genderEnum_enumText,
|
||||
age: props.patientInfo.age,
|
||||
personType: '职工医保',
|
||||
fixmedinsName: param.fixmedinsName + '门诊收费明细',
|
||||
},
|
||||
],
|
||||
// feeDetial: param.detail, //收费项目,后端还未返回
|
||||
};
|
||||
// 将对象转换为 JSON 字符串
|
||||
let jsonString = JSON.stringify(result, null, 2);
|
||||
console.log(jsonString, 'jsonString');
|
||||
await CefSharp.BindObjectAsync('boundAsync');
|
||||
await boundAsync.printReport(
|
||||
'门诊收费明细单.grf',
|
||||
jsonString
|
||||
)
|
||||
.then((response) => {
|
||||
//返回结果是jsonString,可判断其调用是否成功
|
||||
console.log(response, 'response');
|
||||
var res = JSON.parse(response);
|
||||
if (!res.IsSuccess) {
|
||||
proxy.$modal.msgError('调用打印插件失败:' + res.ErrorMessage);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
proxy.$modal.msgError('调用打印插件失败:' + error);
|
||||
});
|
||||
}
|
||||
|
||||
function submit() {
|
||||
if (parseFloat(displayAmount.value) < formData.totalAmount) {
|
||||
proxy.$modal.msgError('请输入正确的结算金额');
|
||||
return;
|
||||
}
|
||||
dialogLoading.value = true;
|
||||
savePayment({
|
||||
// paymentEnum: 0,
|
||||
// kindEnum: 1,
|
||||
// patientId: props.patientInfo.patientId,
|
||||
// encounterId: props.patientInfo.encounterId,
|
||||
// chargeItemIds: props.chargeItemIds,
|
||||
outpatientRegistrationAddParam: props.transformedData,
|
||||
chrgBchno: props.chrgBchno,
|
||||
busNo: props.registerBusNo,
|
||||
paymentDetails: formData.selfPay,
|
||||
// ybFlag: '0',
|
||||
// eleFlag: '0',
|
||||
// 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');
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
dialogLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
const currentDate = ref(new Date().toLocaleString());
|
||||
|
||||
const selfPayMethods = [
|
||||
{ label: '现金', value: 220400 },
|
||||
{ label: '微信', value: 220100 },
|
||||
{ label: '支付宝', value: 220200 },
|
||||
{ label: '银联', value: 220300 },
|
||||
];
|
||||
|
||||
// 计算剩余可输入金额
|
||||
const remainingAmount = computed(() => {
|
||||
return (
|
||||
formData.totalAmount - formData.selfPay.reduce((sum, item) => sum + Number(item.amount), 0)
|
||||
);
|
||||
});
|
||||
|
||||
// 获取单个支付方式的最大可输入金额
|
||||
const getMax = (index) => {
|
||||
const otherSum = formData.selfPay.reduce(
|
||||
(sum, item, i) => (i !== index ? sum + Number(item.amount) : sum),
|
||||
0
|
||||
);
|
||||
if (formData.selfPay[index].payEnum == 220400) {
|
||||
return formData.totalAmount + 100 - otherSum;
|
||||
}
|
||||
return formData.totalAmount - otherSum;
|
||||
};
|
||||
|
||||
// 检查支付方式是否已使用
|
||||
const isMethodDisabled = (payEnum) => {
|
||||
return formData.selfPay.some((item) => item.payEnum === payEnum);
|
||||
};
|
||||
|
||||
const handleAmountChange = () => {
|
||||
// 不需要在这里直接设置 returnedAmount,依赖 computed 属性
|
||||
};
|
||||
|
||||
const addPayment = () => {
|
||||
if (remainingAmount.value <= 0) {
|
||||
return;
|
||||
}
|
||||
formData.selfPay.push({ payEnum: '', amount: remainingAmount.value });
|
||||
};
|
||||
|
||||
const removePayment = (index) => {
|
||||
formData.selfPay.splice(index, 1);
|
||||
};
|
||||
|
||||
const clearAmount = (index) => {
|
||||
// formData.selfPay[index].amount = 0;
|
||||
};
|
||||
|
||||
// 计算属性
|
||||
const displayAmount = computed(() => {
|
||||
return formData.selfPay.reduce((sum, item) => sum + (Number(item.amount) || 0), 0).toFixed(2);
|
||||
});
|
||||
|
||||
const returnedAmount = computed(() => {
|
||||
const display = parseFloat(displayAmount.value);
|
||||
if (isNaN(display) || display <= 0) {
|
||||
return '0.00';
|
||||
}
|
||||
const returned = display - formData.totalAmount;
|
||||
return returned >= 0 ? returned.toFixed(2) : '0.00';
|
||||
});
|
||||
|
||||
function close() {
|
||||
emit('close', 'cancel');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
:deep(.pagination-container .el-pagination) {
|
||||
right: 20px !important;
|
||||
}
|
||||
.charge-container {
|
||||
max-width: 600px;
|
||||
margin: 20px auto;
|
||||
padding: 20px 30px;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.amount-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.amount {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.payment-type {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.payment-container {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.payment-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.amount-input {
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
.add-payment {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.tip {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.summary {
|
||||
margin: 25px 0;
|
||||
padding: 15px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.summary-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
text-align: center;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.el-text.el-text--success {
|
||||
font-size: 18px !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-text.el-text--warning {
|
||||
font-size: 18px !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
.suffix-wrapper {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
.suffix-text {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #999;
|
||||
pointer-events: none; /* 避免点击干扰 */
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,216 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询初期所需数据
|
||||
export function getInit() {
|
||||
return request({
|
||||
url: '/charge-manage/register/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询患者信息
|
||||
export function getOutpatientRegistrationList(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/patient-metadata',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询费用性质
|
||||
export function getContractList() {
|
||||
return request({
|
||||
url: '/app-common/contract-list',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询诊断信息
|
||||
export function getConditionDefinitionMetadata(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/condition-definition-metadata',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// // 查询就诊位置
|
||||
// export function getLocationTree(query) {
|
||||
// return request({
|
||||
// url: '/charge-manage/register/location-tree',
|
||||
// method: 'get',
|
||||
// params: query
|
||||
// })
|
||||
// }
|
||||
|
||||
// 查询就诊科室
|
||||
export function getLocationTree(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/org-list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 根据位置id筛选医生
|
||||
export function getPractitionerMetadata(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/practitioner-metadata',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 根据机构id筛选服务项目
|
||||
export function getHealthcareMetadata(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/healthcare-metadata',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 门诊挂号查询
|
||||
export function getOutpatientRegistrationCurrent(query) {
|
||||
return request({
|
||||
url: '/charge-manage/register/current-day-encounter',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 新增门诊挂号信息
|
||||
export function addOutpatientRegistration(data) {
|
||||
return request({
|
||||
url: '/payment/payment/reg-pre-pay',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增病人信息
|
||||
export function addPatient(data) {
|
||||
return request({
|
||||
url: '/patient-manage/information/patient-information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function listmaritalstatus() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-maritalstatus',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function listoccupationtype() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-occupationtype',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function lisadministrativegender() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-administrativegender',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function listbloodtypeabo() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-bloodtypeabo',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function listbloodtypearh() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-bloodtypearh',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function listfamilyrelationshiptype() {
|
||||
return request({
|
||||
url: '/patientmanage/information/list-familyrelationshiptype',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询患者相关
|
||||
export function patientlLists() {
|
||||
return request({
|
||||
url: '/patient-manage/information/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 患者退号
|
||||
export function returnRegister(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/register/return?encounterId=' + encounterId,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 收费
|
||||
*/
|
||||
export function savePayment(data) {
|
||||
return request({
|
||||
url: '/payment/payment/reg-pay',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 收费预结算
|
||||
*/
|
||||
export function precharge(data) {
|
||||
return request({
|
||||
url: '/payment/payment/precharge',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 退费
|
||||
*/
|
||||
export function refund(data) {
|
||||
return request({
|
||||
url: '/payment/payment/uncharge',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消挂号
|
||||
*/
|
||||
export function cancelRegister(data) {
|
||||
return request({
|
||||
url: '/charge-manage/register/return',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*/
|
||||
export function gerPreInfo(userMaessage) {
|
||||
return request({
|
||||
url: '/yb-request/per-info',
|
||||
method: 'post',
|
||||
params: userMaessage
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,493 @@
|
||||
<template>
|
||||
<!-- <div class="app-container"> -->
|
||||
<!-- 添加或修改对话框 -->
|
||||
<el-dialog :title="title" v-model="visible" width="980px" append-to-body>
|
||||
<el-form ref="patientRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="性别" prop="genderEnum">
|
||||
<el-radio-group v-model="form.genderEnum" :disabled="isViewMode">
|
||||
<el-radio
|
||||
v-for="item in administrativegenderList"
|
||||
:key="item.value"
|
||||
:label="item.value"
|
||||
>
|
||||
{{ item.info }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="活动标识" prop="tempFlag">
|
||||
<el-radio-group v-model="form.tempFlag" :disabled="isViewMode">
|
||||
<el-radio v-for="dict in patient_temp_flag" :key="dict.value" :label="dict.value">
|
||||
{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系方式" prop="phone">
|
||||
<el-input v-model="form.phone" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="证件号码" prop="idCard">
|
||||
<el-input v-model="form.idCard" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="民族" prop="nationalityCode">
|
||||
<el-select v-model="form.nationalityCode" clearable filterable :disabled="isViewMode">
|
||||
<el-option
|
||||
v-for="item in nationality_code"
|
||||
: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="typeCode">
|
||||
<el-select
|
||||
v-model="form.typeCode"
|
||||
placeholder="卡类别"
|
||||
clearable
|
||||
:disabled="isViewMode"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_idtype"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="就诊卡号" prop="identifierNo">
|
||||
<el-input v-model="form.identifierNo" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="国家编码" prop="countryCode">
|
||||
<el-input v-model="form.countryCode" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-col :span="6">
|
||||
<el-form-item label="年龄" prop="age">
|
||||
<el-input v-model="form.age" clearable :disabled="isViewMode"/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="职业" prop="prfsEnum">
|
||||
<el-select v-model="form.prfsEnum" placeholder="职业" clearable :disabled="isViewMode">
|
||||
<el-option
|
||||
v-for="item in occupationtypeList"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工作单位" prop="workCompany">
|
||||
<el-input v-model="form.workCompany" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="年龄" prop="age">
|
||||
<el-input
|
||||
v-model="form.age"
|
||||
:disabled="isViewMode"
|
||||
@input="(value) => (form.age = value.replace(/[^0-9]/g, ''))"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人" prop="linkName">
|
||||
<el-input v-model="form.linkName" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人关系" prop="linkRelationCode">
|
||||
<el-select
|
||||
v-model="form.linkRelationCode"
|
||||
placeholder="联系人关系"
|
||||
clearable
|
||||
:disabled="isViewMode"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in familyrelationshiptypeList"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系人电话" prop="linkRelationCode">
|
||||
<el-input v-model="form.linkTelcom" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="地址选择" prop="addressSelect">
|
||||
<el-cascader
|
||||
:options="options"
|
||||
:props="{ checkStrictly: true, value: 'code', label: 'name' }"
|
||||
v-model="selectedOptions"
|
||||
@change="handleChange"
|
||||
:disabled="isViewMode"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<span>{{ data.name }}</span>
|
||||
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
||||
</template>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="详细地址" prop="address">
|
||||
<el-input v-model="form.address" clearable :disabled="isViewMode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="血型ABO" prop="bloodAbo">
|
||||
<el-select
|
||||
v-model="form.bloodAbo"
|
||||
placeholder="血型ABO"
|
||||
clearable
|
||||
:disabled="isViewMode"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in bloodtypeaboList"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="血型RH" prop="bloodRh">
|
||||
<el-select v-model="form.bloodRh" placeholder="血型RH" clearable :disabled="isViewMode">
|
||||
<el-option
|
||||
v-for="item in bloodtypearhList"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="婚姻状态" prop="maritalStatusEnum">
|
||||
<el-select
|
||||
v-model="form.maritalStatusEnum"
|
||||
placeholder="婚姻状态"
|
||||
clearable
|
||||
:disabled="isViewMode"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in maritalstatusList"
|
||||
:key="item.value"
|
||||
:label="item.info"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="死亡时间" prop="deceasedDate">
|
||||
<el-date-picker
|
||||
v-model="form.deceasedDate"
|
||||
type="datetime"
|
||||
placeholder="请选择时间"
|
||||
format="YYYY/MM/DD HH:mm:ss"
|
||||
:disabled="isViewMode"
|
||||
value-format="YYYY/MM/DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #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="PatientAddDialog">
|
||||
import { watch } from "vue";
|
||||
import pcas from 'china-division/dist/pcas-code.json';
|
||||
import { addPatient, patientlLists, getOutpatientRegistrationList } from './outpatientregistration';
|
||||
import { fromPairs } from 'lodash';
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const {
|
||||
patient_gender_enum,
|
||||
sys_idtype,
|
||||
prfs_enum,
|
||||
blood_rh,
|
||||
blood_abo,
|
||||
marital_status_enum,
|
||||
patient_temp_flag,
|
||||
link_relation_code,
|
||||
nationality_code,
|
||||
} = proxy.useDict(
|
||||
'patient_gender_enum',
|
||||
'sys_idtype',
|
||||
'prfs_enum',
|
||||
'blood_rh',
|
||||
'blood_abo',
|
||||
'marital_status_enum',
|
||||
'patient_temp_flag',
|
||||
'link_relation_code',
|
||||
'nationality_code'
|
||||
);
|
||||
|
||||
const selectedOptions = ref([]); // v-model 绑定的选中值
|
||||
const maritalstatusList = ref([]); //婚姻
|
||||
const occupationtypeList = ref([]); //职业
|
||||
const administrativegenderList = ref([]); //性别
|
||||
const bloodtypeaboList = ref([]); //血型abo
|
||||
const bloodtypearhList = ref([]); //血型RH
|
||||
const familyrelationshiptypeList = ref([]); //家庭关系
|
||||
// 使用 ref 定义查询所得用户信息数据
|
||||
const patientInfo = ref(undefined);
|
||||
const addressCom = ref(''); //地址
|
||||
|
||||
const options = ref(pcas); // 地区数据
|
||||
|
||||
const title = ref('新增患者');
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||
|
||||
const data = reactive({
|
||||
isViewMode: false,
|
||||
form: {
|
||||
typeCode: '08',
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: '姓名不能为空', trigger: 'change' }],
|
||||
genderEnum: [{ required: true, message: '请选择性别', trigger: 'change' }],
|
||||
age: [{ required: true, message: '年龄不能为空', trigger: 'change' }],
|
||||
phone: [{ required: true, message: '联系方式不能为空', trigger: 'change' }],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules, isViewMode } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
watch(
|
||||
() => form.value.idCard,
|
||||
(newIdCard) => {
|
||||
if (newIdCard && newIdCard.length === 18) {
|
||||
const birthYear = parseInt(newIdCard.substring(6, 10));
|
||||
const birthMonth = parseInt(newIdCard.substring(10, 12));
|
||||
const birthDay = parseInt(newIdCard.substring(12, 14));
|
||||
|
||||
const today = new Date();
|
||||
const currentYear = today.getFullYear();
|
||||
const currentMonth = today.getMonth() + 1;
|
||||
const currentDay = today.getDate();
|
||||
|
||||
let age = currentYear - birthYear;
|
||||
|
||||
// 如果当前月份小于出生月份,或者月份相同但当前日期小于出生日期,则年龄减1
|
||||
if (
|
||||
currentMonth < birthMonth ||
|
||||
(currentMonth === birthMonth && currentDay < birthDay)
|
||||
) {
|
||||
age--;
|
||||
}
|
||||
|
||||
form.value.age = age;
|
||||
}
|
||||
}
|
||||
);
|
||||
/** 查询菜单列表 */
|
||||
function getList() {
|
||||
patientlLists().then((response) => {
|
||||
console.log(response);
|
||||
occupationtypeList.value = response.data.occupationType;
|
||||
administrativegenderList.value = response.data.sex;
|
||||
bloodtypeaboList.value = response.data.bloodTypeABO;
|
||||
bloodtypearhList.value = response.data.bloodTypeRH;
|
||||
familyrelationshiptypeList.value = response.data.familyRelationshipType;
|
||||
maritalstatusList.value = response.data.maritalStatus;
|
||||
});
|
||||
}
|
||||
|
||||
/** 打开用户信息弹窗 */
|
||||
function getPatientInfo(idCard) {
|
||||
const param = {
|
||||
searchKey: idCard,
|
||||
};
|
||||
getOutpatientRegistrationList(param).then((res) => {
|
||||
console.log(param, 'param');
|
||||
if (res.data.records.length > 0) {
|
||||
patientInfo.value = res.data.records[0];
|
||||
console.log(patientInfo.value, 'patientInfo.value');
|
||||
// 将表单数据发送给父组件
|
||||
emits('submit', patientInfo.value);
|
||||
}
|
||||
});
|
||||
}
|
||||
//地址选择
|
||||
const handleChange = () => {
|
||||
const checkedNodes = selectedOptions.value.map((code) => {
|
||||
const node = findNodeByCode(options.value, code);
|
||||
return node ? node.name : null;
|
||||
});
|
||||
form.value.addressProvince = checkedNodes[0] || '';
|
||||
form.value.addressCity = checkedNodes[1] || '';
|
||||
form.value.addressDistrict = checkedNodes[2] || '';
|
||||
form.value.addressStreet = checkedNodes[3] || '';
|
||||
form.value.address = '';
|
||||
};
|
||||
|
||||
// 递归查找节点
|
||||
const findNodeByCode = (data, code) => {
|
||||
for (const item of data) {
|
||||
if (item.code === code) return item;
|
||||
if (item.children) {
|
||||
const result = findNodeByCode(item.children, code);
|
||||
if (result) return result;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
// 显示弹框
|
||||
function show() {
|
||||
// queryParams.roleId = props.roleId;
|
||||
getList();
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
/** 表单重置 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
name: undefined,
|
||||
nameJson: undefined,
|
||||
menuName: undefined,
|
||||
age: undefined,
|
||||
genderEnum: undefined,
|
||||
typeCode: '08',
|
||||
idCard: undefined,
|
||||
phone: undefined,
|
||||
prfsEnum: undefined,
|
||||
address: undefined,
|
||||
tempFlag: undefined,
|
||||
countryCode: undefined,
|
||||
bloodRh: undefined,
|
||||
bloodAbo: undefined,
|
||||
nationalityCode: undefined,
|
||||
deceasedDate: undefined,
|
||||
linkName: undefined,
|
||||
linkRelationCode: undefined,
|
||||
linkTelcom: undefined,
|
||||
workCompany: undefined,
|
||||
addressCity: undefined,
|
||||
addressDistrict: undefined,
|
||||
addressStreet: undefined,
|
||||
addressProvince: undefined,
|
||||
maritalStatusEnum: undefined,
|
||||
busNo: undefined,
|
||||
organizationId: undefined,
|
||||
};
|
||||
proxy.resetForm('patientRef');
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
if (form.value.idCard) {
|
||||
form.value.birthDate =
|
||||
form.value.idCard.toString().substring(6, 10) +
|
||||
'-' +
|
||||
form.value.idCard.toString().substring(10, 12) +
|
||||
'-' +
|
||||
form.value.idCard.toString().substring(12, 14);
|
||||
console.log(form.value.birthDate, 123);
|
||||
}
|
||||
proxy.$refs['patientRef'].validate((valid) => {
|
||||
if (valid) {
|
||||
// 使用
|
||||
if (!form.value.identifierNo) {
|
||||
form.value.typeCode = undefined;
|
||||
}
|
||||
form.value.address = getAddress(form);
|
||||
addPatient(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess('新增成功');
|
||||
getPatientInfo(response.data.idCard);
|
||||
visible.value = false;
|
||||
reset();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// 获取完整地址字符串
|
||||
function getAddress(form) {
|
||||
const addressParts = [
|
||||
form.value.addressProvince,
|
||||
form.value.addressCity,
|
||||
form.value.addressDistrict,
|
||||
form.value.addressStreet,
|
||||
form.value.address,
|
||||
];
|
||||
|
||||
// 使用 reduce 方法拼接地址
|
||||
return addressParts.reduce((acc, part) => {
|
||||
return part ? acc + part : acc;
|
||||
}, '');
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
visible.value = false;
|
||||
reset();
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
|
||||
/* 使用深度选择器 */
|
||||
.custom-label-spacing :deep(.el-form-item__label) {
|
||||
line-height: 1.2; /* 调整行间距 */
|
||||
margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,182 @@
|
||||
<template>
|
||||
<!-- <div class="app-container"> -->
|
||||
<el-dialog :title="title" v-model="visible" width="800px" append-to-body>
|
||||
<el-table
|
||||
:data="patientInfoList"
|
||||
@selection-change="handleSelectionChange"
|
||||
width="90%"
|
||||
@cell-dblclick="handleCellDblClick"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="患者姓名"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="性别"
|
||||
align="center"
|
||||
key="genderEnum_enumText"
|
||||
prop="genderEnum_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="身份证号"
|
||||
align="center"
|
||||
key="idCard"
|
||||
prop="idCard"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="电话"
|
||||
align="center"
|
||||
key="phone"
|
||||
prop="phone"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="生日"
|
||||
align="center"
|
||||
key="birthDate"
|
||||
prop="birthDate"
|
||||
:show-overflow-tooltip="true"
|
||||
width="50"
|
||||
/>
|
||||
<el-table-column
|
||||
label="年龄"
|
||||
align="center"
|
||||
key="age"
|
||||
prop="age"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<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="PatientInfoDialog">
|
||||
import {
|
||||
getOutpatientRegistrationList,
|
||||
} from "./outpatientregistration";
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
|
||||
const patientInfoList = ref([]);
|
||||
const selectedData = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("病人信息");
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 品名/商品名/英文品名/编码/拼音
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
patientInfoData: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: () => ({}), // 提供默认值
|
||||
},
|
||||
searchInfo: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
patientInfoList.value = props.patientInfoData.records;
|
||||
total.value = props.patientInfoData.total;
|
||||
console.log(props.patientInfoData, "props.patientInfoData");
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
/** 查询病种目录列表 */
|
||||
function getList() {
|
||||
const query = {
|
||||
searchKey: props.searchInfo,
|
||||
pageNo: queryParams.value.pageNo,
|
||||
pageSize: queryParams.value.pageSize,
|
||||
};
|
||||
getOutpatientRegistrationList(query).then((res) => {
|
||||
if (res.data.records.length > 0) {
|
||||
patientInfoList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
console.log(patientInfoList.value, "patientInfoList.value");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, "selection");
|
||||
selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
visible.value = false;
|
||||
patientInfoList.value = [];
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
if (selectedData.value.length > 1) {
|
||||
proxy.$modal.msgSuccess("只能选中一条数据操作!");
|
||||
} else if (selectedData.value.length === 1) {
|
||||
console.log(selectedData.value[0], "selectedData.value");
|
||||
const data = selectedData.value[0];
|
||||
// 将表单数据发送给父组件
|
||||
emits("submit", data);
|
||||
}
|
||||
visible.value = false;
|
||||
}
|
||||
// 双击数据时触发的方法
|
||||
function handleCellDblClick(row, column, cell, event) {
|
||||
emits("submit", row);
|
||||
visible.value = false;
|
||||
// 获取整条数据
|
||||
console.log('双击的行数据:', row);
|
||||
// 根据需求进行进一步操作
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
height="400"
|
||||
:data="patientList"
|
||||
row-key="id"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column label="姓名" align="center" prop="name" />
|
||||
<el-table-column label="性别" align="center" prop="genderEnum_enumText" />
|
||||
<el-table-column label="证件号" align="center" prop="idCard" />
|
||||
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||
<el-table-column label="年龄" align="center" prop="age" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getOutpatientRegistrationList } from "./outpatientregistration";
|
||||
const props = defineProps({
|
||||
searchkey: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["selsectPatient"]);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
});
|
||||
const patientList = ref([]);
|
||||
|
||||
watch(
|
||||
() => props.searchkey,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue;
|
||||
getList();
|
||||
},
|
||||
{ immdiate: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
getOutpatientRegistrationList(queryParams.value).then((res) => {
|
||||
patientList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
function clickRow(row) {
|
||||
emit("selsectPatient", row);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,364 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="确认退费"
|
||||
v-model="props.open"
|
||||
width="700px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
>
|
||||
<div>
|
||||
<el-text size="large" style="display: block; margin-bottom: 15px">
|
||||
退费日期:{{ currentDate }}
|
||||
</el-text>
|
||||
<el-text size="large">费用性质:{{ '自费' }}</el-text>
|
||||
<div class="amount-row">
|
||||
<el-text size="large">应退金额:</el-text>
|
||||
<el-text size="large" type="primary" class="amount">
|
||||
{{ props.totalAmount.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)"
|
||||
/>
|
||||
</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>
|
||||
<div class="payment-container" style="position: relative">
|
||||
<span style="position: absolute; top: 5px">退费原因:</span>
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
v-model="reason"
|
||||
placeholder="退费原因"
|
||||
class="reason-textarea"
|
||||
@change="handleAmountChange"
|
||||
/>
|
||||
</div>
|
||||
<div class="add-payment">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="addPayment"
|
||||
:disabled="formData.selfPay.length >= 4 || remainingAmount <= 0"
|
||||
>
|
||||
添加退费方式
|
||||
</el-button>
|
||||
<el-text v-if="remainingAmount <= 0" type="danger" class="tip">
|
||||
金额已满足应退,不可继续添加
|
||||
</el-text>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 金额汇总 -->
|
||||
<div class="summary">
|
||||
<el-space :size="30">
|
||||
<div class="summary-item">
|
||||
<el-text type="info">实退合计:</el-text>
|
||||
<el-text type="success">{{ displayAmount + ' 元' }}</el-text>
|
||||
</div>
|
||||
<!-- <div class="summary-item">
|
||||
<el-text type="info">应找零:</el-text>
|
||||
<el-text type="warning">{{ returnedAmount + ' 元' }}</el-text>
|
||||
</div> -->
|
||||
</el-space>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
<el-button @click="close">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { cancelRegister } from './outpatientregistration';
|
||||
import { computed, watch, reactive, ref, getCurrentInstance } from 'vue';
|
||||
import { Delete } from '@element-plus/icons-vue';
|
||||
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
totalAmount: {
|
||||
type: Number,
|
||||
default: 0.0,
|
||||
},
|
||||
category: {
|
||||
type: String,
|
||||
},
|
||||
paymentId: {
|
||||
type: String,
|
||||
},
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
default: undefined,
|
||||
},
|
||||
chargeItemIds: {
|
||||
type: [],
|
||||
default: [],
|
||||
},
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const reason = ref('');
|
||||
|
||||
const formData = reactive({
|
||||
totalAmount: 0,
|
||||
selfPay: [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }],
|
||||
medicalInsurance: {
|
||||
account: '',
|
||||
poolPay: 0,
|
||||
personalPay: 0,
|
||||
},
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.totalAmount,
|
||||
(newValue) => {
|
||||
formData.totalAmount = newValue;
|
||||
formData.selfPay[0].amount = newValue;
|
||||
}
|
||||
);
|
||||
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
function submit() {
|
||||
console.log(props.chargeItemIds);
|
||||
|
||||
if (parseFloat(displayAmount.value) < formData.totalAmount) {
|
||||
proxy.$modal.msgError('请输入正确的金额');
|
||||
return;
|
||||
}
|
||||
cancelRegister({
|
||||
paymentEnum: 0,
|
||||
kindEnum: 1,
|
||||
patientId: props.patientInfo.patientId,
|
||||
id: props.paymentId,
|
||||
encounterId: props.patientInfo.encounterId,
|
||||
chargeItemIds: [],
|
||||
paymentDetails: formData.selfPay,
|
||||
reason: reason.value,
|
||||
ybFlag: '1',
|
||||
eleFlag: '0',
|
||||
// returnedAmount: parseFloat(returnedAmount.value),
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
emit('close', 'success');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const currentDate = ref(new Date().toLocaleString());
|
||||
|
||||
const selfPayMethods = [
|
||||
{ label: '现金', value: 220400 },
|
||||
{ label: '微信', value: 220100 },
|
||||
{ label: '支付宝', value: 220200 },
|
||||
{ label: '银联', value: 220300 },
|
||||
];
|
||||
|
||||
// 计算剩余可输入金额
|
||||
const remainingAmount = computed(() => {
|
||||
return (
|
||||
formData.totalAmount - formData.selfPay.reduce((sum, item) => sum + Number(item.amount), 0)
|
||||
);
|
||||
});
|
||||
|
||||
// 获取单个支付方式的最大可输入金额
|
||||
const getMax = (index) => {
|
||||
const otherSum = formData.selfPay.reduce(
|
||||
(sum, item, i) => (i !== index ? sum + Number(item.amount) : sum),
|
||||
0
|
||||
);
|
||||
if (formData.selfPay[index].payEnum == 220400) {
|
||||
return formData.totalAmount + 100 - otherSum;
|
||||
}
|
||||
return formData.totalAmount - otherSum;
|
||||
};
|
||||
|
||||
// 检查支付方式是否已使用
|
||||
const isMethodDisabled = (payEnum) => {
|
||||
return formData.selfPay.some((item) => item.payEnum === payEnum);
|
||||
};
|
||||
|
||||
const handleAmountChange = () => {
|
||||
// 不需要在这里直接设置 returnedAmount,依赖 computed 属性
|
||||
};
|
||||
|
||||
const addPayment = () => {
|
||||
if (remainingAmount.value <= 0) {
|
||||
return;
|
||||
}
|
||||
formData.selfPay.push({ payEnum: '', amount: remainingAmount.value });
|
||||
};
|
||||
|
||||
const removePayment = (index) => {
|
||||
formData.selfPay.splice(index, 1);
|
||||
};
|
||||
|
||||
const clearAmount = (index) => {
|
||||
// formData.selfPay[index].amount = 0;
|
||||
};
|
||||
|
||||
// 计算属性
|
||||
const displayAmount = computed(() => {
|
||||
return formData.selfPay.reduce((sum, item) => sum + (Number(item.amount) || 0), 0).toFixed(2);
|
||||
});
|
||||
|
||||
const returnedAmount = computed(() => {
|
||||
const display = parseFloat(displayAmount.value);
|
||||
if (isNaN(display) || display <= 0) {
|
||||
return '0.00';
|
||||
}
|
||||
const returned = display - formData.totalAmount;
|
||||
return returned >= 0 ? returned.toFixed(2) : '0.00';
|
||||
});
|
||||
|
||||
function close() {
|
||||
emit('close');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.pagination-container .el-pagination) {
|
||||
right: 20px !important;
|
||||
}
|
||||
.charge-container {
|
||||
max-width: 600px;
|
||||
margin: 20px auto;
|
||||
padding: 20px 30px;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.amount-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.amount {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.payment-type {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.payment-container {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.payment-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.amount-input {
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
.add-payment {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
.reason-textarea {
|
||||
margin-left: 80px;
|
||||
width: 59%;
|
||||
}
|
||||
.tip {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.summary {
|
||||
margin: 25px 0;
|
||||
padding: 15px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.summary-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
text-align: center;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.el-text.el-text--success {
|
||||
font-size: 18px !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.el-text.el-text--warning {
|
||||
font-size: 18px !important;
|
||||
font-weight: 500;
|
||||
}
|
||||
.suffix-wrapper {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.suffix-text {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #999;
|
||||
pointer-events: none; /* 避免点击干扰 */
|
||||
}
|
||||
|
||||
/* 调整输入框内边距 */
|
||||
.amount-input .el-input__inner {
|
||||
padding-right: 30px !important;
|
||||
}
|
||||
</style>
|
||||
1321
openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue
Normal file
1321
openhis-ui-vue3/src/views/charge/outpatientregistration/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
2
openhis-ui-vue3/src/views/charge/schedule/index.vue
Normal file
2
openhis-ui-vue3/src/views/charge/schedule/index.vue
Normal file
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
@@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<div @keyup="handleKeyDown" tabindex="0" ref="tableWrapper">
|
||||
<el-table
|
||||
ref="adviceBaseRef"
|
||||
height="400"
|
||||
:data="adviceBaseList"
|
||||
highlight-current-row
|
||||
@current-change="handleCurrentChange"
|
||||
row-key="patientId"
|
||||
@cell-click="clickRow"
|
||||
>
|
||||
<el-table-column label="名称" align="center" prop="adviceName" />
|
||||
<el-table-column label="类型" align="center" prop="activityType_enumText" />
|
||||
<el-table-column label="包装单位" align="center" prop="unitCode_dictText" />
|
||||
<el-table-column label="最小单位" align="center" prop="minUnitCode_dictText" />
|
||||
<el-table-column label="规格" align="center" prop="volume" />
|
||||
<el-table-column label="用法" align="center" prop="methodCode_dictText" />
|
||||
<el-table-column label="频次" align="center" prop="rateCode_dictText" />
|
||||
<el-table-column label="单次剂量" align="center" prop="dose" />
|
||||
<el-table-column label="剂量单位" align="center" prop="doseUnitCode_dictText" />
|
||||
<el-table-column label="注射药品" align="center" prop="injectFlag_enumText" />
|
||||
<el-table-column label="皮试" align="center" prop="skinTestFlag_enumText" />
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { nextTick } from 'vue';
|
||||
import { getAdviceBaseInfo } from './api';
|
||||
import { throttle } from 'lodash-es';
|
||||
|
||||
const props = defineProps({
|
||||
adviceQueryParams: {
|
||||
type: Object,
|
||||
default: '',
|
||||
},
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['selectAdviceBase']);
|
||||
const total = ref(0);
|
||||
const adviceBaseRef = ref();
|
||||
const tableWrapper = ref();
|
||||
const currentIndex = ref(0); // 当前选中行索引
|
||||
const currentSelectRow = ref({});
|
||||
const queryParams = ref({
|
||||
pageSize: 100,
|
||||
pageNum: 1,
|
||||
});
|
||||
const adviceBaseList = ref([]);
|
||||
// 节流函数
|
||||
const throttledGetList = throttle(
|
||||
() => {
|
||||
getList();
|
||||
},
|
||||
300,
|
||||
{ leading: true, trailing: true }
|
||||
);
|
||||
watch(
|
||||
() => props.adviceQueryParams,
|
||||
(newValue) => {
|
||||
queryParams.value.searchKey = newValue.searchKey;
|
||||
queryParams.value.adviceType = newValue.adviceType;
|
||||
throttledGetList();
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
queryParams.value.organizationId = props.patientInfo.orgId;
|
||||
getAdviceBaseInfo(queryParams.value).then((res) => {
|
||||
adviceBaseList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
nextTick(() => {
|
||||
currentIndex.value = 0;
|
||||
if (adviceBaseList.value.length > 0) {
|
||||
adviceBaseRef.value.setCurrentRow(adviceBaseList.value[0]);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 处理键盘事件
|
||||
const handleKeyDown = (event) => {
|
||||
const key = event.key;
|
||||
const data = adviceBaseList.value;
|
||||
|
||||
switch (key) {
|
||||
case 'ArrowUp': // 上箭头
|
||||
event.preventDefault(); // 阻止默认滚动行为
|
||||
if (currentIndex.value > 0) {
|
||||
currentIndex.value--;
|
||||
setCurrentRow(data[currentIndex.value]);
|
||||
}
|
||||
break;
|
||||
case 'ArrowDown': // 下箭头`
|
||||
event.preventDefault();
|
||||
if (currentIndex.value < data.length - 1) {
|
||||
currentIndex.value++;
|
||||
setCurrentRow(data[currentIndex.value]);
|
||||
}
|
||||
break;
|
||||
case 'Enter': // 回车键
|
||||
// const currentRow = adviceBaseRef.value.getSelectionRows();
|
||||
event.preventDefault();
|
||||
if (currentSelectRow.value) {
|
||||
// 这里可以触发自定义逻辑,如弹窗、跳转等
|
||||
emit('selectAdviceBase', currentSelectRow.value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
// 设置选中行(带滚动)
|
||||
const setCurrentRow = (row) => {
|
||||
adviceBaseRef.value.setCurrentRow(row);
|
||||
// 滚动到选中行
|
||||
const tableBody = adviceBaseRef.value.$el.querySelector('.el-table__body-wrapper');
|
||||
const currentRowEl = adviceBaseRef.value.$el.querySelector('.current-row');
|
||||
if (tableBody && currentRowEl) {
|
||||
currentRowEl.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
||||
}
|
||||
};
|
||||
|
||||
// 当前行变化时更新索引
|
||||
const handleCurrentChange = (currentRow) => {
|
||||
currentIndex.value = adviceBaseList.value.findIndex((item) => item === currentRow);
|
||||
currentSelectRow.value = currentRow;
|
||||
};
|
||||
|
||||
function clickRow(row) {
|
||||
emit('selectAdviceBase', row);
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
handleKeyDown,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.popover-table-wrapper:focus {
|
||||
outline: 2px solid #409eff; /* 聚焦时的高亮效果 */
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,202 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 获取患者列表
|
||||
*/
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/charge-manage/pricing/patient-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 处方相关接口
|
||||
/**
|
||||
* 获取药品列表
|
||||
*/
|
||||
export function getAdviceBaseInfo(queryParams) {
|
||||
return request({
|
||||
url: '/charge-manage/pricing/advice-base-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 保存处方(单条)
|
||||
*/
|
||||
export function savePrescription(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/save-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 签发处方
|
||||
*/
|
||||
export function savePrescriptionSign(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/sign-advice',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 处方签退
|
||||
*/
|
||||
export function singOut(data) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/sign-off',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 获取患者本次就诊处方
|
||||
*/
|
||||
export function getPrescriptionList(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/request-base-info?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 获取科室列表
|
||||
*/
|
||||
export function getOrgTree() {
|
||||
return request({
|
||||
url: '/base-data-manage/organization/organization',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 获取退费账单
|
||||
*/
|
||||
export function getEncounterPatientPayment(encounterId) {
|
||||
return request({
|
||||
url: '/charge-manage/refund/patient-payment?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 申请退费
|
||||
*/
|
||||
export function refundPayment(data) {
|
||||
return request({
|
||||
url: '/charge-manage/refund/refund-payment',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 电子处方相关接口
|
||||
/**
|
||||
* 电子处方查询
|
||||
*/
|
||||
export function getVeriPrescriptionInfo(queryParams) {
|
||||
return request({
|
||||
url: '/ybelep-request/get-PrescriptionInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 处方开立相关接口
|
||||
/**
|
||||
* 获取全部药品信息
|
||||
*/
|
||||
export function getAllMedicationInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/get-allMedicationInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 电子处方下拉框
|
||||
*/
|
||||
export function elepPrescriptionInit() {
|
||||
return request({
|
||||
url: '/doctor-station/elep/init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取处方信息
|
||||
*/
|
||||
export function getPrescriptionInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/get-prescriptionInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取药品信息
|
||||
*/
|
||||
export function getMedicationInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/get-medicationInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单据号
|
||||
*/
|
||||
export function prescriptionNoInit() {
|
||||
return request({
|
||||
url: '/doctor-station/elep/prescriptionNoInit',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增处方
|
||||
*/
|
||||
export function savePrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/save-prescriptionInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改处方
|
||||
*/
|
||||
export function updatePrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/update-prescriptionInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除处方
|
||||
*/
|
||||
export function deletePrescriptionInfo(data) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/delete-prescriptionInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 签发处方
|
||||
*/
|
||||
export function issuancePrescription(prescriptionNoList) {
|
||||
return request({
|
||||
url: '/doctor-station/elep/issuance-prescription',
|
||||
method: 'post',
|
||||
data: prescriptionNoList
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,797 @@
|
||||
<template>
|
||||
<div style="width: 100%">
|
||||
<div style="margin-bottom: 5px">
|
||||
<el-button type="primary" @click="handleAddPrescription()" :disabled="false">
|
||||
新增
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleSave()" :disabled="handleSaveDisabled"> 签发 </el-button>
|
||||
<el-button type="warning" plain @click="handleSingOut()" :disabled="handleSingOutDisabled"> 签退 </el-button>
|
||||
<!-- <el-button type="primary" plain @click="open()" :disabled="false"> 组套 </el-button> -->
|
||||
<el-button type="danger" plain @click="handleDelete()" :disabled="false"> 删除 </el-button>
|
||||
</div>
|
||||
<el-table
|
||||
max-height="650"
|
||||
ref="prescriptionRef"
|
||||
:data="prescriptionList"
|
||||
row-key="uniqueKey"
|
||||
border
|
||||
@row-dblclick="clickRowDb"
|
||||
: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 style="padding: 16px; background: #f8f9fa; border-radius: 8px">
|
||||
<template v-if="scope.row.adviceType == 2">
|
||||
<div style="display: flex; align-items: center; margin-bottom: 16px; gap: 16px">
|
||||
<span style="font-size: 16px; font-weight: 600">
|
||||
{{
|
||||
scope.row.adviceName +
|
||||
' ' +
|
||||
scope.row.volume +
|
||||
' ' +
|
||||
scope.row.unitPrice +
|
||||
' 元/' +
|
||||
scope.row.unitCode_dictText
|
||||
}}
|
||||
</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 +
|
||||
' ' +
|
||||
'批次号: ' +
|
||||
item.lotNumber +
|
||||
' ' +
|
||||
' 库存:' +
|
||||
item.quantity / scope.row.partPercent +
|
||||
item.unitCode_dictText +
|
||||
' 单价:' +
|
||||
item.price.toFixed(2) +
|
||||
'/' +
|
||||
item.unitCode_dictText
|
||||
"
|
||||
@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"
|
||||
@keyup.enter.prevent="handleEnter('quantity', 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)"
|
||||
>
|
||||
<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"
|
||||
/>
|
||||
</template>
|
||||
</el-select>
|
||||
<span class="total-amount">
|
||||
总金额:{{ scope.row.totalPrice ? scope.row.totalPrice + ' 元' : '0.00 元' }}
|
||||
</span>
|
||||
</div>
|
||||
<el-button type="primary" @click="handleSaveSign(scope.row, scope.$index)">
|
||||
保存
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="display: flex; align-items: center; margin-bottom: 16px; gap: 16px">
|
||||
<span style="font-size: 16px; font-weight: 600">
|
||||
{{
|
||||
scope.row.adviceName + ' ' + scope.row.unitPrice
|
||||
? Number(scope.row.unitPrice).toFixed(2)
|
||||
: '-' + '元'
|
||||
}}
|
||||
</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"
|
||||
@keyup.enter.prevent="handleEnter('quantity', scope.row, scope.$index)"
|
||||
@input="calculateTotalPrice(scope.row, scope.$index)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-tree-select
|
||||
clearable
|
||||
v-model="scope.row.orgId"
|
||||
:data="organization"
|
||||
:props="{ value: 'id', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
check-strictly
|
||||
placeholder="请选择执行科室"
|
||||
/>
|
||||
<span class="total-amount">
|
||||
总金额:{{ scope.row.totalPrice ? scope.row.totalPrice + ' 元' : '0.00 元' }}
|
||||
</span>
|
||||
<span style="font-size: 16px; font-weight: 600">
|
||||
<!-- 金额: {{ scope.row.priceList[0].price }} -->
|
||||
</span>
|
||||
</div>
|
||||
<el-button type="primary" @click="handleSaveSign(scope.row, scope.$index)">
|
||||
保存
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="" align="center" prop="groupId" width="60">
|
||||
<template #default="scope">
|
||||
<el-checkbox
|
||||
:disabled = "scope.row.bizRequestFlag==0"
|
||||
v-model="scope.row.check"
|
||||
placeholder=""
|
||||
@click.stop=""
|
||||
@change="changeCheck(scope.row.check,scope.$index,scope.row)"
|
||||
/>
|
||||
</template>
|
||||
<!-- (value) => {
|
||||
if (value) {
|
||||
groupIndexList.push(scope.$index);
|
||||
} else {
|
||||
groupIndexList.splice(groupIndexList.indexOf(scope.$index), 1);
|
||||
}
|
||||
} -->
|
||||
</el-table-column>
|
||||
<el-table-column label="项目" align="center" prop="productName" width="400">
|
||||
<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="
|
||||
(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"
|
||||
@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="props.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="
|
||||
(e) => {
|
||||
if (!scope.row.showPopover) return;
|
||||
// 拦截上下键和回车事件
|
||||
if (['ArrowUp', 'ArrowDown', 'Enter'].includes(e.key)) {
|
||||
e.preventDefault();
|
||||
// 传递事件到弹窗容器
|
||||
adviceTableRef.handleKeyDown(e);
|
||||
}
|
||||
}
|
||||
"
|
||||
@blur="handleBlur(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-popover>
|
||||
</template>
|
||||
<span v-else>{{ scope.row.adviceName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="" width="90">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.statusEnum == 2" type="success">已签发</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum == 1" type="">待签发</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总量" align="center" prop="">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">
|
||||
{{ scope.row.quantity ? scope.row.quantity + ' ' + scope.row.unitCode_dictText : '' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" align="right" prop="" header-align="center">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit" style="text-align: right">
|
||||
{{ scope.row.totalPrice ? Number(scope.row.totalPrice).toFixed(2) + ' 元' : '-' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="药房/科室" align="center" prop="" width="240">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">
|
||||
{{ scope.row.positionName }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="签发人" align="center" prop="" width="240">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">
|
||||
{{ scope.row.requesterId_dictText }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="签发时间" align="center" prop="" width="240">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">
|
||||
{{ scope.row.requestTime }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
savePrescription,
|
||||
getPrescriptionList,
|
||||
getOrgTree,
|
||||
savePrescriptionSign,
|
||||
singOut,
|
||||
} from './api';
|
||||
import adviceBaseList from './adviceBaseList';
|
||||
import { getCurrentInstance, nextTick, ref, watch } from 'vue';
|
||||
|
||||
const emit = defineEmits(['selectDiagnosis']);
|
||||
const prescriptionList = ref([]);
|
||||
const form = ref({
|
||||
prescriptionList: prescriptionList.value,
|
||||
});
|
||||
const adviceQueryParams = ref({});
|
||||
const rowIndex = ref(-1);
|
||||
const groupIndexList = ref([]);
|
||||
const nextId = ref(1);
|
||||
const unitCodeList = ref([]);
|
||||
const adviceTableRef = ref([]);
|
||||
const organization = ref([]);
|
||||
const rowRules = ref({
|
||||
conditionDefinitionId: [{ required: true, message: '请选择诊断', trigger: 'change' }],
|
||||
dose: [{ required: true, message: '请输入单次剂量', trigger: 'change' }],
|
||||
doseQuantity: [{ required: true, message: '请输入单次剂量', trigger: 'change' }],
|
||||
quantity: [{ required: true, message: '请输入数量', trigger: 'change' }],
|
||||
dispensePerDuration: [{ required: true, message: '请输入用药天数', trigger: 'change' }],
|
||||
});
|
||||
const unitMap = ref({
|
||||
dose: 'dose',
|
||||
minUnit: 'minUnit',
|
||||
unit: 'unit',
|
||||
});
|
||||
const props = defineProps({
|
||||
patientInfo: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
activeTab: {
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
const isAdding = ref(false);
|
||||
const prescriptionRef = ref();
|
||||
const expandOrder = ref([]); //目前的展开行
|
||||
const stockList = ref([]);
|
||||
const groupList = ref([])
|
||||
const { proxy } = getCurrentInstance();
|
||||
const inputRefs = ref({}); // 存储输入框实例
|
||||
const requiredProps = ref([]); // 存储必填项 prop 顺序
|
||||
const { method_code, unit_code, rate_code, distribution_category_code } = proxy.useDict(
|
||||
'method_code',
|
||||
'unit_code',
|
||||
'rate_code',
|
||||
'distribution_category_code'
|
||||
);
|
||||
const handleSaveDisabled = ref(false) //签发状态
|
||||
const handleSingOutDisabled = ref(false) //签退状态
|
||||
const adviceTypeList = ref([
|
||||
{
|
||||
label: '耗材',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
label: '诊疗',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
label: '全部',
|
||||
value: undefined,
|
||||
},
|
||||
]);
|
||||
watch(
|
||||
() => expandOrder.value,
|
||||
(newValue) => {
|
||||
console.log(newValue,"监听·")
|
||||
if (newValue.length > 0) {
|
||||
nextTick(() => {
|
||||
|
||||
const index = prescriptionList.value.findIndex((row) => row.uniqueKey === newValue[0]);
|
||||
const items = proxy.$refs['formRef' + index]?.$el?.querySelectorAll('[data-prop]');
|
||||
requiredProps.value = Array.from(items).map((item) => item.dataset.prop);
|
||||
});
|
||||
} else {
|
||||
requiredProps.value = {};
|
||||
}
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => prescriptionList.value,
|
||||
(newValue) => {
|
||||
console.log(prescriptionList.value,"prescriptionList.value")
|
||||
if(newValue&&newValue.length>0){
|
||||
let saveList = prescriptionList.value.filter((item) => {
|
||||
return item.statusEnum == 1&&(Number(item.bizRequestFlag)==1||!item.bizRequestFlag)
|
||||
})
|
||||
prescriptionList.value.map(k=>{
|
||||
k.check = false
|
||||
})
|
||||
console.log(saveList,"prescriptionList.value")
|
||||
if (saveList.length == 0) {
|
||||
handleSaveDisabled.value = true
|
||||
}else{
|
||||
handleSaveDisabled.value = false
|
||||
}
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
function getListInfo(addNewRow) {
|
||||
isAdding.value = false;
|
||||
getPrescriptionList(props.patientInfo.encounterId).then((res) => {
|
||||
prescriptionList.value = res.data;
|
||||
if (props.activeTab == 'prescription' && addNewRow) {
|
||||
handleAddPrescription();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getRowDisabled(row) {
|
||||
return row.isEdit;
|
||||
}
|
||||
|
||||
// 新增医嘱
|
||||
function handleAddPrescription() {
|
||||
if (isAdding.value) {
|
||||
proxy.$modal.msgWarning('请先保存当前医嘱');
|
||||
return;
|
||||
}
|
||||
isAdding.value = true;
|
||||
// 在数组最前方添加一行,让新增行显示在最上边
|
||||
prescriptionList.value.unshift({
|
||||
uniqueKey: nextId.value++,
|
||||
showPopover: false,
|
||||
check: false,
|
||||
isEdit: true,
|
||||
statusEnum: 1,
|
||||
});
|
||||
nextTick(() => {
|
||||
proxy.$refs['adviceRef0'].focus();
|
||||
});
|
||||
}
|
||||
|
||||
// 行双击打开编辑块,仅待发送的可编辑
|
||||
function clickRowDb(row) {
|
||||
if (row.statusEnum == 1) {
|
||||
row = { ...row, ...JSON.parse(row.contentJson) };
|
||||
row.isEdit = true;
|
||||
const index = prescriptionList.value.findIndex((item) => item.uniqueKey === row.uniqueKey);
|
||||
prescriptionList.value[index] = row;
|
||||
console.log(prescriptionList.value,"prescriptionList.value")
|
||||
expandOrder.value = [row.uniqueKey];
|
||||
}
|
||||
}
|
||||
|
||||
function handleDiagnosisChange(item, row) {
|
||||
row.diagnosisName = item.name;
|
||||
row.conditionId = item.conditionId;
|
||||
}
|
||||
|
||||
function handleFocus(row, index) {
|
||||
rowIndex.value = index;
|
||||
row.showPopover = true;
|
||||
}
|
||||
|
||||
function handleBlur(row) {
|
||||
row.showPopover = false;
|
||||
}
|
||||
|
||||
function handleChange(value) {
|
||||
adviceQueryParams.value.searchKey = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择药品回调
|
||||
*/
|
||||
function selectAdviceBase(key, row) {
|
||||
getOrgList();
|
||||
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',
|
||||
});
|
||||
}
|
||||
prescriptionList.value[rowIndex.value] = {
|
||||
...prescriptionList.value[rowIndex.value],
|
||||
...JSON.parse(JSON.stringify(row)),
|
||||
};
|
||||
prescriptionList.value[rowIndex.value].orgId = undefined;
|
||||
prescriptionList.value[rowIndex.value].dose = undefined;
|
||||
prescriptionList.value[rowIndex.value].unitCodeList = unitCodeList.value;
|
||||
prescriptionList.value[rowIndex.value].doseUnitCode =
|
||||
row.minUnitCode != row.unitCode ? row.minUnitCode : row.unitCode;
|
||||
prescriptionList.value[rowIndex.value].minUnitCode = JSON.parse(JSON.stringify(row.doseUnitCode));
|
||||
prescriptionList.value[rowIndex.value].unitCode =
|
||||
row.partAttributeEnum == 1 ? row.minUnitCode : row.unitCode;
|
||||
// prescriptionList.value[rowIndex.value].doseUnitCode_dictText = row.minUnitCode_dictText;
|
||||
prescriptionList.value[rowIndex.value].definitionId = JSON.parse(
|
||||
JSON.stringify(row)
|
||||
).chargeItemDefinitionId;
|
||||
|
||||
// 库存列表 + 价格列表拼成批次号的下拉框
|
||||
if (row.adviceType != 3) {
|
||||
if (row.inventoryList && row.inventoryList.length == 0) {
|
||||
expandOrder.value = [];
|
||||
proxy.$modal.msgWarning('该项目无库存');
|
||||
return;
|
||||
}
|
||||
stockList.value = row.inventoryList.map((item, index) => {
|
||||
return { ...item, ...row.priceList[index] };
|
||||
});
|
||||
prescriptionList.value[rowIndex.value].stockList = stockList.value;
|
||||
// 获取默认批次号的库存,如果没有让医生重新选
|
||||
let stock = stockList.value.filter((item) => {
|
||||
return item.lotNumber == row.defaultLotNumber;
|
||||
})[0];
|
||||
if (stock != {} && stock != undefined) {
|
||||
if (stock.quantity <= 0) {
|
||||
proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
|
||||
// return;
|
||||
}
|
||||
prescriptionList.value[rowIndex.value].lotNumber = stock.lotNumber;
|
||||
prescriptionList.value[rowIndex.value].inventoryId = stock.inventoryId;
|
||||
prescriptionList.value[rowIndex.value].locationId = stock.locationId;
|
||||
prescriptionList.value[rowIndex.value].unitPrice = stock.price;
|
||||
prescriptionList.value[rowIndex.value].positionName = stock.locationName;
|
||||
}
|
||||
} else {
|
||||
prescriptionList.value[rowIndex.value].orgId = JSON.parse(JSON.stringify(row)).positionId;
|
||||
prescriptionList.value[rowIndex.value].unitPrice = row.priceList[0].price;
|
||||
}
|
||||
expandOrder.value = [key];
|
||||
nextTick(() => {
|
||||
if (row.adviceType == 1) {
|
||||
if (row.injectFlag == 1) {
|
||||
inputRefs.value['executeNum']?.focus();
|
||||
} else {
|
||||
inputRefs.value['dose']?.focus();
|
||||
}
|
||||
} else {
|
||||
inputRefs.value['quantity']?.focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getOrgList() {
|
||||
getOrgTree().then((res) => {
|
||||
organization.value = res.data.records;
|
||||
console.log(organization.value,"organization.value")
|
||||
});
|
||||
}
|
||||
|
||||
function handleDelete() {
|
||||
let deleteList = prescriptionList.value
|
||||
.filter((item) => {
|
||||
return item.check && item.statusEnum == 1;
|
||||
})
|
||||
.map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
dbOpType: '3',
|
||||
adviceType: item.adviceType,
|
||||
};
|
||||
});
|
||||
if (deleteList.length == 0) {
|
||||
proxy.$modal.msgWarning('请选择要删除的项目');
|
||||
return;
|
||||
}
|
||||
if (!deleteList[0].requestId) {
|
||||
prescriptionList.value.shift();
|
||||
} else {
|
||||
savePrescription({ adviceSaveList: deleteList }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
getListInfo(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
// groupIndexList.value
|
||||
// .sort((a, b) => b - a)
|
||||
// .forEach((item) => {
|
||||
// prescriptionList.value.splice(item, 1);
|
||||
// });
|
||||
// groupIndexList.value = [];
|
||||
expandOrder.value = [];
|
||||
isAdding.value = false;
|
||||
adviceQueryParams.value.adviceType = undefined;
|
||||
// prescriptionList.value.splice(index, 1);
|
||||
}
|
||||
|
||||
function handleNumberClick(item, index) {
|
||||
prescriptionList.value[index].unitPrice = item.price;
|
||||
// prescriptionList.value[index].lotNumber = item.lotNumber;
|
||||
prescriptionList.value[index].locationId = item.locationId;
|
||||
prescriptionList.value[index].positionId = item.locationId;
|
||||
prescriptionList.value[index].positionName = item.locationName;
|
||||
}
|
||||
function changeCheck(value,index,row){
|
||||
if (value) {
|
||||
groupIndexList.value.push(index)
|
||||
groupList.value.push(row)
|
||||
} else {
|
||||
groupIndexList.value.splice(groupIndexList.value.indexOf(index), 1)
|
||||
groupList.value.splice(groupList.value.indexOf(index), 1)
|
||||
}
|
||||
groupList.value.map(k=>{
|
||||
if(k.check){
|
||||
if(k.statusEnum == 1){//待签发
|
||||
if(Number(k.bizRequestFlag)==1||!k.bizRequestFlag){
|
||||
if(handleSaveDisabled.value&&!handleSingOutDisabled.value&&groupList.value.length>1){
|
||||
proxy.$modal.msgWarning('请选择相同的状态的项目进行操作')
|
||||
return
|
||||
}else{
|
||||
handleSaveDisabled.value = false
|
||||
handleSingOutDisabled.value = true
|
||||
}
|
||||
}else{
|
||||
handleSaveDisabled.value = true
|
||||
handleSingOutDisabled.value = true
|
||||
return
|
||||
}
|
||||
}
|
||||
if(k.statusEnum == 2){ //已签发
|
||||
if(Number(k.bizRequestFlag)==1||!k.bizRequestFlag){
|
||||
if(!handleSaveDisabled.value&&handleSingOutDisabled.value&&groupList.value.length>1){
|
||||
proxy.$modal.msgWarning('请选择相同的状态的项目进行操作')
|
||||
return
|
||||
}else{
|
||||
handleSaveDisabled.value = true
|
||||
handleSingOutDisabled.value = false
|
||||
}
|
||||
}else{
|
||||
handleSaveDisabled.value = true
|
||||
handleSingOutDisabled.value = true
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(groupIndexList.value,"!21")
|
||||
}
|
||||
/**
|
||||
* 保存处方
|
||||
*/
|
||||
function handleSave() {
|
||||
if (expandOrder.value.length > 0) {
|
||||
proxy.$modal.msgWarning('请先保存当前医嘱');
|
||||
return;
|
||||
}
|
||||
let saveList = prescriptionList.value.filter((item) => {
|
||||
return item.statusEnum == 1&&(Number(item.bizRequestFlag)==1||!item.bizRequestFlag)
|
||||
});
|
||||
// let saveList = prescriptionList.value
|
||||
// .filter((item) => {
|
||||
// return item.check;
|
||||
// }).filter((item) => {
|
||||
// return item.statusEnum == 1&&item.bizRequestFlag==1
|
||||
// })
|
||||
|
||||
// if (saveList.length == 0) {
|
||||
// proxy.$modal.msgWarning('当前无可签发处方');
|
||||
// return;
|
||||
// }
|
||||
// 此处签发处方和单行保存处方传参相同,后台已经将传参存为JSON字符串,此处直接转换为JSON即可
|
||||
let list = saveList.map((item) => {
|
||||
return {
|
||||
...JSON.parse(item.contentJson),
|
||||
requestId: item.requestId,
|
||||
dbOpType: '1',
|
||||
groupId: item.groupId,
|
||||
};
|
||||
});
|
||||
savePrescriptionSign({
|
||||
organizationId: props.patientInfo.orgId,
|
||||
adviceSaveList: list,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('保存成功');
|
||||
getListInfo(false);
|
||||
prescriptionList.value.map(k=>{
|
||||
k.check = false
|
||||
})
|
||||
groupIndexList.value = []
|
||||
groupList.value = []
|
||||
nextId.value == 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 单行处方保存
|
||||
function handleSaveSign(row, index) {
|
||||
proxy.$refs['formRef' + index].validate((valid) => {
|
||||
if (valid) {
|
||||
row.isEdit = false;
|
||||
isAdding.value = false;
|
||||
expandOrder.value = [];
|
||||
row.patientId = props.patientInfo.patientId;
|
||||
row.encounterId = props.patientInfo.encounterId;
|
||||
row.accountId = props.patientInfo.accountId;
|
||||
row.contentJson = JSON.stringify(row);
|
||||
row.dbOpType = row.requestId ? '2' : '1';
|
||||
row.minUnitQuantity = row.quantity * row.partPercent;
|
||||
savePrescription({ adviceSaveList: [row] }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
proxy.$modal.msgSuccess('保存成功');
|
||||
// getListInfo(true);
|
||||
nextId.value == 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 签退
|
||||
function handleSingOut() {
|
||||
let requestIdList = prescriptionList.value
|
||||
.filter((item) => {
|
||||
return item.check;
|
||||
})
|
||||
.filter((item) => {
|
||||
return item.statusEnum == 2&&(Number(item.bizRequestFlag)==1||!item.bizRequestFlag)
|
||||
})
|
||||
.map((item) => {
|
||||
return item.requestId;
|
||||
});
|
||||
console.log(requestIdList,"签退")
|
||||
if (requestIdList.length == 0) {
|
||||
proxy.$modal.msgWarning('未选择可签退的医嘱');
|
||||
return
|
||||
}
|
||||
singOut(requestIdList).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
getListInfo(false);
|
||||
console.log( prescriptionList.value," groupIndexList.value")
|
||||
prescriptionList.value.map(k=>{
|
||||
k.check = false
|
||||
})
|
||||
groupIndexList.value = []
|
||||
groupList.value = []
|
||||
}
|
||||
});
|
||||
}
|
||||
defineExpose({ getListInfo });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-table__expand-icon) {
|
||||
display: none !important;
|
||||
}
|
||||
.medicine-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
min-width: 280px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.total-amount {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #409eff;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.medicine-info {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #606266;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
background: #fff;
|
||||
padding: 6px 10px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ebeef5;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
/* 调整element组件默认间距 */
|
||||
// .el-select,
|
||||
// .el-input-number {
|
||||
// margin-right: 0 !important;
|
||||
// }
|
||||
|
||||
.el-input-number .el-input__inner {
|
||||
text-align: center;
|
||||
}
|
||||
.el-table__cell .el-form-item--default {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
327
openhis-ui-vue3/src/views/clinicmanagement/bargain/index.vue
Normal file
327
openhis-ui-vue3/src/views/clinicmanagement/bargain/index.vue
Normal file
@@ -0,0 +1,327 @@
|
||||
<template>
|
||||
<div style="display: flex; justify-content: space-between; height: 90vh">
|
||||
<div style="width: 15%; height: 100%; border: 1px solid #eee; border-right: 0">
|
||||
<div style="padding: 10px; border: 1px solid #eee; height: 50px; border-right: 0">
|
||||
<span>现诊患者</span>
|
||||
</div>
|
||||
<div style="width: 100%; padding: 10px">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="请输入患者名"
|
||||
clearable
|
||||
style="width: 100%; margin-bottom: 10px"
|
||||
@keyup.enter="getPatientList"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="getPatientList" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-scrollbar height="700px">
|
||||
<div
|
||||
v-for="(item, index) in patientList"
|
||||
:class="item.active ? 'patient-card actived' : 'patient-card'"
|
||||
:key="item.id"
|
||||
@click="handleCardClick(item, index)"
|
||||
>
|
||||
<div class="main-info-container">
|
||||
<div class="bed-container">
|
||||
<div class="bed">
|
||||
<el-text truncated :tclass="bedfont" width="auto">初诊</el-text>
|
||||
</div>
|
||||
<div class="bed_new" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="doctor-parent-line" />
|
||||
<div class="personal-info-container">
|
||||
<div class="name-container">
|
||||
<!-- 患者姓名 -->
|
||||
<div class="name" style="max-width: 70px">
|
||||
<el-text tclass="name" width="auto">{{ item.patientName || '未知' }}</el-text>
|
||||
</div>
|
||||
<!-- 患者性别/年龄 -->
|
||||
<div class="age">
|
||||
{{ item.genderEnum_enumText }}/{{ item.age }}/{{ item.typeCode_dictText }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</div>
|
||||
<div 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">
|
||||
{{
|
||||
Object.keys(patientInfo).length !== 0
|
||||
? patientInfo.patientName +
|
||||
' / ' +
|
||||
patientInfo.age +
|
||||
' / ' +
|
||||
patientInfo.genderEnum_enumText +
|
||||
' / ' +
|
||||
patientInfo.typeCode_dictText
|
||||
: '-'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="挂号时间" width="150">
|
||||
{{ Object.keys(patientInfo).length !== 0 ? formatDate(patientInfo.registerTime) : '-' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="医生" width="150">{{ userStore.name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="" width="150">
|
||||
<!-- {{ '' }} -->
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div style="padding: 10px">
|
||||
<prescriptionlist :patientInfo="patientInfo" ref="prescriptionRef" />
|
||||
<div class="overlay" v-if="disabled"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { getList } from './component/api.js';
|
||||
import { formatDate } from '@/utils/index';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { nextTick } from 'vue';
|
||||
import Prescriptionlist from './component/prescriptionlist.vue';
|
||||
import { onBeforeRouteLeave } from 'vue-router';
|
||||
|
||||
// // 监听路由离开事件
|
||||
// onBeforeRouteLeave((to, from, next) => {
|
||||
// // 弹出确认框
|
||||
// const confirmLeave = window.confirm('确定要离开吗?未保存的数据可能丢失!');
|
||||
// if (confirmLeave) {
|
||||
// next(); // 允许离开
|
||||
// } else {
|
||||
// next(false); // 取消离开
|
||||
// }
|
||||
// });
|
||||
defineOptions({
|
||||
name: 'PatientParentCard',
|
||||
});
|
||||
|
||||
const userStore = useUserStore();
|
||||
const bedfont = 'bed-font';
|
||||
const queryParams = ref({});
|
||||
const currentEncounterId = ref('');
|
||||
const emits = defineEmits(['click']);
|
||||
const patientList = ref([]);
|
||||
const patientInfo = ref({});
|
||||
const prescriptionRef = ref();
|
||||
const waitCount = ref(0);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const disabled = computed(() => {
|
||||
return Object.keys(patientInfo.value).length === 0;
|
||||
});
|
||||
|
||||
getPatientList();
|
||||
// 获取现诊患者列表
|
||||
function getPatientList() {
|
||||
getList(queryParams.value).then((res) => {
|
||||
patientList.value = res.data.records.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
active: currentEncounterId.value ? item.encounterId == currentEncounterId.value : false,
|
||||
};
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function handleQuery() {}
|
||||
|
||||
function handleCardClick(item, index) {
|
||||
currentEncounterId.value = '';
|
||||
// if (item.active) {
|
||||
// patientList.value[index].active = false;
|
||||
// return;
|
||||
// }
|
||||
patientList.value.forEach((patient) => {
|
||||
patient.active = patient.encounterId === item.encounterId;
|
||||
});
|
||||
patientInfo.value = item;
|
||||
nextTick(() => {
|
||||
prescriptionRef.value.getListInfo();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.patient-card {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
border: 1px solid;
|
||||
border-color: #eee;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 2px 0 rgba(57.55, 69.04, 86.28, 20%);
|
||||
margin-bottom: 10px;
|
||||
cursor: pointer;
|
||||
|
||||
&.actived {
|
||||
background-color: rgb(7, 155, 140, 5%);
|
||||
border-color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
.cross-dept {
|
||||
height: 24px;
|
||||
padding: 0 16px;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
background-color: #256d95;
|
||||
}
|
||||
|
||||
.main-info-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 24px;
|
||||
margin: 7px 0;
|
||||
padding: 0 16px;
|
||||
|
||||
.bed-container {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
min-width: 0;
|
||||
|
||||
.bed {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 1;
|
||||
min-width: 0;
|
||||
|
||||
:deep(.bed-font) {
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.bed_new {
|
||||
flex-shrink: 0;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
margin-left: 4px;
|
||||
background: #29af6f;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.indepatient-code-container {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
padding-left: 6px;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
|
||||
.sign {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
color: white;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.doctor-parent-line {
|
||||
margin: 0 16px;
|
||||
border-bottom: 1px dashed #ddd;
|
||||
}
|
||||
|
||||
.personal-info-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 10px 0;
|
||||
padding: 0 16px;
|
||||
|
||||
.name-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 24px;
|
||||
|
||||
.name {
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.age {
|
||||
margin-left: 10px;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.change-department {
|
||||
width: 58px;
|
||||
height: 24px;
|
||||
color: #5585e3;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
background: #e6edfb;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.dept {
|
||||
margin-bottom: 4px;
|
||||
padding: 0 16px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.doctor {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
|
||||
.doctor_name {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 4px;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.deptNurseName {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 32px;
|
||||
color: #256d95;
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-tabs__header {
|
||||
padding: 0;
|
||||
position: relative;
|
||||
margin: 0 0 5px !important;
|
||||
}
|
||||
|
||||
::v-deep .el-drawer__header {
|
||||
margin-bottom: 15px !important;
|
||||
}
|
||||
::v-deep .el-drawer__body {
|
||||
padding: 10px !important;
|
||||
}
|
||||
.el-badge {
|
||||
--el-badge-padding: 6px;
|
||||
}
|
||||
.disabled-wrapper .overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 999; /* 确保覆盖在内容上方 */
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
@@ -0,0 +1,66 @@
|
||||
import request from '@/utils/request'
|
||||
export function getRreportReturnIssue(query) {
|
||||
return request({
|
||||
url:'/report-manage/return-issue/report-return-issue',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 获取科室列表
|
||||
export function getDepartmentList() {
|
||||
return request({
|
||||
url: '/app-common/department-list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 获取日结
|
||||
export function getTotal(params) {
|
||||
return request({
|
||||
url: '/payment/bill/getTotal',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
// 查询费用性质
|
||||
export function getContractList() {
|
||||
return request({
|
||||
url: '/app-common/contract-list',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取门诊日结数据
|
||||
export function getClincReport(params) {
|
||||
return request({
|
||||
url: '/payment/bill/getTotalCcu',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取全部人员
|
||||
export function getAllUser(params) {
|
||||
return request({
|
||||
url: '/base-data-manage/practitioner/user-practitioner-page',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
export function testWithAxios() {
|
||||
return axios.create(
|
||||
{
|
||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: '/api',
|
||||
// 超时
|
||||
timeout: 60000
|
||||
}
|
||||
).post('/api/data/', {
|
||||
FunctionId: 3
|
||||
});
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
436
openhis-ui-vue3/src/views/clinicmanagement/dayEnd/index.vue
Normal file
436
openhis-ui-vue3/src/views/clinicmanagement/dayEnd/index.vue
Normal file
@@ -0,0 +1,436 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="查询日期:">
|
||||
<el-date-picker
|
||||
v-model="queryTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px; margin-right: 20px"
|
||||
@change="getValue"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="费用性质:">
|
||||
<el-select
|
||||
v-model="contractNo"
|
||||
placeholder="费用性质"
|
||||
clearable
|
||||
@change="getValue"
|
||||
style="width: 150px; margin-right: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in contractList"
|
||||
:key="item.busNo"
|
||||
:label="item.contractName"
|
||||
:value="item.busNo"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button type="primary" plain icon="Search" @click="getValue">查询</el-button>
|
||||
<el-button type="primary" plain icon="Printer" @click="print">打印</el-button>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="科室:" prop="sourceLocationId">
|
||||
<el-select
|
||||
v-model="queryParams.sourceLocationId"
|
||||
placeholder=""
|
||||
clearable
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="issueDepartment in issueDepartmentDto"
|
||||
:key="issueDepartment.id"
|
||||
:label="issueDepartment.name"
|
||||
:value="issueDepartment.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
|
||||
<!-- <el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Search" @click="getValue">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
<div v-loading="loading">
|
||||
<el-row
|
||||
:gutter="10"
|
||||
outpatientNo="mb8"
|
||||
style="
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
<!-- <el-col :span="3">
|
||||
<span>经办人编号:</span>
|
||||
</el-col> -->
|
||||
<el-col :span="3">
|
||||
<span class="label">经办人姓名:</span>
|
||||
<span class="value"> {{ userStore.nickName }}</span>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<span class="label">科室:</span>
|
||||
<span class="value">{{ userStore.orgName }}</span>
|
||||
</el-col>
|
||||
<el-col :span="4.5">
|
||||
<span class="label">时间:</span>
|
||||
<span class="value"> {{ queryTime[0] + '~' + queryTime[1] }} </span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
outpatientNo="mb8"
|
||||
style="
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="3">
|
||||
<span class="label">实际现金收入:</span>
|
||||
<span class="value"> {{ formatValue(reportValue.cashSum) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<span class="label">现金:</span>
|
||||
<span class="value">{{ formatValue(reportValue.rmbCashSum) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<span class="label">微信:</span>
|
||||
<span class="value">{{ formatValue(reportValue.vxCashSum) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<span class="label">支付宝:</span>
|
||||
<span class="value">{{ formatValue(reportValue.aliCashSum) }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
outpatientNo="mb8"
|
||||
style="
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="3">
|
||||
<span class="label">统筹支付:</span>
|
||||
<span class="value">{{ formatValue(reportValue.tcSum) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<span class="label">账户支付:</span>
|
||||
<span class="value">{{ formatValue(reportValue.zhSum) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<span class="label">基金支付总额:</span>
|
||||
<span class="value">{{ formatValue(reportValue.fundSum) }}</span>
|
||||
</el-col>
|
||||
<!-- <el-col :span="3">
|
||||
<span>医保人次:{{ reportValue.aliCashSum }}</span>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
outpatientNo="mb8"
|
||||
style="
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="3">
|
||||
<span class="label">诊查费:</span>
|
||||
<span class="value">{{ formatValue(reportValue.DIAGNOSTIC_FEE) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<span class="label">检查费:</span>
|
||||
<span class="value">{{ formatValue(reportValue.CHECK_FEE) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<span class="label">化验费:</span>
|
||||
<span class="value">{{ formatValue(reportValue.DIAGNOSTIC_TEST_FEE) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<span class="label">治疗费:</span>
|
||||
<span class="value">{{ formatValue(reportValue.MEDICAL_EXPENSE_FEE) }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
outpatientNo="mb8"
|
||||
style="
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="3">
|
||||
<span class="label">西药费:</span>
|
||||
<span class="value">{{ formatValue(reportValue.WEST_MEDICINE) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<span class="label">中药饮片费:</span>
|
||||
<span class="value">{{ formatValue(reportValue.CHINESE_MEDICINE_SLICES_FEE) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<span class="label">中成药费:</span>
|
||||
<span class="value">{{ formatValue(reportValue.CHINESE_MEDICINE_FEE) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<span class="label">卫生材料费:</span>
|
||||
<span class="value">{{ formatValue(reportValue.SANITARY_MATERIALS_FEE) }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
outpatientNo="mb8"
|
||||
style="
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="3">
|
||||
<span class="label">诊疗费:</span>
|
||||
<span class="value">{{ formatValue(reportValue.GENERAL_CONSULTATION_FEE) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<span class="label">挂号费:</span>
|
||||
<span class="value">{{ formatValue(reportValue.REGISTRATION_FEE) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<span class="label">其他费用:</span>
|
||||
<span class="value">{{ formatValue(reportValue.OTHER_FEE) }}</span>
|
||||
</el-col>
|
||||
<!-- <el-col :span="3">
|
||||
<span>现金:</span>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="dayEnd">
|
||||
import { getRreportReturnIssue, getTotal, getContractList } from './component/api';
|
||||
import dayjs from 'dayjs';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { formatDate, formatDateStr } from '@/utils/index';
|
||||
import Decimal from 'decimal.js';
|
||||
|
||||
const userStore = useUserStore();
|
||||
// import Dialog from "./components/Dialog";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const purchaseinventoryRef = ref(null); // 初始化 ref
|
||||
const purchaseinventoryList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref('');
|
||||
const contractList = ref(undefined);
|
||||
const reportValue = ref({});
|
||||
const queryTime = ref([
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
]);
|
||||
const contractNo = ref('0000');
|
||||
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
form: {},
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
purposeLocationId: undefined,
|
||||
sourceLocationId: undefined,
|
||||
supplierId: undefined,
|
||||
approvalTimeSTime: undefined,
|
||||
approvalTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
getValue();
|
||||
function getValue() {
|
||||
loading.value = true;
|
||||
getTotal({
|
||||
contractNo: contractNo.value,
|
||||
startTime: queryTime.value[0] + ' 00:00:00',
|
||||
endTime: queryTime.value[1] + ' 23:59:59',
|
||||
entererId: userStore.practitionerId,
|
||||
}).then((res) => {
|
||||
loading.value = false;
|
||||
reportValue.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
getContract();
|
||||
function getContract() {
|
||||
getContractList().then((response) => {
|
||||
contractList.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
function getPharmacyCabinetLists() {
|
||||
// occurrenceTime.value =
|
||||
// getDepartmentList().then((response) => {
|
||||
// issueDepartmentDto.value = response.data
|
||||
// })
|
||||
}
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getRreportReturnIssue(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
purchaseinventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.approvalTimeSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
queryParams.value.approvalTimeETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.approvalTimeSTime = '';
|
||||
queryParams.value.approvalTimeETime = '';
|
||||
occurrenceTime.value = '';
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
/** 打印门诊日结 */
|
||||
async function print() {
|
||||
// const selectedRows = proxy.$refs['tableRef'].getSelectionRows();
|
||||
console.log(reportValue.value, '==reportValue.value==');
|
||||
const result = {
|
||||
data: [
|
||||
{
|
||||
...reportValue.value, // 将 reportValue.value 中的所有属性展开到 result 中
|
||||
nickName: userStore.nickName,
|
||||
orgName: userStore.orgName,
|
||||
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)
|
||||
.add(reportValue.value.CHECK_FEE || 0)
|
||||
.add(reportValue.value.DIAGNOSTIC_TEST_FEE || 0)
|
||||
.add(reportValue.value.MEDICAL_EXPENSE_FEE || 0)
|
||||
.add(reportValue.value.WEST_MEDICINE || 0)
|
||||
.add(reportValue.value.CHINESE_MEDICINE_SLICES_FEE || 0)
|
||||
.add(reportValue.value.CHINESE_MEDICINE_FEE || 0)
|
||||
.add(reportValue.value.GENERAL_CONSULTATION_FEE || 0)
|
||||
.add(reportValue.value.REGISTRATION_FEE || 0)
|
||||
.add(reportValue.value.OTHER_FEE || 0)
|
||||
.add(reportValue.value.SANITARY_MATERIALS_FEE || 0),
|
||||
},
|
||||
],
|
||||
};
|
||||
console.log(result, '==result.data==');
|
||||
// 将对象转换为 JSON 字符串
|
||||
let jsonString = JSON.stringify(result, null, 2);
|
||||
console.log(jsonString, 'jsonstring');
|
||||
await CefSharp.BindObjectAsync('boundAsync');
|
||||
await boundAsync
|
||||
.printReport(getPrintFileName(contractNo.value), 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);
|
||||
});
|
||||
}
|
||||
|
||||
function getPrintFileName(value) {
|
||||
switch (value) {
|
||||
case '0000':
|
||||
return '门诊日结单(按登录角色查询)自费.grf';
|
||||
case '229900': // 省医保
|
||||
return '门诊日结单(按登录角色查询)省医保.grf';
|
||||
case '220100': // 市医保
|
||||
return '门诊日结单(按登录角色查询)市医保.grf';
|
||||
}
|
||||
}
|
||||
|
||||
function formatValue(value) {
|
||||
return value == null || value == undefined ? '0.00 元' : value.toFixed(2) + ' 元';
|
||||
}
|
||||
|
||||
getList();
|
||||
getPharmacyCabinetLists();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.label {
|
||||
display: inline-block;
|
||||
width: 120px !important;
|
||||
}
|
||||
.value {
|
||||
float: right;
|
||||
}
|
||||
.el-col {
|
||||
margin-right: 50px;
|
||||
}
|
||||
</style>
|
||||
498
openhis-ui-vue3/src/views/clinicmanagement/dayEnd/indexccu.vue
Normal file
498
openhis-ui-vue3/src/views/clinicmanagement/dayEnd/indexccu.vue
Normal file
@@ -0,0 +1,498 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="查询日期:">
|
||||
<el-date-picker
|
||||
v-model="queryTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px; margin-right: 20px"
|
||||
@change="getValue"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="费用性质:">
|
||||
<el-select
|
||||
v-model="contractNo"
|
||||
placeholder="费用性质"
|
||||
clearable
|
||||
@change="getValue"
|
||||
style="width: 150px; margin-right: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in contractList"
|
||||
:key="item.busNo"
|
||||
:label="item.contractName"
|
||||
:value="item.busNo"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="经办人:">
|
||||
<el-select
|
||||
v-model="entererId"
|
||||
placeholder="经办人"
|
||||
clearable
|
||||
filterable
|
||||
@change="
|
||||
(value) => {
|
||||
if (!value) {
|
||||
curUserInfo = {};
|
||||
}
|
||||
getValue();
|
||||
}
|
||||
"
|
||||
style="width: 150px; margin-right: 30px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.practitionerId"
|
||||
:label="item.nickName"
|
||||
:value="item.practitionerId"
|
||||
@click="
|
||||
() => {
|
||||
curUserInfo = item;
|
||||
}
|
||||
"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-button type="primary" plain icon="Search" @click="getValue">查询</el-button>
|
||||
<el-button type="primary" plain icon="Printer" @click="print">打印</el-button>
|
||||
</el-form>
|
||||
<div v-loading="loading" style="width: 1300px">
|
||||
<div style="text-align: center">
|
||||
<h2>门诊收费日结单</h2>
|
||||
</div>
|
||||
<el-row
|
||||
:gutter="5"
|
||||
outpatientNo="mb8"
|
||||
style="
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="4">
|
||||
<span class="label">经办人姓名:</span>
|
||||
<span class="value"> {{ curUserInfo.nickName ? curUserInfo.nickName : '全部' }}</span>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span class="label">科室:</span>
|
||||
<span class="value">{{ curUserInfo.orgId_dictText }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">机构:</span>
|
||||
<span class="value">{{ '长春大学医院' }}</span>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<span class="label">时间:</span>
|
||||
<span class="value"> {{ queryTime[0] + '~' + queryTime[1] }} </span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="divider"></div>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
outpatientNo="mb8"
|
||||
style="
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
<el-col
|
||||
v-for="(item, index) in fin_type_code"
|
||||
:span="5"
|
||||
:key="index"
|
||||
style="margin-bottom: 15px"
|
||||
>
|
||||
<span class="label">{{ item.label + ':' }}</span>
|
||||
<span class="value">{{ formatValue(reportValue[item.value]) }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="divider"></div>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
outpatientNo="mb8"
|
||||
style="
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="5">
|
||||
<span class="label">总收入:</span>
|
||||
<span class="value">{{ formatValue(reportValue.SUM) }}</span>
|
||||
</el-col>
|
||||
<!-- <el-col :span="5">
|
||||
<span class="label">实际现金收入:</span>
|
||||
<span class="value">
|
||||
{{
|
||||
formatValue(
|
||||
(reportValue['0000cash'] || 0) +
|
||||
(reportValue['220100cash'] || 0) +
|
||||
(reportValue['229900cash'] || 0)
|
||||
)
|
||||
}}
|
||||
</span>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="5">
|
||||
<span class="label">现金:</span>
|
||||
<span class="value">{{ formatValue(reportValue.rmbCashSum) }}</span>
|
||||
</el-col> -->
|
||||
<el-col :span="5">
|
||||
<span class="label">微信:</span>
|
||||
<span class="value">{{ formatValue(reportValue.vxCashSum) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">支付宝:</span>
|
||||
<span class="value">{{ formatValue(reportValue.aliCashSum) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">网银:</span>
|
||||
<span class="value">{{ formatValue(reportValue.aliCashSum) }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row
|
||||
:gutter="10"
|
||||
outpatientNo="mb8"
|
||||
style="
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="5">
|
||||
<span class="label">统筹支付:</span>
|
||||
<span class="value">{{ formatValue(reportValue.tcSum) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">账户支付:</span>
|
||||
<span class="value">{{ formatValue(reportValue.zhSum) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">基金支付总额:</span>
|
||||
<span class="value">{{ formatValue(reportValue.fundSum) }}</span>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
<el-row
|
||||
:gutter="10"
|
||||
outpatientNo="mb8"
|
||||
style="
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="5">
|
||||
<span class="label">自费现金总额:</span>
|
||||
<span class="value">{{ formatValue(reportValue['0000cash']) }}</span>
|
||||
</el-col>
|
||||
<!-- <el-col :span="5">
|
||||
<span class="label">医保现金总额:</span>
|
||||
<span class="value">{{ formatValue(reportValue.ybCashSum) }}</span>
|
||||
</el-col> -->
|
||||
<el-col :span="5">
|
||||
<span class="label">自费人次:</span>
|
||||
<span class="value">
|
||||
{{ reportValue['0000reg'] ? reportValue['0000reg'] + ' 人' : '0 人' }}
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">省医保人次:</span>
|
||||
<span class="value">
|
||||
{{ reportValue['229900reg'] ? reportValue['229900reg'] + ' 人' : '0 人' }}
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">市医保人次:</span>
|
||||
<span class="value">
|
||||
{{ reportValue['220100reg'] ? reportValue['220100reg'] + ' 人' : '0 人' }}
|
||||
</span>
|
||||
</el-col>
|
||||
<!-- <el-col :span="5">
|
||||
<span class="label">医保人次:</span>
|
||||
<span class="value">{{ reportValue.ybReg + ' 人' }}</span>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
outpatientNo="mb8"
|
||||
style="
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="5">
|
||||
<span class="label">省医保现金:</span>
|
||||
<span class="value">{{ formatValue(reportValue['229900cash']) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">省医保统筹:</span>
|
||||
<span class="value">{{ formatValue(reportValue['229900tcSum']) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">省医保账户:</span>
|
||||
<span class="value">{{ formatValue(reportValue['229900zhSum']) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">省医保基金:</span>
|
||||
<span class="value">{{ formatValue(reportValue['229900fundSum']) }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
outpatientNo="mb8"
|
||||
style="
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="5">
|
||||
<span class="label">市医保现金:</span>
|
||||
<span class="value">{{ formatValue(reportValue['220100cash']) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">市医保统筹:</span>
|
||||
<span class="value">{{ formatValue(reportValue['220100tcSum']) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">市医保账户:</span>
|
||||
<span class="value">{{ formatValue(reportValue['220100zhSum']) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">市医保基金:</span>
|
||||
<span class="value">{{ formatValue(reportValue['220100fundSum']) }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
outpatientNo="mb8"
|
||||
style="
|
||||
margin: 20px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 20px;
|
||||
"
|
||||
>
|
||||
<el-col :span="5">
|
||||
<span class="label">省医保总额:</span>
|
||||
<span class="value">{{ formatValue((reportValue['229900cash'] || 0 + reportValue['229900tcSum'] || 0 + reportValue['229900zhSum'] || 0 + reportValue['229900fundSum'] || 0)) }}</span>
|
||||
</el-col>
|
||||
<el-col :span="5">
|
||||
<span class="label">省医保总额:</span>
|
||||
<span class="value">{{ formatValue((reportValue['220100cash'] || 0 + reportValue['220100tcSum'] || 0 + reportValue['220100zhSum'] || 0 + reportValue['220100fundSum'] || 0)) }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="dayEnd">
|
||||
import { getAllUser, getContractList, getClincReport, testWithAxios } from './component/api';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { formatDate, formatDateStr } from '@/utils/index';
|
||||
import Decimal from 'decimal.js';
|
||||
import { hiprint } from 'vue-plugin-hiprint';
|
||||
import templateJson from './component/template.json';
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const purchaseinventoryList = ref([]);
|
||||
const userList = ref([]);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const total = ref(0);
|
||||
const entererId = ref(undefined);
|
||||
const contractList = ref(undefined);
|
||||
const reportValue = ref({});
|
||||
const curUserInfo = ref({});
|
||||
const { fin_type_code } = proxy.useDict('fin_type_code');
|
||||
const queryTime = ref([
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
]);
|
||||
const contractNo = ref('0000');
|
||||
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
form: {},
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
purposeLocationId: undefined,
|
||||
sourceLocationId: undefined,
|
||||
supplierId: undefined,
|
||||
approvalTimeSTime: undefined,
|
||||
approvalTimeETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams } = toRefs(data);
|
||||
|
||||
getValue();
|
||||
function getValue() {
|
||||
console.log(fin_type_code.value);
|
||||
|
||||
loading.value = true;
|
||||
getClincReport({
|
||||
contractNo: contractNo.value,
|
||||
startTime: queryTime.value[0] + ' 00:00:00',
|
||||
endTime: queryTime.value[1] + ' 23:59:59',
|
||||
entererId: entererId.value,
|
||||
}).then((res) => {
|
||||
loading.value = false;
|
||||
reportValue.value = res.data;
|
||||
let list = processObjectWithFinType(reportValue.value);
|
||||
console.log(list);
|
||||
});
|
||||
}
|
||||
|
||||
getContract();
|
||||
function getContract() {
|
||||
getContractList().then((response) => {
|
||||
contractList.value = response.data;
|
||||
});
|
||||
getAllUser({ pageSize: 100 }).then((res) => {
|
||||
userList.value = res.data.records.filter((item) => item.userName != 'admin');
|
||||
});
|
||||
}
|
||||
|
||||
function processObjectWithFinType(obj) {
|
||||
return Object.keys(obj).map((key) => {
|
||||
const matchedItem = fin_type_code.value.find((item) => item.value === key);
|
||||
if (matchedItem) {
|
||||
return {
|
||||
label: matchedItem ? matchedItem.label : key,
|
||||
value: obj[key],
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 打印门诊日结 */
|
||||
async function print() {
|
||||
// const selectedRows = proxy.$refs['tableRef'].getSelectionRows();
|
||||
console.log(reportValue.value, '==reportValue.value==');
|
||||
const result = {
|
||||
data: [
|
||||
{
|
||||
...reportValue.value, // 将 reportValue.value 中的所有属性展开到 result 中
|
||||
nickName: userStore.nickName,
|
||||
orgName: userStore.orgName,
|
||||
fixmedinsName: '长春大学医院',
|
||||
createTime: formatDateStr(new Date(), 'YYYY-MM-DD HH:mm:ss'),
|
||||
scheduler: userStore.nickName,
|
||||
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)
|
||||
.add(reportValue.value.CHECK_FEE || 0)
|
||||
.add(reportValue.value.DIAGNOSTIC_TEST_FEE || 0)
|
||||
.add(reportValue.value.MEDICAL_EXPENSE_FEE || 0)
|
||||
.add(reportValue.value.WEST_MEDICINE || 0)
|
||||
.add(reportValue.value.CHINESE_MEDICINE_SLICES_FEE || 0)
|
||||
.add(reportValue.value.CHINESE_MEDICINE_FEE || 0)
|
||||
.add(reportValue.value.GENERAL_CONSULTATION_FEE || 0)
|
||||
.add(reportValue.value.REGISTRATION_FEE || 0)
|
||||
.add(reportValue.value.OTHER_FEE || 0)
|
||||
.add(reportValue.value.SANITARY_MATERIALS_FEE || 0),
|
||||
},
|
||||
],
|
||||
};
|
||||
console.log(result, '==result.data==');
|
||||
|
||||
const printElements = templateJson;
|
||||
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
|
||||
const printerList = hiprintTemplate.getPrinterList();
|
||||
console.log(hiprintTemplate, '打印机列表');
|
||||
hiprintTemplate.print2(result.data[0], {
|
||||
title: '打印标题',
|
||||
});
|
||||
// 将对象转换为 JSON 字符串
|
||||
// let jsonString = JSON.stringify(result, null, 2);
|
||||
// console.log(jsonString, 'jsonstring');
|
||||
// await CefSharp.BindObjectAsync('boundAsync');
|
||||
// await boundAsync
|
||||
// .printReport(getPrintFileName(contractNo.value), 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);
|
||||
// });
|
||||
}
|
||||
|
||||
function getPrintFileName(value) {
|
||||
switch (value) {
|
||||
case '0000':
|
||||
return '门诊日结单(按登录角色查询)自费.grf';
|
||||
case '229900': // 省医保
|
||||
return '门诊日结单(按登录角色查询)省医保.grf';
|
||||
case '220100': // 市医保
|
||||
return '门诊日结单(按登录角色查询)市医保.grf';
|
||||
}
|
||||
}
|
||||
|
||||
function formatValue(value) {
|
||||
return value == null || value == undefined || value == NaN ? '0.00 元' : value.toFixed(2) + ' 元';
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.label {
|
||||
display: inline-block;
|
||||
width: 120px !important;
|
||||
}
|
||||
.value {
|
||||
float: right;
|
||||
}
|
||||
.el-col {
|
||||
margin-right: 50px;
|
||||
}
|
||||
.divider {
|
||||
height: 3px;
|
||||
background-color: #000;
|
||||
margin: 20px 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,76 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 获取患者列表
|
||||
*/
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/outpatient-manage/treatment/encounter-list',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗列表
|
||||
*/
|
||||
export function getDisposalList(encounterId) {
|
||||
return request({
|
||||
url: '/outpatient-manage/treatment/treatment-list?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行列表
|
||||
*/
|
||||
export function getExecuteList(queryParams) {
|
||||
return request({
|
||||
url: '/outpatient-manage/treatment/execute-list',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/outpatient-manage/treatment/init',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行
|
||||
*/
|
||||
export function execute(data) {
|
||||
return request({
|
||||
url: '/outpatient-manage/treatment/perform',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消
|
||||
*/
|
||||
export function cancel(data) {
|
||||
return request({
|
||||
url: '/outpatient-manage/treatment/cancel-perform',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取执行记录
|
||||
*/
|
||||
export function getPerformRecord(params) {
|
||||
return request({
|
||||
url: '/outpatient-manage/treatment/perform-record',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="执行记录"
|
||||
v-model="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-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>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="close">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
recordList: {
|
||||
type: [],
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
function close() {
|
||||
emit('close');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
541
openhis-ui-vue3/src/views/clinicmanagement/disposal/index.vue
Normal file
541
openhis-ui-vue3/src/views/clinicmanagement/disposal/index.vue
Normal file
@@ -0,0 +1,541 @@
|
||||
<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="patientSearch" placeholder="搜索患者" clearable class="search-input" />
|
||||
</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="printPrescription()">打印处方</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
:data="activityList"
|
||||
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"
|
||||
>
|
||||
<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" />
|
||||
<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"
|
||||
>
|
||||
<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>
|
||||
<el-table-column align="center" prop="serviceStatus_enumText" label="状态" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tag type="primary" size="small">
|
||||
{{ row.serviceStatus_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>
|
||||
|
||||
<!-- 耗材区域 -->
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<PerformRecordDialog :open="openDialog" :recordList="recordList" @close="openDialog = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import { getList, getDisposalList, execute, cancel, getPerformRecord } from './components/api';
|
||||
import PerformRecordDialog from './components/performRecordDialog';
|
||||
|
||||
// 患者搜索
|
||||
const patientSearch = ref('');
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const total = ref(0);
|
||||
// 患者数据
|
||||
const patientList = ref([]);
|
||||
// 处置项目列表
|
||||
const activityList = ref([]);
|
||||
// 耗材列表
|
||||
const deviceList = ref([]);
|
||||
|
||||
// 当前选中的患者
|
||||
const currentPatient = ref({});
|
||||
const recordList = ref([]);
|
||||
const openDialog = ref(false);
|
||||
const loading = ref(false);
|
||||
|
||||
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
|
||||
);
|
||||
|
||||
return treatmentCost + materialCost;
|
||||
});
|
||||
getPatientList();
|
||||
function getPatientList() {
|
||||
getList(queryParams.value).then((res) => {
|
||||
patientList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
function handlePatientSelect(row) {
|
||||
console.log(row, 3456789);
|
||||
loading.value = true;
|
||||
getDisposalList(row.encounterId).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'
|
||||
);
|
||||
});
|
||||
loading.value = false;
|
||||
console.log(activityList.value, 345678);
|
||||
});
|
||||
}
|
||||
|
||||
function handleExecute(row) {
|
||||
let data = {
|
||||
requestId: row.requestId,
|
||||
dispenseId: row.dispenseId,
|
||||
requestTable: row.requestTable,
|
||||
};
|
||||
let params = activityList.value
|
||||
.filter((item) => {
|
||||
return item.groupId == row.groupId;
|
||||
})
|
||||
.map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
dispenseId: item.dispenseId,
|
||||
requestTable: item.requestTable,
|
||||
};
|
||||
});
|
||||
let list = proxy.$refs.deviceListRef.getSelectionRows().map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
dispenseId: item.dispenseId,
|
||||
requestTable: item.requestTable,
|
||||
};
|
||||
});
|
||||
list.push(data);
|
||||
execute(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('执行成功');
|
||||
handlePatientSelect(row);
|
||||
} else {
|
||||
proxy.$modal.msgError(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 添加操作列的合并方法
|
||||
function operationSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
// 操作列是最后一列,索引为11 (从0开始)
|
||||
if (columnIndex === 11) {
|
||||
const groupId = row.groupId;
|
||||
// 如果没有groupId,则不合并
|
||||
if (groupId === undefined || groupId === null) {
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// 向上查找相同groupId的行,如果找到则隐藏当前行
|
||||
for (let i = rowIndex - 1; i >= 0; i--) {
|
||||
if (activityList.value[i].groupId === groupId) {
|
||||
return [0, 0]; // 隐藏被合并的行
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 向下统计相同groupId的行数
|
||||
let spanCount = 1;
|
||||
for (let i = rowIndex + 1; i < activityList.value.length; i++) {
|
||||
if (activityList.value[i].groupId === groupId) {
|
||||
spanCount++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return [spanCount, 1];
|
||||
}
|
||||
return [1, 1];
|
||||
}
|
||||
|
||||
// 判断是否为组内的第一行
|
||||
function isFirstRowInGroup(rowIndex) {
|
||||
const row = activityList.value[rowIndex];
|
||||
const groupId = row.groupId;
|
||||
|
||||
// 如果没有groupId,每行都显示操作按钮
|
||||
if (groupId === undefined || groupId === null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// 检查是否为该groupId的第一行
|
||||
for (let i = rowIndex - 1; i >= 0; i--) {
|
||||
if (activityList.value[i].groupId === groupId) {
|
||||
return false;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function handleCancel(row) {
|
||||
let data = {
|
||||
requestId: row.requestId,
|
||||
dispenseId: row.dispenseId,
|
||||
requestTable: row.requestTable,
|
||||
};
|
||||
let params = activityList.value
|
||||
.filter((item) => {
|
||||
return item.groupId == row.groupId;
|
||||
})
|
||||
.map((item) => {
|
||||
return {
|
||||
requestId: item.requestId,
|
||||
dispenseId: item.dispenseId,
|
||||
requestTable: item.requestTable,
|
||||
};
|
||||
});
|
||||
cancel(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
handlePatientSelect(row);
|
||||
} else {
|
||||
proxy.$modal.msgError(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
function getRecord(row) {
|
||||
getPerformRecord({ reqId: row.requestId }).then((res) => {
|
||||
recordList.value = res.data;
|
||||
openDialog.value = true;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.his-container {
|
||||
height: 90vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #f0f2f5;
|
||||
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', Arial, sans-serif;
|
||||
padding: 20px;
|
||||
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;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
min-width: 600px;
|
||||
}
|
||||
|
||||
.current-patient {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.patient-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.patient-avatar {
|
||||
background: #e6f7ff;
|
||||
border-radius: 50%;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.patient-details {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.patient-name {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.patient-gender,
|
||||
.patient-age {
|
||||
margin-left: 10px;
|
||||
font-size: 16px;
|
||||
color: #666;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.patient-meta {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.meta-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.meta-item i {
|
||||
margin-right: 5px;
|
||||
color: #1890ff;
|
||||
}
|
||||
|
||||
.patient-status {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.total-cost {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.cost-value {
|
||||
font-weight: 600;
|
||||
color: #e53935;
|
||||
font-size: 20px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.treatment-section,
|
||||
.material-section {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
||||
padding: 20px 10px 5px 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.section-title h2 {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.section-title i {
|
||||
font-size: 20px;
|
||||
color: #1890ff;
|
||||
}
|
||||
|
||||
.search-area {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
width: 200px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,126 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
// 电子处方管理画面相关接口
|
||||
/**
|
||||
* 电子处方查询
|
||||
*/
|
||||
export function getVeriPrescriptionInfo(queryParams) {
|
||||
return request({
|
||||
url: '/ybelep-request/get-PrescriptionInfo',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 电子处方详细
|
||||
*/
|
||||
export function getPrescriptionDetailInfo(prescriptionNo) {
|
||||
return request({
|
||||
url: '/ybelep-request/get-PrescriptionDetailInfo',
|
||||
method: 'get',
|
||||
params: { prescriptionNo }
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 电子处方取药结果查询
|
||||
*/
|
||||
export function queryMedPrescription(hiRxno) {
|
||||
return request({
|
||||
url: '/ybelep-request/med-query',
|
||||
method: 'get',
|
||||
params: {hiRxno}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 电子处方查询
|
||||
*/
|
||||
export function queryPrescription(hiRxno) {
|
||||
return request({
|
||||
url: '/ybelep-request/pre-query',
|
||||
method: 'get',
|
||||
params: {hiRxno}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 医保电子处方状态更新(上传)
|
||||
*/
|
||||
export function uploadPrescriptionStatus(prescriptionNo) {
|
||||
return request({
|
||||
url: '/ybelep-request/uploadPrescriptionStatus',
|
||||
method: 'put',
|
||||
params: {prescriptionNo}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 医保电子处方拒绝上传
|
||||
*/
|
||||
export function refusePrescriptionStatus(prescriptionNo) {
|
||||
return request({
|
||||
url: '/ybelep-request/refusePrescriptionStatus',
|
||||
method: 'put',
|
||||
params: {prescriptionNo}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 医保电子处方状态更新(撤销)
|
||||
*/
|
||||
export function quashPrescriptionStatus(prescriptionNo,quashReason) {
|
||||
return request({
|
||||
url: '/ybelep-request/quashPrescriptionStatus',
|
||||
method: 'put',
|
||||
params: {prescriptionNo,quashReason}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 电子处方上传预核验
|
||||
*/
|
||||
export function preVerification(prescriptionNo,ecToken,authNo,tenantId) {
|
||||
return request({
|
||||
url: '/ybelep-request/pre-verification',
|
||||
method: 'get',
|
||||
params: {prescriptionNo,ecToken,authNo,tenantId}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 电子处方医保电子签名
|
||||
*/
|
||||
export function eleSignature(hiRxno,practitionerId,checkDate,tenantId) {
|
||||
return request({
|
||||
url: '/ybelep-request/pre-signature',
|
||||
method: 'get',
|
||||
params: {hiRxno,practitionerId,checkDate,tenantId}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 电子处方上传
|
||||
*/
|
||||
export function uploadElePrescription(hiRxno,practitionerId,checkDate,tenantId) {
|
||||
return request({
|
||||
url: '/ybelep-request/pre-upload',
|
||||
method: 'get',
|
||||
params: {hiRxno,practitionerId,checkDate,tenantId}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 电子处方撤销
|
||||
*/
|
||||
export function revokePrescription(hiRxno,practitionerId,description,revokeDate,tenantId) {
|
||||
return request({
|
||||
url: '/ybelep-request/pre-revoke',
|
||||
method: 'get',
|
||||
params: {hiRxno,practitionerId,description,revokeDate,tenantId}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="详情" v-model="visible" width="1200px" append-to-body>
|
||||
<div style="width: 100%">
|
||||
<el-table max-height="650" :data="ePrescribingDetailList" border>
|
||||
<el-table-column
|
||||
label="处方号"
|
||||
align="center"
|
||||
prop="prescriptionNo"
|
||||
sortable
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column label="门诊号" align="center" prop="iptOtpNo" />
|
||||
<el-table-column label="请求数量" align="center" prop="quantity" />
|
||||
<el-table-column label="请求单位" align="center" prop="unitCode" />
|
||||
<el-table-column label="审核状态" align="center" prop="statusEnum_enumText" />
|
||||
<el-table-column label="药品名" align="center" prop="medicationName" />
|
||||
<el-table-column label="药品规格" align="center" prop="drugSpecification" />
|
||||
<el-table-column label="药品剂量" align="center" prop="medDosage" />
|
||||
<el-table-column label="药品剂量单位" align="center" prop="medDosageUnitCode" />
|
||||
<el-table-column label="使用频次" align="center" prop="medFrequency_dictText" />
|
||||
<el-table-column label="途径" align="center" prop="medRoute_dictText" />
|
||||
<el-table-column label="取药状态" align="center" prop="medStatus" />
|
||||
<el-table-column label="处方状态" align="center" prop="prescriptionStatus" />
|
||||
<el-table-column label="处方类别" align="center" prop="rxTypeCode_enumText" />
|
||||
<el-table-column label="支持用药信息" align="center" prop="supportInfo" />
|
||||
<el-table-column label="服药时间(开始)" align="center" prop="effectiveDoseStart">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.effectiveDoseStart) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="服药时间(结束)" align="center" prop="effectiveDoseEnd">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.effectiveDoseEnd) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="给药间隔" align="center" prop="dispenseInterval" />
|
||||
<el-table-column label="单次发药数" align="center" prop="dispensePerQuantity" />
|
||||
<el-table-column label="每次发药供应天数" align="center" prop="dispensePerDuration" />
|
||||
<el-table-column label="患者姓名" align="center" prop="patnName" />
|
||||
<el-table-column label="身份证号" align="center" prop="certno" />
|
||||
<el-table-column label="开方医生名" align="center" prop="practitionerName" />
|
||||
<el-table-column label="挂号科室" align="center" prop="mdtrtDeptName" />
|
||||
<el-table-column label="开单科室" align="center" prop="prscDeptName" />
|
||||
<el-table-column label="挂号日期" align="center" prop="mdtrtTime">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.mdtrtTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处方开立日期" align="center" prop="prscTime">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.prscTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="诊断名" align="center" prop="conditionName" />
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="EPrescribingDetailDialog">
|
||||
import { formatDate, formatDateStr } from '@/utils/index';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { unit_code, yb_type, fin_type_code, activity_category_code, chrgitm_lv } = proxy.useDict(
|
||||
'unit_code',
|
||||
'yb_type',
|
||||
'fin_type_code',
|
||||
'activity_category_code',
|
||||
'chrgitm_lv'
|
||||
);
|
||||
|
||||
const title = ref('');
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||
const ePrescribingDetailList = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
ePrescribingDetail: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
reset();
|
||||
ePrescribingDetailList.value = props.ePrescribingDetail;
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
ePrescribingDetailList.value = [];
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
visible.value = false;
|
||||
reset();
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
|
||||
/* 使用深度选择器 */
|
||||
.custom-label-spacing :deep(.el-form-item__label) {
|
||||
line-height: 1.2; /* 调整行间距 */
|
||||
margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,204 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="电子处方取药结果" v-model="visible" width="800px" append-to-body>
|
||||
<div style="width: 100%">
|
||||
<!-- <div style="margin-bottom: 5px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="订单时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetimerange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 400px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="门诊号/姓名:"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label=" " class="search-button" style="margin-left: 10px">
|
||||
<el-button type="primary" @click="handleQuery()" :disabled="false"> 查询 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div> -->
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="medresultInfoRef"
|
||||
label-width="130px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保处方编号" prop="hiRxno">
|
||||
<el-input v-model="form.hiRxno" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保结算时间" prop="setlTime">
|
||||
<el-input v-model="form.setlTime" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保处方状态编码" prop="rxStasCodg">
|
||||
<el-input v-model="form.rxStasCodg" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保处方状态名称" prop="rxStasName">
|
||||
<el-input v-model="form.rxStasName" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="处方使用状态编号" prop="rxUsedStasCodg">
|
||||
<el-input v-model="form.rxUsedStasCodg" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="处方使用状态名称" prop="rxUsedStasName">
|
||||
<el-input v-model="form.rxUsedStasName" placeholder="" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table max-height="650" :data="medicinePickupQueryList" border>
|
||||
<el-table-column
|
||||
label="医疗目录编码"
|
||||
align="center"
|
||||
prop="medListCodg"
|
||||
width="200"
|
||||
sortable
|
||||
/>
|
||||
<el-table-column label="药品通用名" align="center" prop="drugGenname" width="90" />
|
||||
<el-table-column label="药品商品名" align="center" prop="drugProdname" width="60" />
|
||||
<el-table-column label="药品剂型" align="center" prop="drugDosform" />
|
||||
<el-table-column label="药品规格" align="center" prop="drugSpec" width="130" />
|
||||
<el-table-column label="数量" align="center" prop="cnt" width="80" />
|
||||
<el-table-column label="批准文号" align="center" prop="aprvno" />
|
||||
<el-table-column label="批次号" align="center" prop="bchno" />
|
||||
<el-table-column label="生产批号" align="center" prop="manuLotnum" />
|
||||
<el-table-column label="生产厂家" align="center" prop="prdrName" />
|
||||
<el-table-column label="是否取药" align="center" prop="takeDrugFlag" />
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="MedicinePickupQueryDialog">
|
||||
// import {
|
||||
// getDiagnosisTreatmentList,
|
||||
// editDiagnosisTreatment,
|
||||
// addDiagnosisTreatment,
|
||||
// deptTreeSelect,
|
||||
// locationTreeSelect,
|
||||
// } from './diagnosistreatment';
|
||||
import { formatDate, formatDateStr } from '@/utils/index';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { unit_code, yb_type, fin_type_code, activity_category_code, chrgitm_lv } = proxy.useDict(
|
||||
'unit_code',
|
||||
'yb_type',
|
||||
'fin_type_code',
|
||||
'activity_category_code',
|
||||
'chrgitm_lv'
|
||||
);
|
||||
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||
const medicinePickupQueryList = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
medicinePickupQuery: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
medicinePickupInfo: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
reset();
|
||||
medicinePickupQueryList.value =
|
||||
props.medicinePickupQuery.seltdelts > 0 ? props.medicinePickupQuery.seltdelts : [];
|
||||
form.value = props.medicinePickupQuery ? props.medicinePickupQuery : {};
|
||||
visible.value = true;
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
hiRxno: undefined, // 编码
|
||||
setlTime: undefined, // 名称
|
||||
rxStasCodg: undefined, // 地点
|
||||
rxStasName: undefined, // 执行科室
|
||||
rxUsedStasCodg: undefined, // 拼音码
|
||||
rxUsedStasName: undefined, // 五笔码
|
||||
};
|
||||
proxy.resetForm('medresultInfoRef');
|
||||
|
||||
medicinePickupQueryList.value = [];
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
visible.value = false;
|
||||
reset();
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
|
||||
/* 使用深度选择器 */
|
||||
.custom-label-spacing :deep(.el-form-item__label) {
|
||||
line-height: 1.2; /* 调整行间距 */
|
||||
margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,361 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="电子处方查询结果" v-model="visible" width="1800px" append-to-body>
|
||||
<div style="width: 100%">
|
||||
<div class="title">处方信息</div>
|
||||
<el-table max-height="650" :data="prescriptionInfoList" border>
|
||||
<el-table-column label="医保处方编号" align="center" prop="hiRxno" width="280" sortable />
|
||||
<el-table-column label="就诊凭证类型" align="center" prop="mdtrtCertType" width="110" />
|
||||
<el-table-column label="就诊凭证编号" align="center" prop="mdtrtCertNo" width="150" />
|
||||
<el-table-column label="卡识别码" align="center" prop="cardSn" />
|
||||
<el-table-column label="业务类型" align="center" prop="bizTypeCode" width="130" />
|
||||
<el-table-column label="处方附加属性" align="center" prop="rxExraAttrCode" width="130" />
|
||||
<el-table-column label="电子凭证令牌" align="center" prop="ecToken" width="130" />
|
||||
<el-table-column
|
||||
label="电子凭证线上身份核验流水号"
|
||||
align="center"
|
||||
prop="authNo"
|
||||
width="200"
|
||||
/>
|
||||
<el-table-column label="参保地编号" align="center" prop="insuPlcNo" width="100" />
|
||||
<el-table-column label="就医地编号" align="center" prop="mdtrtareaNo" width="100" />
|
||||
<el-table-column
|
||||
label="定点医疗机构处方编号"
|
||||
align="center"
|
||||
prop="hospRxno"
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column label="续方的原处方编号" align="center" prop="initRxno" width="160" />
|
||||
<el-table-column
|
||||
label="处方类别代码"
|
||||
align="center"
|
||||
prop="rxTypeCode"
|
||||
width="200"
|
||||
sortable
|
||||
/>
|
||||
<el-table-column label="开方时间" align="center" prop="prscTime" width="180">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.prscTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="药品类目数" align="center" prop="rxDrugCnt" width="110" />
|
||||
<el-table-column
|
||||
label="处方整剂用法编号"
|
||||
align="center"
|
||||
prop="rxUsedWayCodg"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column
|
||||
label="处方整剂用法名称"
|
||||
align="center"
|
||||
prop="rxUsedWayName"
|
||||
width="130"
|
||||
/>
|
||||
<el-table-column label="处方整剂频次编号" align="center" prop="rxFrquCodg" width="130" />
|
||||
<el-table-column label="处方整剂频次名称" align="center" prop="rxFrquName" width="130" />
|
||||
<el-table-column label="处方整剂剂量单位" align="center" prop="rxDosunt" width="130" />
|
||||
<el-table-column label="处方整剂单次剂量数" align="center" prop="rxDoscnt" width="150" />
|
||||
<el-table-column label="处方整剂医嘱说明" align="center" prop="rxDrordDscr" width="130" />
|
||||
<el-table-column label="处方有效天数" align="center" prop="valiDays" width="130" />
|
||||
|
||||
<el-table-column label="有效截止时间" align="center" prop="valiEndTime" width="180">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.valiEndTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="复用" align="center" prop="reptFlag" />
|
||||
<el-table-column label="最大使用次数" align="center" prop="maxReptCnt" width="110" />
|
||||
<el-table-column
|
||||
label="使用最小间隔(天数)"
|
||||
align="center"
|
||||
prop="minInvDays"
|
||||
width="150"
|
||||
/>
|
||||
<el-table-column label="续方" align="center" prop="rxCotnFlag" width="80" />
|
||||
<el-table-column label="长期处方" align="center" prop="longRxFlag" />
|
||||
</el-table>
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
</div>
|
||||
<div style="width: 100%">
|
||||
<div class="title">处方明细信息</div>
|
||||
<el-table max-height="650" :data="rxdrugdetailList" border>
|
||||
<el-table-column
|
||||
label="医疗目录编码"
|
||||
align="center"
|
||||
prop="medListCodg"
|
||||
width="200"
|
||||
sortable
|
||||
/>
|
||||
<el-table-column
|
||||
label="定点医药机构目录编号"
|
||||
align="center"
|
||||
prop="fixmedinsHilistId"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column label="医疗机构制剂标志" align="center" prop="hospPrepFlag" width="60" />
|
||||
<el-table-column label="处方项目分类代码" align="center" prop="rxItemTypeCode" />
|
||||
<el-table-column
|
||||
label="处方项目分类名称"
|
||||
align="center"
|
||||
prop="rxItemTypeName"
|
||||
width="130"
|
||||
/>
|
||||
<el-table-column label="中药类别代码" align="center" prop="tcmdrugTypeCode" width="80" />
|
||||
<el-table-column label="中药类别名称" align="center" prop="tcmdrugTypeName" />
|
||||
<el-table-column label="草药脚注" align="center" prop="tcmherbFoote" />
|
||||
<el-table-column label="药物类型代码" align="center" prop="mednTypeCode" />
|
||||
<el-table-column label="药物类型名称" align="center" prop="mednTypeName" />
|
||||
<el-table-column label="主要用药标志" align="center" prop="mainMedcFlag" />
|
||||
<el-table-column label="加急标志" align="center" prop="urgtFlag" width="200" sortable />
|
||||
<el-table-column label="基本药物标志" align="center" prop="basMednFlag" width="90" />
|
||||
<el-table-column label="是否进口药品" align="center" prop="impDrugFlag" width="60" />
|
||||
<el-table-column label="是否OTC药品" align="center" prop="otcFlag" />
|
||||
<el-table-column label="药品通用名" align="center" prop="drugGenname" width="130" />
|
||||
<el-table-column label="药品剂型" align="center" prop="drugDosform" width="80" />
|
||||
<el-table-column label="药品规格" align="center" prop="drugSpec" />
|
||||
<el-table-column label="药品商品名" align="center" prop="drugProdname" />
|
||||
<el-table-column label="生产厂家" align="center" prop="prdrName" />
|
||||
<el-table-column label="用药途径代码" align="center" prop="medcWayCodg" />
|
||||
<el-table-column label="用药途径描述" align="center" prop="medcWayDscr" />
|
||||
<el-table-column label="用药开始时间" align="center" prop="medcBegntime" width="90">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.medcBegntime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="用药结束时间" align="center" prop="medcEndtime" width="90">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.medcEndtime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="用药天数" align="center" prop="medcDays" width="200" sortable />
|
||||
<el-table-column label="单次剂量单位" align="center" prop="sinDosunt" width="90" />
|
||||
<el-table-column label="单次用量" align="center" prop="sinDoscnt" width="60" />
|
||||
<el-table-column label="使用频次编码" align="center" prop="usedFrquCodg" />
|
||||
<el-table-column label="使用频次名称" align="center" prop="usedFrquName" width="130" />
|
||||
<el-table-column label="药品总用药量单位" align="center" prop="drugDosunt" width="80" />
|
||||
<el-table-column label="药品总用药量" align="center" prop="drugCnt" />
|
||||
<el-table-column label="药品单价" align="center" prop="drugPric" />
|
||||
<el-table-column label="药品总金额" align="center" prop="drugSumamt" />
|
||||
<el-table-column label="医院审批标志" align="center" prop="hospApprFlag" />
|
||||
<el-table-column label="自费原因类型" align="center" prop="selfPayRea" />
|
||||
<el-table-column
|
||||
label="自费原因描述"
|
||||
align="center"
|
||||
prop="realDscr"
|
||||
width="200"
|
||||
sortable
|
||||
/>
|
||||
<el-table-column label="扩展数据" align="center" prop="extras" width="90" />
|
||||
<el-table-column label="院内内部处方号" align="center" prop="prescriptionNo" width="60" />
|
||||
<el-table-column label="医保处方编号" align="center" prop="hiRxno" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="width: 100%">
|
||||
<div class="title">就诊信息</div>
|
||||
<el-table max-height="650" :data="mdtrtinfoList" border>
|
||||
<el-table-column
|
||||
label="定点医疗机构名称"
|
||||
align="center"
|
||||
prop="fixmedinsName"
|
||||
width="200"
|
||||
sortable
|
||||
/>
|
||||
<el-table-column
|
||||
label="定点医疗机构编号"
|
||||
align="center"
|
||||
prop="fixmedinsCode"
|
||||
width="90"
|
||||
/>
|
||||
<el-table-column label="医保就诊ID" align="center" prop="mdtrtId" width="70" />
|
||||
<el-table-column label="医疗类别" align="center" prop="medType" />
|
||||
<el-table-column label="门诊/住院号" align="center" prop="iptOtpNo" width="130" />
|
||||
<el-table-column label="门诊住院标识" align="center" prop="otpIptFlag" width="80" />
|
||||
<el-table-column label="医保人员编号" align="center" prop="psnNo" />
|
||||
<el-table-column label="患者姓名" align="center" prop="patnName" />
|
||||
<el-table-column label="人员证件类型" align="center" prop="psnCertType" />
|
||||
<el-table-column label="证件号码" align="center" prop="certno" />
|
||||
<el-table-column label="年龄" align="center" prop="patnAge" />
|
||||
<el-table-column
|
||||
label="患者身高(cm)"
|
||||
align="center"
|
||||
prop="patnHgt"
|
||||
width="200"
|
||||
sortable
|
||||
/>
|
||||
<el-table-column label="患者体重(kg)" align="center" prop="patnWt" width="90" />
|
||||
<el-table-column label="性别" align="center" prop="gend" width="60" />
|
||||
<el-table-column label="计划生育手术类别" align="center" prop="birctrlType" />
|
||||
<el-table-column
|
||||
label="计划生育手术或生育日期"
|
||||
align="center"
|
||||
prop="birctrlMatnDate"
|
||||
width="130"
|
||||
/>
|
||||
<el-table-column label="生育类别" align="center" prop="matnType" width="80" />
|
||||
<el-table-column label="妊娠(孕周)" align="center" prop="gesoVal" />
|
||||
<el-table-column label="新生儿标志" align="center" prop="nwbFlag" />
|
||||
<el-table-column label="新生儿日、月龄" align="center" prop="nwbAge" />
|
||||
<el-table-column label="哺乳期标志" align="center" prop="suckPrdFlag" />
|
||||
<el-table-column label="过敏史" align="center" prop="algsHis" />
|
||||
<el-table-column
|
||||
label="开方科室名称"
|
||||
align="center"
|
||||
prop="prscDeptName"
|
||||
width="200"
|
||||
sortable
|
||||
/>
|
||||
<el-table-column label="开方科室编号" align="center" prop="prscDeptCode" width="90" />
|
||||
<el-table-column label="开方医保医师代码" align="center" prop="drCode" width="60" />
|
||||
<el-table-column label="开方医师姓名" align="center" prop="prscDrName" />
|
||||
<el-table-column
|
||||
label="开方医师证件类型"
|
||||
align="center"
|
||||
prop="prscDrCertType"
|
||||
width="130"
|
||||
/>
|
||||
<el-table-column label="开方医师证件号码" align="center" prop="prscDrCertno" width="80" />
|
||||
<el-table-column label="医生职称编码" align="center" prop="drProfttlCodg" />
|
||||
<el-table-column label="医生职称名称" align="center" prop="drProfttlName" />
|
||||
<el-table-column label="医生科室编码" align="center" prop="drDeptCode" />
|
||||
<el-table-column label="医生科室名称" align="center" prop="drDeptName" />
|
||||
<el-table-column label="科别" align="center" prop="caty" />
|
||||
<el-table-column label="就诊时间" align="center" prop="mdtrtTime" width="90">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.mdtrtTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="病种编码" align="center" prop="diseCodg" width="200" sortable />
|
||||
<el-table-column label="病种名称" align="center" prop="diseName" width="90" />
|
||||
<el-table-column label="特殊病种标志" align="center" prop="spDiseFlag" width="60" />
|
||||
<el-table-column label="主诊断代码" align="center" prop="maindiagCode" />
|
||||
<el-table-column label="主诊断名称" align="center" prop="maindiagName" width="130" />
|
||||
<el-table-column label="疾病病情描述" align="center" prop="diseCondDscr" width="80" />
|
||||
<el-table-column label="医保费用结算类型" align="center" prop="hiFeesetlType" />
|
||||
<el-table-column label="医保费用类别名称" align="center" prop="hiFeesetlName" />
|
||||
<el-table-column label="挂号费" align="center" prop="rgstFee" />
|
||||
<el-table-column label="医疗费总额" align="center" prop="medfeeSumamt" />
|
||||
<el-table-column label="是否初诊" align="center" prop="fstdiagFlag" />
|
||||
<el-table-column label="扩展数据" align="center" prop="extras" />
|
||||
<el-table-column label="院内内部处方号" align="center" prop="prescriptionNo" />
|
||||
<el-table-column label="医保处方编号" align="center" prop="hiRxno" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="width: 100%">
|
||||
<div class="title">诊断信息</div>
|
||||
<el-table max-height="650" :data="discinfoList" border>
|
||||
<el-table-column label="诊断类别" align="center" prop="diagType" width="200" sortable />
|
||||
<el-table-column label="主诊断标志" align="center" prop="maindiagFlag" width="90" />
|
||||
<el-table-column label="诊断排序号" align="center" prop="diagSrtNo" width="60" />
|
||||
<el-table-column label="诊断代码" align="center" prop="diagCode" />
|
||||
<el-table-column label="诊断名称" align="center" prop="diagName" width="130" />
|
||||
<el-table-column label="诊断科室名称" align="center" prop="diagDept" width="80" />
|
||||
<el-table-column label="诊断科室代码" align="center" prop="diagDeptCode" />
|
||||
<el-table-column label="诊断医生编码" align="center" prop="diagDrNo" />
|
||||
<el-table-column label="诊断医生姓名" align="center" prop="diagDrName" />
|
||||
<el-table-column label="诊断时间" align="center" prop="diagTime" width="90">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.diagTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="中医病名代码" align="center" prop="tcmDiseCode" />
|
||||
<el-table-column label="中医病名" align="center" prop="tcmDiseName" />
|
||||
<el-table-column
|
||||
label="中医证候代码"
|
||||
align="center"
|
||||
prop="tcmsympCode"
|
||||
width="200"
|
||||
sortable
|
||||
/>
|
||||
<el-table-column label="中医证候" align="center" prop="tcmsymp" width="90" />
|
||||
<el-table-column label="院内内部处方号" align="center" prop="prescriptionNo" width="60" />
|
||||
<el-table-column label="医保处方编号" align="center" prop="hiRxno" />
|
||||
</el-table>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="PrescriptionQueryDialog">
|
||||
import { formatDate, formatDateStr } from '@/utils/index';
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const title = ref('');
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||
const prescriptionQuery = ref(undefined);
|
||||
const prescriptionInfoList = ref([]); // 初始化为空数组; // 处方信息
|
||||
const rxdrugdetailList = ref(undefined); // 处方明细信息
|
||||
const mdtrtinfoList = ref([]); // 就诊信息
|
||||
const discinfoList = ref(undefined); // 诊断信息
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
prescriptionQuery: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
reset();
|
||||
prescriptionQuery.value = props.prescriptionQuery;
|
||||
console.log(prescriptionQuery.value, '处方查询prescriptionQuery.value');
|
||||
prescriptionInfoList.value.push(prescriptionQuery.value); // 处方信息
|
||||
rxdrugdetailList.value = prescriptionQuery.value.rxDetlList
|
||||
? prescriptionQuery.value.rxDetlList
|
||||
: []; // 处方明细信息
|
||||
|
||||
mdtrtinfoList.value.push(prescriptionQuery.value.rxOtpinfo); // 就诊信息
|
||||
discinfoList.value = prescriptionQuery.value.rxDiseList ? prescriptionQuery.value.rxDiseList : []; // 诊断信息
|
||||
visible.value = true;
|
||||
}
|
||||
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
prescriptionInfoList.value = []; // 初始化为空数组; // 处方信息
|
||||
rxdrugdetailList.value = []; // 处方明细信息
|
||||
mdtrtinfoList.value = []; // 就诊信息
|
||||
discinfoList.value = []; // 诊断信息
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
visible.value = false;
|
||||
reset();
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,462 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div style="width: 100%">
|
||||
<div style="margin-bottom: 5px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="订单时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="datetimerange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 400px"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="门诊号/姓名:"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label=" " class="search-button" style="margin-left: 10px">
|
||||
<el-button type="primary" @click="handleQuery()" :disabled="false"> 查询 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- <div style="margin-bottom: 5px">
|
||||
<el-button type="primary" @click="handleSave()" :disabled="false"> 取药查询 </el-button>
|
||||
<el-button type="primary" plain @click="open()" :disabled="false"> 审核查询 </el-button>
|
||||
<el-button type="default" @click="combination()" :disabled="false"> 处方查询 </el-button>
|
||||
<el-button type="danger" @click="split()" :disabled="false"> 处方撤销 </el-button>
|
||||
</div> -->
|
||||
<el-table
|
||||
max-height="650"
|
||||
ref="eprescriptionRef"
|
||||
:data="prescriptionList"
|
||||
border
|
||||
v-loading="loading"
|
||||
:element-loading-text="'处理中...'"
|
||||
>
|
||||
<el-table-column label="处方号" align="center" prop="prescriptionNo" sortable width="190" />
|
||||
<el-table-column label="门诊号" align="center" prop="iptOtpNo" width="110" />
|
||||
<el-table-column label="姓名" align="center" prop="patientName" width="100" />
|
||||
<el-table-column label="身份证号" align="center" prop="certno" width="180" />
|
||||
<el-table-column label="取药状态" align="center" prop="medStatus" width="130" />
|
||||
<el-table-column label="状态" align="center" prop="statusEnum_enumText" width="80" />
|
||||
<el-table-column label="科室" align="center" prop="prscDeptName" />
|
||||
<el-table-column label="挂号日期" align="center" prop="mdtrtTime" width="190">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.mdtrtTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处方开立日期" align="center" prop="prscTime" width="190">
|
||||
<template #default="scope">
|
||||
{{ formatDate(scope.row.prscTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="600"
|
||||
class-name="small-padding fixed-width"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="View" @click="openEPrescribingDetail(scope.row)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Plus"
|
||||
:disabled="scope.row.statusEnum != '2'"
|
||||
@click="uploadElePrescriptions(scope.row)"
|
||||
>处方上传</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
icon="CloseBold"
|
||||
:disabled="scope.row.statusEnum != '2'"
|
||||
@click="refusePrescription(scope.row)"
|
||||
>拒绝上传</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Search"
|
||||
:disabled="scope.row.statusEnum != '3'"
|
||||
@click="openPrescriptionQuery(scope.row)"
|
||||
>处方查询</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="warning"
|
||||
icon="Switch"
|
||||
:disabled="scope.row.statusEnum != '3'"
|
||||
@click="openRevokeDialog(scope.row)"
|
||||
>处方撤销</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Search"
|
||||
:disabled="scope.row.statusEnum != '3'"
|
||||
@click="openMedicinePickupQuery(scope.row)"
|
||||
>取药查询</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
<prescription-query-dialog
|
||||
ref="prescriptionQueryRef"
|
||||
:prescriptionQuery="prescriptionQueryData"
|
||||
@submit="getList()"
|
||||
/>
|
||||
<medicine-pickup-query-dialog
|
||||
ref="medicinePickupQueryRef"
|
||||
:medicinePickupQuery="medicinePickupQueryData"
|
||||
:medicinePickupInfo="medicinePickupInfoData"
|
||||
@submit="getList()"
|
||||
/>
|
||||
<e-prescribing-detail-dialog
|
||||
ref="ePrescribingDetailRef"
|
||||
:ePrescribingDetail="eprescriptionDetailData"
|
||||
@submit="getList()"
|
||||
/>
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="处方撤销" v-model="open" width="600px" append-to-body>
|
||||
<el-form :model="form" :rules="rules" ref="removeRef" label-width="80px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="撤销原因" prop="description">
|
||||
<el-input
|
||||
v-model="form.description"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="revokePrescriptionStatus">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
getVeriPrescriptionInfo,
|
||||
queryMedPrescription,
|
||||
queryPrescription,
|
||||
getPrescriptionDetailInfo,
|
||||
uploadPrescriptionStatus,
|
||||
refusePrescriptionStatus,
|
||||
quashPrescriptionStatus,
|
||||
preVerification,
|
||||
eleSignature,
|
||||
uploadElePrescription,
|
||||
revokePrescription,
|
||||
} from './components/api';
|
||||
import medicinePickupQueryDialog from './components/medicinePickupQueryDialog.vue';
|
||||
import prescriptionQueryDialog from './components/prescriptionQueryDialog.vue';
|
||||
import ePrescribingDetailDialog from './components/ePrescribingDetailDialog.vue';
|
||||
import { getCurrentInstance } from 'vue';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import { dayjs, ElMessage } from 'element-plus';
|
||||
import { formatDate, formatDateStr } from '@/utils/index';
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
const emit = defineEmits(['selectDiagnosis']);
|
||||
const open = ref(false);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined, // 门诊号/姓名
|
||||
});
|
||||
const dateRange = ref([]);
|
||||
const showSearch = ref(true);
|
||||
const loading = ref(false);
|
||||
const prescriptionList = ref([]);
|
||||
const form = ref({
|
||||
description: undefined,
|
||||
});
|
||||
const prescriptionQueryRef = ref();
|
||||
const medicinePickupQueryRef = ref();
|
||||
const eprescriptionRef = ref();
|
||||
const ePrescribingDetailRef = ref();
|
||||
// 使用 ref 定义当前电子处方
|
||||
const prescriptionQueryData = ref({});
|
||||
// 使用 ref 定义当前查看取药结果
|
||||
const medicinePickupQueryData = ref({});
|
||||
// 使用 ref 定义当前查看处方详细
|
||||
const eprescriptionDetailData = ref({});
|
||||
// 要撤销的处方信息
|
||||
const revokePrescriptionData = ref({});
|
||||
// 撤销原因
|
||||
const description = ref('');
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { method_code, unit_code, rate_code, distribution_category_code } = proxy.useDict(
|
||||
'method_code',
|
||||
'unit_code',
|
||||
'rate_code',
|
||||
'distribution_category_code'
|
||||
);
|
||||
|
||||
getList();
|
||||
function getList() {
|
||||
console.log(queryParams.value, 'queryParams.value电子处方');
|
||||
getVeriPrescriptionInfo(queryParams.value).then((res) => {
|
||||
prescriptionList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.prscTimeSTime =
|
||||
dateRange.value && dateRange.value.length == 2 ? dateRange.value[0] : '';
|
||||
queryParams.value.prscTimeETime =
|
||||
dateRange.value && dateRange.value.length == 2 ? dateRange.value[1] : '';
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 电子处方撤销按钮 */
|
||||
function openRevokeDialog(row) {
|
||||
form.value.description = '';
|
||||
open.value = true;
|
||||
revokePrescriptionData.value = row;
|
||||
}
|
||||
|
||||
/** 电子处方撤销按钮操作 */
|
||||
function revokePrescriptionStatus() {
|
||||
open.value = false;
|
||||
description.value = form.value.description;
|
||||
const practitionerId = userStore.id;
|
||||
// 撤销时间
|
||||
const revokeDate = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
|
||||
console.log(revokePrescriptionData.value, 'revokePrescriptionData');
|
||||
console.log(description.value, '撤销原因');
|
||||
revokePrescription(
|
||||
revokePrescriptionData.value.hiRxno,
|
||||
practitionerId,
|
||||
description.value,
|
||||
revokeDate,
|
||||
revokePrescriptionData.value.tenantId
|
||||
).then((response) => {
|
||||
if (response.code == 200) {
|
||||
quashPrescriptionStatus(revokePrescriptionData.value.prescriptionNo, description.value).then(
|
||||
(response) => {
|
||||
if (response.code == 200) {
|
||||
console.log(response, '电子处方撤销');
|
||||
proxy.$modal.msgSuccess('电子处方撤销成功');
|
||||
getList();
|
||||
} else {
|
||||
ElMessage.error(response.msg);
|
||||
}
|
||||
}
|
||||
);
|
||||
} else {
|
||||
ElMessage.error(response.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 打开查看弹窗 */
|
||||
function openEPrescribingDetail(row) {
|
||||
console.log(row.prescriptionNo, 'row88888', row);
|
||||
|
||||
loading.value = true;
|
||||
getPrescriptionDetailInfo(row.prescriptionNo).then((response) => {
|
||||
console.log(response, 'response88888');
|
||||
eprescriptionDetailData.value = response.data;
|
||||
nextTick(() => {
|
||||
proxy.$refs['ePrescribingDetailRef'].show();
|
||||
loading.value = false;
|
||||
});
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 打开电子处方查询结果弹窗 */
|
||||
function openPrescriptionQuery(row) {
|
||||
queryPrescription(row.hiRxno).then((response) => {
|
||||
console.log(response, 'response打开电子处方查询结果弹窗');
|
||||
|
||||
prescriptionQueryData.value = response.data;
|
||||
nextTick(() => {
|
||||
proxy.$refs['prescriptionQueryRef'].show();
|
||||
});
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 打开取药查询弹窗 */
|
||||
function openMedicinePickupQuery(row) {
|
||||
queryMedPrescription(row.hiRxno).then((response) => {
|
||||
console.log(response, 'responseopenMedicinePickupQuery');
|
||||
|
||||
medicinePickupQueryData.value = response.data;
|
||||
nextTick(() => {
|
||||
proxy.$refs['medicinePickupQueryRef'].show();
|
||||
});
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 处方上传 */
|
||||
function uploadElePrescriptions(row) {
|
||||
console.log(row, '处方上传');
|
||||
loading.value = true;
|
||||
// 电子处方上传预核验
|
||||
preVerification(row.prescriptionNo, row.ecToken, row.authNo, row.tenantId)
|
||||
.then((response) => {
|
||||
console.log(response, '电子处方上传预核验');
|
||||
let date = new Date();
|
||||
const preVerificationResult = response.data;
|
||||
if (response.code == 200) {
|
||||
const practitionerId = userStore.id;
|
||||
// 电子处方医保电子签名
|
||||
eleSignature(
|
||||
preVerificationResult.hiRxno,
|
||||
practitionerId,
|
||||
dayjs(date).format('YYYY-MM-DD HH:mm:ss'),
|
||||
row.tenantId
|
||||
).then((response) => {
|
||||
console.log(response, '电子处方医保电子签名');
|
||||
if (response.code == 200) {
|
||||
// 电子处方上传
|
||||
uploadElePrescription(
|
||||
preVerificationResult.hiRxno,
|
||||
practitionerId,
|
||||
dayjs(date).format('YYYY-MM-DD HH:mm:ss'),
|
||||
row.tenantId
|
||||
).then((response) => {
|
||||
if (response.code == 200) {
|
||||
console.log(response, '电子处方上传');
|
||||
// 医保电子处方状态更新(上传)
|
||||
console.log(row.prescriptionNo, '处方上传prescriptionNo');
|
||||
uploadPrescriptionStatus(row.prescriptionNo).then((response) => {
|
||||
if (response.code == 200) {
|
||||
loading.value = false;
|
||||
console.log(response, '医保电子处方状态更新(上传)');
|
||||
proxy.$modal.msgSuccess('处方上传成功');
|
||||
getList();
|
||||
} else {
|
||||
proxy.$modal.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// medicinePickupQueryData.value = response.data;
|
||||
// // nextTick(() => {
|
||||
// // proxy.$refs['medicinePickupQueryRef'].show();
|
||||
// // });
|
||||
// getList();
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
/** 医保电子处方拒绝上传 */
|
||||
function refusePrescription(row) {
|
||||
refusePrescriptionStatus(row.prescriptionNo).then((response) => {
|
||||
if (response.code == 200) {
|
||||
console.log(response, '医保电子处方状态更新(拒绝上传)');
|
||||
proxy.$modal.msgSuccess('拒绝上传成功');
|
||||
getList();
|
||||
} else {
|
||||
ElMessage.error(response.msg);
|
||||
}
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-table__expand-icon) {
|
||||
display: none !important;
|
||||
}
|
||||
.medicine-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
min-width: 280px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.total-amount {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #409eff;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.medicine-info {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #606266;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
background: #fff;
|
||||
padding: 6px 10px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ebeef5;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
/* 调整element组件默认间距 */
|
||||
// .el-select,
|
||||
// .el-input-number {
|
||||
// margin-right: 0 !important;
|
||||
// }
|
||||
|
||||
.el-input-number .el-input__inner {
|
||||
text-align: center;
|
||||
}
|
||||
.el-table__cell .el-form-item--default {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,18 @@
|
||||
import request from '@/utils/request'
|
||||
export function getPrescriptionPageInfo(queryParams) {
|
||||
return request({
|
||||
url: '/doctor-station/main/prescription-page-info',
|
||||
method: 'get',
|
||||
params: queryParams
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 获取患者本次就诊处方
|
||||
*/
|
||||
export function getPrescriptionDetail(prescriptionNo) {
|
||||
return request({
|
||||
url: '/doctor-station/main/prescription-detail-info?prescriptionNo=' + prescriptionNo,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Back"
|
||||
@click="handleBack"
|
||||
|
||||
>返回列表</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="handleQuery"
|
||||
|
||||
>查询</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<!-- <el-table-column label="组" align="center" width="60">
|
||||
<template #default="scope">
|
||||
<div v-if="groupMarkers[scope.$index] === '┏'">┏</div>
|
||||
<div v-if="groupMarkers[scope.$index] === '┗'">┗</div>
|
||||
<div v-if="groupMarkers[scope.$index] === '┃'">┃</div>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
label="处方号"
|
||||
align="center"
|
||||
key="prescriptionNo"
|
||||
prop="prescriptionNo"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="请求人"
|
||||
align="center"
|
||||
key="requesterId_dictText"
|
||||
prop="requesterId_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="请求时间"
|
||||
align="center"
|
||||
key="requestTime"
|
||||
prop="requestTime"
|
||||
:show-overflow-tooltip="true"
|
||||
width="160px"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.requestTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="医嘱名称"
|
||||
align="center"
|
||||
key="adviceName"
|
||||
prop="adviceName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="volume"
|
||||
prop="volume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="产品批号"
|
||||
align="center"
|
||||
key="lotNumber"
|
||||
prop="lotNumber"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="请求数量" align="center" prop="">
|
||||
<template #default="scope">
|
||||
<span>
|
||||
{{ scope.row.quantity ? scope.row.quantity + ' ' + scope.row.unitCode_dictText : '' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
label="请求单位"
|
||||
align="center"
|
||||
key="unitCode_dictText"
|
||||
prop="unitCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/> -->
|
||||
<el-table-column label="请求状态" align="center" prop="" width="80">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.statusEnum == 2" type="success">已签发</el-tag>
|
||||
<el-tag v-else-if="!scope.row.requestId && scope.row.statusEnum == 1" type="warning"
|
||||
>待保存</el-tag
|
||||
>
|
||||
<el-tag v-else-if="scope.row.statusEnum == 1" type="primary">待签发</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="用法"
|
||||
align="center"
|
||||
key="methodCode_dictText"
|
||||
prop="methodCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="使用频次"
|
||||
align="center"
|
||||
key="rateCode_dictText"
|
||||
prop="rateCode_dictText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="单次剂量" align="center" prop="">
|
||||
<template #default="scope">
|
||||
<span>
|
||||
{{ scope.row.dose ? scope.row.dose + ' ' + scope.row.doseUnitCode_dictText : '' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总价" align="center" prop="" header-align="center" width="99">
|
||||
<template #default="scope">
|
||||
<span style="text-align: center">
|
||||
{{ scope.row.totalPrice ? Number(scope.row.totalPrice).toFixed(2) + ' 元' : '-' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="收费状态"
|
||||
align="center"
|
||||
key="chargeStatus_enumText"
|
||||
prop="chargeStatus_enumText"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="收费状态" align="center" prop="" width="80">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.chargeStatus == 2" type="success">{{scope.row.chargeStatus_enumText}}</el-tag>
|
||||
<el-tag v-else-if="!scope.row.requestId && scope.row.chargeStatus == 1" type="warning"
|
||||
>{{scope.row.chargeStatus_enumText}}</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum == 1" type="primary">{{scope.row.chargeStatus_enumText}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发药药房/耗材房/执行科室" align="center" prop="" width="179">
|
||||
<template #default="scope">
|
||||
<span v-if="!scope.row.isEdit">
|
||||
{{ scope.row.positionName }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="用药天数"
|
||||
align="center"
|
||||
key="dispensePerDuration"
|
||||
prop="dispensePerDuration"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="诊断定义名称"
|
||||
align="center"
|
||||
key="conditionDefinitionName"
|
||||
prop="conditionDefinitionName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="historicalPrescriptionDetail">
|
||||
import {
|
||||
getPrescriptionDetail
|
||||
} from "./api";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
typeDetail: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
prescriptionNo:{
|
||||
type: String,
|
||||
required: false,
|
||||
}
|
||||
});
|
||||
|
||||
const prescriptionNo = ref('')
|
||||
const typeDetail = ref('2')
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(false);
|
||||
const occurrenceTime = ref([])
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const supplyStatusOptions = ref(undefined);
|
||||
const groupMarkers = ref([]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
typeDetail.value = newValue.typeDetail;
|
||||
getList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
const emits = defineEmits(['handleBack']);
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function handleBack(){
|
||||
typeDetail.value = '1'
|
||||
emits("handleBack", typeDetail.value);
|
||||
}
|
||||
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// props.prescriptionNo = ""
|
||||
getPrescriptionDetail(props.prescriptionNo).then((res) => {
|
||||
loading.value = false;
|
||||
if(res.data&&res.data.length>0){
|
||||
purchaseinventoryList.value = res.data
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
getList()
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,238 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Back" @click="handleBack">返回列表</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="CircleClose"
|
||||
@click="handleClear"
|
||||
|
||||
>重置</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<div>
|
||||
<div class="prescription-container">
|
||||
<div>
|
||||
<span>处方号:</span>
|
||||
<span>CF0000000001</span>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<h2>长春大学医院</h2>
|
||||
</div>
|
||||
<div style="text-align: center">
|
||||
<h3>处方单</h3>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<span class="item-label">姓名:</span>
|
||||
<span class="item-value">张先生</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">年龄:</span>
|
||||
<span class="item-value">20岁</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">性别:</span>
|
||||
<span class="item-value">男</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<span class="item-label">科室:</span>
|
||||
<span class="item-value">门诊内科</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">费用性质:</span>
|
||||
<span class="item-value">自费</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">日期:</span>
|
||||
<span class="item-value">2025-01-01</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<span class="item-label">门诊号:</span>
|
||||
<span class="item-value">M0000000001</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">开单医生:</span>
|
||||
<span class="item-value">徐丹</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<span class="item-label">诊断:</span>
|
||||
<span class="item-value">感冒</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div style="font-size: 16px; font-weight: 700">Rp</div>
|
||||
<div class="medicen-list">
|
||||
<div>
|
||||
<span>1.</span>
|
||||
<span>罗红霉素分散片</span>
|
||||
<span>1mg</span>
|
||||
<span>1盒</span>
|
||||
<span>批次号: 202500000001</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>用法:</span>
|
||||
<span>口服一次1片一天</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<span class="item-label">医师:</span>
|
||||
<span class="item-value">徐丹</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">收费:</span>
|
||||
<span class="item-value"></span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">合计:</span>
|
||||
<span class="item-value">徐丹</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<span class="item-label">调配:</span>
|
||||
<span class="item-value">徐丹</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">核对:</span>
|
||||
<span class="item-value"></span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="item-label">发药:</span>
|
||||
<span class="item-value">徐丹</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="historicalPrescriptionDetail">
|
||||
import { getPrescriptionDetail } from './api';
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const props = defineProps({
|
||||
typeDetail: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
prescriptionNo: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
const prescriptionNo = ref('');
|
||||
const typeDetail = ref('2');
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(false);
|
||||
const occurrenceTime = ref([]);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const supplyStatusOptions = ref(undefined);
|
||||
const groupMarkers = ref([]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
watch(
|
||||
() => props,
|
||||
(newValue) => {
|
||||
typeDetail.value = newValue.typeDetail;
|
||||
getList();
|
||||
},
|
||||
{ immdiate: true, deep: true }
|
||||
);
|
||||
const emits = defineEmits(['handleBack']);
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
function handleBack() {
|
||||
typeDetail.value = '1';
|
||||
emits('handleBack', typeDetail.value);
|
||||
}
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// props.prescriptionNo = ""
|
||||
getPrescriptionDetail(props.prescriptionNo).then((res) => {
|
||||
loading.value = false;
|
||||
if (res.data && res.data.length > 0) {
|
||||
purchaseinventoryList.value = res.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.prescription-container {
|
||||
height: 650px;
|
||||
width: 500px;
|
||||
border: solid 2px #757575;
|
||||
font-size: 13px;
|
||||
padding: 10px;
|
||||
}
|
||||
.divider {
|
||||
height: 2px;
|
||||
background-color: #757575;
|
||||
margin: 5px 0 5px 0;
|
||||
}
|
||||
.medicen-list {
|
||||
height: 330px;
|
||||
}
|
||||
.item-label {
|
||||
width: 70px;
|
||||
text-align: left;
|
||||
font-weight: 700;
|
||||
color: #000000;
|
||||
display: inline-block;
|
||||
}
|
||||
.item-value {
|
||||
color: #393a3b;
|
||||
font-weight: 500;
|
||||
width: 80px;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,304 @@
|
||||
<template>
|
||||
<div class="app-container" v-loading="loadingcontainer" v-if="typeDetail == '1'">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="earlyWarningRef"
|
||||
:inline="true"
|
||||
:rules="rules"
|
||||
label-width="200px"
|
||||
>
|
||||
<el-form-item label="处方号/病人名称/开方医生:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="可按处方号/病人名称/开方医生查询"
|
||||
clearable
|
||||
style="width: 260px"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:import']" -->
|
||||
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- v-hasPermi="['system:user:export']" -->
|
||||
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="purchaseinventoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="处方号"
|
||||
align="center"
|
||||
key="prescriptionNo"
|
||||
prop="prescriptionNo"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="患者"
|
||||
align="center"
|
||||
key="patientName"
|
||||
prop="patientName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="疾病诊断"
|
||||
align="center"
|
||||
key="conditionDefinitionName"
|
||||
prop="conditionDefinitionName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="修改时间"
|
||||
align="center"
|
||||
key="requestTime"
|
||||
prop="requestTime"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.requestTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="开方医生"
|
||||
align="center"
|
||||
key="practitionerName"
|
||||
prop="practitionerName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
fixed="right"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="View" @click="viewDetails(scope.row)"
|
||||
>查看</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
<!-- <historicalPrescriptionDetail
|
||||
v-loading="loadingcontainer"
|
||||
v-else
|
||||
@handleBack="handleBack"
|
||||
:typeDetail="typeDetail"
|
||||
:prescriptionNo="prescriptionNo"
|
||||
/> -->
|
||||
<Prescription v-else />
|
||||
</template>
|
||||
|
||||
<script setup name="historicalPrescription">
|
||||
import { ref } from 'vue';
|
||||
import { getPrescriptionPageInfo } from './component/api';
|
||||
import historicalPrescriptionDetail from './component/details.vue';
|
||||
import Prescription from './component/prescription.vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const { item_type } = proxy.useDict('item_type');
|
||||
const prescriptionNo = ref('');
|
||||
const typeDetail = ref('1');
|
||||
const purchaseinventoryList = ref([]);
|
||||
const loading = ref(false);
|
||||
const loadingcontainer = ref(false);
|
||||
const occurrenceTime = ref([]);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const supplyTypeOptions = ref(undefined);
|
||||
const supplyStatusOptions = ref(undefined);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
categoryCode: undefined,
|
||||
remainingMonth: undefined,
|
||||
expirationDateSTime: undefined,
|
||||
expirationDateETime: undefined,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
function handleBack(val) {
|
||||
loadingcontainer.value = true;
|
||||
typeDetail.value = val;
|
||||
setTimeout(() => {
|
||||
loadingcontainer.value = false;
|
||||
}, 800);
|
||||
}
|
||||
function viewDetails(row) {
|
||||
loadingcontainer.value = true;
|
||||
prescriptionNo.value = row.prescriptionNo;
|
||||
console.log(row.prescriptionNo, prescriptionNo.value, '详情');
|
||||
typeDetail.value = '2';
|
||||
setTimeout(() => {
|
||||
loadingcontainer.value = false;
|
||||
}, 700);
|
||||
}
|
||||
|
||||
/** 查询调拨管理项目列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getPrescriptionPageInfo(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
|
||||
// res = {
|
||||
// "code": 200,
|
||||
// "msg": "操作成功",
|
||||
// "data": {
|
||||
// "records": [
|
||||
// {
|
||||
// "prescriptionNo": "PCN00000029",
|
||||
// "encounterId": "1937393559205539842",
|
||||
// "patientId": "1937393514477481986",
|
||||
// "patientName": "龙傲天",
|
||||
// "conditionDefinitionName": "感冒",
|
||||
// "requestTime": "2025-06-24 17:05:36",
|
||||
// "practitionerName": "李辉"
|
||||
// },
|
||||
// {
|
||||
// "prescriptionNo": "PCN00000028",
|
||||
// "encounterId": "1937393559205539842",
|
||||
// "patientId": "1937393514477481986",
|
||||
// "patientName": "龙傲天",
|
||||
// "conditionDefinitionName": "感冒",
|
||||
// "requestTime": "2025-06-24 17:02:18",
|
||||
// "practitionerName": "李辉"
|
||||
// },
|
||||
// {
|
||||
// "prescriptionNo": "PCN00000027",
|
||||
// "encounterId": "1937393559205539842",
|
||||
// "patientId": "1937393514477481986",
|
||||
// "patientName": "龙傲天",
|
||||
// "conditionDefinitionName": "感冒",
|
||||
// "requestTime": "2025-06-24 14:25:21",
|
||||
// "practitionerName": "李辉"
|
||||
// },
|
||||
// {
|
||||
// "prescriptionNo": "PCN00000023",
|
||||
// "encounterId": "1937393559205539842",
|
||||
// "patientId": "1937393514477481986",
|
||||
// "patientName": "龙傲天",
|
||||
// "conditionDefinitionName": "感冒",
|
||||
// "requestTime": "2025-06-24 14:14:26",
|
||||
// "practitionerName": "李辉"
|
||||
// },
|
||||
// {
|
||||
// "prescriptionNo": "PCN00000022",
|
||||
// "encounterId": "1937113899091587074",
|
||||
// "patientId": "1937066626118815745",
|
||||
// "patientName": "就诊卡",
|
||||
// "conditionDefinitionName": "肾痨",
|
||||
// "requestTime": "2025-06-24 14:05:18",
|
||||
// "practitionerName": "李辉"
|
||||
// },
|
||||
// {
|
||||
// "prescriptionNo": "PCN00000004",
|
||||
// "encounterId": "1935570184300519426",
|
||||
// "patientId": "1935541163105837058",
|
||||
// "patientName": "孙嘉琦",
|
||||
// "conditionDefinitionName": "眼科杂病",
|
||||
// "requestTime": "2025-06-19 16:24:47",
|
||||
// "practitionerName": "李辉"
|
||||
// },
|
||||
// {
|
||||
// "prescriptionNo": "PCN00000003",
|
||||
// "encounterId": "1935570184300519426",
|
||||
// "patientId": "1935541163105837058",
|
||||
// "patientName": "孙嘉琦",
|
||||
// "conditionDefinitionName": "眼科杂病",
|
||||
// "requestTime": "2025-06-19 16:24:47",
|
||||
// "practitionerName": "李辉"
|
||||
// },
|
||||
// {
|
||||
// "prescriptionNo": "PCN00000002",
|
||||
// "encounterId": "1935570184300519426",
|
||||
// "patientId": "1935541163105837058",
|
||||
// "patientName": "孙嘉琦",
|
||||
// "conditionDefinitionName": "眼科杂病",
|
||||
// "requestTime": "2025-06-19 14:40:05",
|
||||
// "practitionerName": "李辉"
|
||||
// }
|
||||
// ],
|
||||
// "total": 8,
|
||||
// "size": 10,
|
||||
// "current": 1,
|
||||
// "orders": [],
|
||||
// "optimizeCountSql": true,
|
||||
// "searchCount": true,
|
||||
// "maxLimit": null,
|
||||
// "countId": null,
|
||||
// "pages": 1
|
||||
// }
|
||||
// }
|
||||
|
||||
purchaseinventoryList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
// proxy.$refs['earlyWarningRef'].validate((valid) => {
|
||||
// if (valid) {
|
||||
queryParams.value.expirationDateSTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + ' 00:00:00'
|
||||
: '';
|
||||
queryParams.value.expirationDateETime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + ' 23:59:59'
|
||||
: '';
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
// }
|
||||
// })
|
||||
}
|
||||
|
||||
/** 清空条件按钮操作 */
|
||||
function handleClear() {
|
||||
// 清空查询条件
|
||||
queryParams.value.expirationDateSTime = '';
|
||||
queryParams.value.expirationDateETime = '';
|
||||
occurrenceTime.value = '';
|
||||
proxy.resetForm('earlyWarningRef');
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,20 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 待执行输液记录查询
|
||||
export function getChargeItemByOrg(data) {
|
||||
return request({
|
||||
url: '/payment/bill/charge-summary',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function getDepartmentList() {
|
||||
return request({
|
||||
url: '/app-common/department-list',
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<div class="app-continer">
|
||||
<div style="margin: 15px 0; padding: 0 20px">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="90px">
|
||||
<el-form-item label="科室" prop="orgIdList">
|
||||
<el-select
|
||||
v-model="queryParams.orgIdList"
|
||||
placeholder="请选择科室"
|
||||
clearable
|
||||
multiple
|
||||
style="width: 480px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in departmentList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="结算时间:" prop="activeFlag">
|
||||
<el-date-picker
|
||||
v-model="occurrenceTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 300px; margin-bottom: 10px; margin-left: 20px"
|
||||
value-format="YYYY-MM-DD"
|
||||
:clearable="false"
|
||||
@change="getClinicRecord"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div style="float: right">
|
||||
<el-button type="primary" plain @click="getClinicRecord">查询</el-button>
|
||||
<el-button type="warning" plain @click="handleReset">重置</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table :data="clinicRecord" show-summary border>
|
||||
<!-- <el-table-column label="计算类型" align="center" prop="statusEnum_enumText" /> -->
|
||||
<el-table-column label="序号" width="80" type="index" align="center">
|
||||
<template #default="scope">
|
||||
<span>{{ (queryParams.pageNo - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="科室" align="center" prop="orgName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="人次" align="center" prop="personCnt" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="应收金额" align="center" prop="amount" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="实收金额" align="center" prop="receivedAmount" width="280" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="挂号费" align="center" prop="registrationFee" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="处置费" align="center" prop="serviceFee" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="药品费" align="center" prop="medFee" :show-overflow-tooltip="true"/>
|
||||
<!-- <el-table-column label="优惠金额" align="center" prop="entererName" :show-overflow-tooltip="true"/> -->
|
||||
<!-- <el-table-column label="日结" align="center" prop="outcomeEnum_dictText" :show-overflow-tooltip="true"/> -->
|
||||
<!-- <el-table-column label="月累计" align="center" prop="printCount" :show-overflow-tooltip="true"/> -->
|
||||
<el-table-column label="备注" align="center" prop="printCount" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getLists"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="incomeStatement">
|
||||
const { proxy } = getCurrentInstance();
|
||||
import { getChargeItemByOrg, getDepartmentList } from './components/api.js';
|
||||
import { formatDate } from '@/utils/index';
|
||||
const occurrenceTime = ref([formatDate(new Date()),formatDate(new Date())]);
|
||||
const total = ref(0);
|
||||
const queryParams = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
startTime:"",
|
||||
endTime:"",
|
||||
searchKey:"",
|
||||
});
|
||||
const clinicRecord = ref([]);
|
||||
const paymentDetailList = ref([])
|
||||
const departmentList = ref([])
|
||||
getOrgId()
|
||||
getClinicRecord();
|
||||
function getClinicRecord() {
|
||||
queryParams.value.startTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[0] + " 00:00:00"
|
||||
: "";
|
||||
queryParams.value.endTime =
|
||||
occurrenceTime.value && occurrenceTime.value.length == 2
|
||||
? occurrenceTime.value[1] + " 23:59:59"
|
||||
: "";
|
||||
queryParams.value.pageNo = 1;
|
||||
getLists()
|
||||
}
|
||||
function getOrgId() {
|
||||
getDepartmentList().then(res => {
|
||||
departmentList.value = res.data
|
||||
})
|
||||
}
|
||||
function getLists(){
|
||||
getChargeItemByOrg(queryParams.value).then((res) => {
|
||||
total.value = res.data.total;
|
||||
clinicRecord.value = res.data.clinic;
|
||||
});
|
||||
}
|
||||
/** 清空条件按钮操作 */
|
||||
function handleReset() {
|
||||
// 清空查询条件
|
||||
occurrenceTime.value = ""
|
||||
queryParams.value.startTime = ""
|
||||
queryParams.value.endTime = ""
|
||||
proxy.resetForm("queryRef");
|
||||
getLists();
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-dialog{
|
||||
height: 90vh!important;
|
||||
}
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
.el-textarea__inner {
|
||||
resize: none;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="医嘱列表"
|
||||
v-model="props.open"
|
||||
width="1300px"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@close="close"
|
||||
@open="openDialog"
|
||||
>
|
||||
<div>
|
||||
<!-- <el-row :gutter="24" class="mb8">
|
||||
<el-col :span="12">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="诊断名称/拼音码"
|
||||
clearable
|
||||
style="width: 100%; margin-bottom: 10px"
|
||||
@keyup.enter="queryDiagnosisUse"
|
||||
>
|
||||
<template #append>
|
||||
<el-button icon="Search" @click="queryDiagnosisUse" />
|
||||
</template>
|
||||
</el-input>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
<el-table
|
||||
ref="refundListRef"
|
||||
:data="props.adviceList"
|
||||
row-key="paymentId"
|
||||
row-class-name="parent-row"
|
||||
v-loading="tableLoading"
|
||||
border
|
||||
max-height="600"
|
||||
>
|
||||
<el-table-column type="index" align="center"/>
|
||||
<el-table-column label="医嘱" align="center" prop="adviceName" width="200" />
|
||||
<el-table-column label="状态" align="center" prop="" width="90">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.statusEnum == 2" type="success">已签发</el-tag>
|
||||
<el-tag v-else-if="!scope.row.requestId && scope.row.statusEnum == 1" type="warning">
|
||||
待保存
|
||||
</el-tag>
|
||||
<el-tag v-else-if="scope.row.statusEnum == 1" type="primary">待签发</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单次剂量" align="center" prop="">
|
||||
<template #default="scope">
|
||||
{{ scope.row.dose ? scope.row.dose + ' ' + scope.row.doseUnitCode_dictText : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总量" align="center" prop="">
|
||||
<template #default="scope">
|
||||
{{ scope.row.quantity ? scope.row.quantity + ' ' + scope.row.unitCode_dictText : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" align="right" prop="" header-align="center" width="100">
|
||||
<template #default="scope">
|
||||
<span style="text-align: right">
|
||||
{{ scope.row.totalPrice ? Number(scope.row.totalPrice).toFixed(2) + ' 元' : '-' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="药房/科室" align="center" prop="" width="180">
|
||||
<template #default="scope">
|
||||
{{ scope.row.positionName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="频次/用法" align="center" prop="" width="180">
|
||||
<template #default="scope">
|
||||
<span style="text-align: right">
|
||||
{{
|
||||
scope.row.rateCode_dictText
|
||||
? scope.row.rateCode_dictText +
|
||||
' ' +
|
||||
scope.row.dispensePerDuration +
|
||||
'天' +
|
||||
' ' +
|
||||
scope.row.methodCode_dictText
|
||||
: ''
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="注射药品" align="center" prop="" width="80">
|
||||
<template #default="scope">
|
||||
{{ scope.row.injectFlag_enumText || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="皮试" align="center" prop="" width="80">
|
||||
<template #default="scope">
|
||||
{{ scope.row.skinTestFlag_enumText || '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="诊断" align="center" prop="diagnosisName" width="150">
|
||||
<template #default="scope">
|
||||
{{ scope.row.diagnosisName || scope.row.conditionDefinitionName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="close">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
open: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
adviceList: {
|
||||
type: [],
|
||||
default: [],
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
function close() {
|
||||
emit('close');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.sub-table-wrapper {
|
||||
padding: 16px 55px;
|
||||
background: #f9fafe;
|
||||
|
||||
.nested-sub-table {
|
||||
border: 1px solid #e8e8f3;
|
||||
border-radius: 2px;
|
||||
|
||||
// :deep(.sub-cell) {
|
||||
// background: #ffffff !important;
|
||||
// padding: 12px 16px;
|
||||
// }
|
||||
}
|
||||
}
|
||||
:deep(.parent-row) {
|
||||
td {
|
||||
// background: #e8ece6 !important; /* 浅蓝色背景 */
|
||||
// border-color: #e4e7ed !important;
|
||||
height: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16px;
|
||||
border-top: 1px solid #ebeef5;
|
||||
|
||||
.total {
|
||||
margin-left: 20px;
|
||||
color: #f56c6c;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,88 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 待执行输液记录查询
|
||||
export function listInfusionRecord(encounterId) {
|
||||
return request({
|
||||
url: '/outpatient-manage/infusion/infusion-pending-record',
|
||||
method: 'get',
|
||||
params: encounterId
|
||||
})
|
||||
}
|
||||
// 病人列表
|
||||
export function listPatients(query) {
|
||||
return request({
|
||||
url: '/outpatient-manage/infusion/infusion-patient-list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 批量执行患者门诊输液
|
||||
export function updateInfusionRecord(data) {
|
||||
return request({
|
||||
url: '/outpatient-manage/infusion/infusion-perform',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 时间更改
|
||||
export function editPatientInfusionTime(data) {
|
||||
return request({
|
||||
url: '/outpatient-manage/infusion/infusion-perform-time',
|
||||
method: 'put',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
// 撤销申请
|
||||
export function cancelPerform(data) {
|
||||
return request({
|
||||
url: '/outpatient-manage/infusion/cancel-perform',
|
||||
method: 'put',
|
||||
params: { serviceReqId: data.serviceId }
|
||||
})
|
||||
}
|
||||
|
||||
// 点击患者,查询该患者的输液记录
|
||||
export function listPatientInfusionRecord(query) {
|
||||
return request({
|
||||
url: '/outpatient-manage/infusion/patient-infusion-record',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 门诊输液执行历史记录查询
|
||||
export function listPatientInfusionPerformRecord(params) {
|
||||
return request({
|
||||
url: '/outpatient-manage/infusion/infusion-perform-record',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化
|
||||
export function init() {
|
||||
return request({
|
||||
url: '/outpatient-manage/infusion/init',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
//输液贴打印获取
|
||||
export function getBottleLabel(params) {
|
||||
return request({
|
||||
url: '/report-manage/print/bottle-label-batch-print',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
//获取医嘱列表
|
||||
export function getAdvice(params) {
|
||||
return request({
|
||||
url: '/doctor-station/advice/request-base-info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,535 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="left">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||
<el-form-item label="就诊日期">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: auto"
|
||||
value-format="YYYY-MM-DD"
|
||||
@change="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="基础信息" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="门诊号/病人/ID"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="执行状态" prop="searchKey">
|
||||
<el-select
|
||||
v-model="queryParams.serviceStatus"
|
||||
placeholder="执行状态"
|
||||
style="width: 150px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<div style="margin-bottom: 10px">
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
:data="patientList"
|
||||
border
|
||||
style="width: 100%; height: 73%"
|
||||
highlight-current-row
|
||||
@row-click="handleCurrentChange"
|
||||
>
|
||||
<el-table-column prop="encounterBusNo" label="就诊号" width="120px" />
|
||||
<el-table-column prop="patientName" label="姓名" />
|
||||
<el-table-column prop="genderEnum_enumText" label="性别" />
|
||||
<el-table-column prop="ageString" label="年龄" />
|
||||
<el-table-column prop="serviceStatus_enumText" label="执行状态" />
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="SuccessFilled" @click="handleSubmit">确认执行</el-button>
|
||||
<!-- <el-button type="primary" plain icon="Printer" @click="resetQuery">打印患者卡</el-button> -->
|
||||
<el-button type="primary" plain icon="Printer" @click="printLabel">打印瓶签</el-button>
|
||||
<!-- <el-button type="primary" plain icon="Printer" @click="printbloodLabel"> -->
|
||||
<!-- 打印采血条码 -->
|
||||
<!-- </el-button> -->
|
||||
<!-- <el-button type="primary" plain icon="Printer" @click="resetQuery">打印输液单</el-button> -->
|
||||
<el-button type="primary" plain @click="geiAdviceList">查看医嘱</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
<p style="margin: 0px 0px 10px 0px">院注医嘱</p>
|
||||
<el-table
|
||||
:data="infusionList"
|
||||
highlight-current-row
|
||||
border
|
||||
style="width: 100%; height: 300px"
|
||||
:row-style="rowStyle"
|
||||
@selection-change="handleSelectionChange"
|
||||
@row-click="handleRowClick"
|
||||
ref="tableRef"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="组" width="50">
|
||||
<template #default="scope">
|
||||
<span>{{ markers[scope.$index] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="groupId" label="组" width="60" /> -->
|
||||
<el-table-column prop="busNo" label="编码" align="center" />
|
||||
<el-table-column prop="serviceName" label="项目" align="center" />
|
||||
<el-table-column prop="executeNum" label="总执行次数" align="center" />
|
||||
<el-table-column prop="performCount" label="已执行次数" align="center" />
|
||||
<el-table-column prop="practitionerName" label="开单医生" align="center" />
|
||||
<el-table-column prop="medicationName" label="药品信息" align="center" />
|
||||
<el-table-column prop="dose" label="药品数量" align="center">
|
||||
<template #default="scope">
|
||||
<span style="text-align: right">
|
||||
{{
|
||||
scope.row.unitCode_dictText
|
||||
? scope.row.quantity + ' ' + scope.row.unitCode_dictText
|
||||
: ''
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="speed" label="输液速度" width="80" /> -->
|
||||
<el-table-column prop="dispenseStatus_enumText" label="药品状态" align="center" />
|
||||
<el-table-column prop="skinTestFlag_enumText" label="皮试标志" align="center" />
|
||||
<!-- <el-table-column prop="clinicalStatusEnum_enumText" label="皮试结果" width="70" /> -->
|
||||
</el-table>
|
||||
</div>
|
||||
<div>
|
||||
<p style="margin: 13px 0px 10px 0px">院注执行历史</p>
|
||||
<el-table :data="historyRecordsList" border style="width: 100%; height: 300px">
|
||||
<el-table-column prop="occurrenceEndTime" label="执行时间" align="center" width="260">
|
||||
<template #default="scope">
|
||||
<div v-if="scope.row.isEdit" @dblclick="scope.row.isEdit = !scope.row.isEdit">
|
||||
{{ formatDate(scope.row.occurrenceEndTime) }}
|
||||
</div>
|
||||
<el-date-picker
|
||||
v-else
|
||||
v-model="scope.row.occurrenceEndTime"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 220px"
|
||||
@change="(value) => handleOccurrenceTimeChange(value, scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="performerName" label="执行人" align="center" />
|
||||
<el-table-column prop="serviceStatus_enumText" label="执行状态" align="center" />
|
||||
<el-table-column prop="serviceName" label="项目" align="center" />
|
||||
<el-table-column prop="orgName" label="执行科室" align="center" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="90"
|
||||
fixed="right"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleCancelPerform(scope.row)">
|
||||
撤销
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<AdviceListDialog :open="open" :adviceList="adviceList" @close="open = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="InfusionRecord">
|
||||
import { ref, computed } from 'vue';
|
||||
import {
|
||||
listPatients,
|
||||
updateInfusionRecord,
|
||||
listInfusionRecord,
|
||||
editPatientInfusionTime,
|
||||
listPatientInfusionPerformRecord,
|
||||
getBottleLabel,
|
||||
cancelPerform,
|
||||
init,
|
||||
getAdvice,
|
||||
} from './component/api';
|
||||
import AdviceListDialog from './component/adviceListDialog.vue';
|
||||
import { formatDate, formatDateStr } from '@/utils/index';
|
||||
|
||||
const showSearch = ref(true);
|
||||
const total = ref(1);
|
||||
const selectedItems = ref([]);
|
||||
|
||||
const tableRef = ref(null);
|
||||
const selectedGroupIds = ref(new Set());
|
||||
|
||||
const currentRow = ref(null);
|
||||
const dateRange = ref([
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||
]);
|
||||
const dateRangeRight = ref([]);
|
||||
const historyRecordsList = ref([]);
|
||||
const patientList = ref([]);
|
||||
const infusionList = ref([]);
|
||||
const timeRightStart = ref([]);
|
||||
const timeRightEnd = ref([]);
|
||||
const statusOptions = ref([]);
|
||||
const recordRow = ref({}); // 待执行点击行
|
||||
const encounterId = ref('');
|
||||
const groupColors = ['#C6E2FF', '#FFFFFF'];
|
||||
const markers = ref([]);
|
||||
const adviceList = ref([]);
|
||||
const open = ref(false);
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKey: undefined,
|
||||
serviceStatus: 10,
|
||||
},
|
||||
});
|
||||
const { queryParams } = toRefs(data);
|
||||
initOptions();
|
||||
function initOptions() {
|
||||
init().then((res) => {
|
||||
statusOptions.value = res.data.serviceStatusOptions;
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询门诊输液列表 */
|
||||
function getList() {
|
||||
if (dateRange.value) {
|
||||
queryParams.value.createTimeSTime = dateRange.value[0] + ' 00:00:00';
|
||||
queryParams.value.createTimeETime = dateRange.value[1] + ' 23:59:59';
|
||||
} else {
|
||||
queryParams.value.createTimeSTime = null;
|
||||
queryParams.value.createTimeETime = null;
|
||||
}
|
||||
listPatients(queryParams.value).then((response) => {
|
||||
total.value = response.data.total;
|
||||
patientList.value = response.data.records;
|
||||
});
|
||||
}
|
||||
function updateTableRowStyles() {
|
||||
const tableRows = document.querySelectorAll('.infusion-table-row');
|
||||
tableRows.forEach((row) => {
|
||||
const groupId = row.getAttribute('data-group-id');
|
||||
const color = groupColors[groupId % 2]; // 奇偶性决定颜色
|
||||
if (color) {
|
||||
row.style.backgroundColor = color;
|
||||
}
|
||||
});
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
dateRange.value = [];
|
||||
proxy.resetForm('queryRef');
|
||||
getList();
|
||||
}
|
||||
/** 打印瓶贴 */
|
||||
async function printLabel() {
|
||||
const selectedRows = proxy.$refs['tableRef'].getSelectionRows();
|
||||
if (selectedRows.length === 0) {
|
||||
proxy.$modal.msgWarning('未选择要打印的医嘱,请重新选择,打印失败');
|
||||
return;
|
||||
}
|
||||
const result = {
|
||||
data: selectedRows.map((item) => {
|
||||
// 创建新对象避免修改原数据
|
||||
return {
|
||||
...item,
|
||||
// 当 groupid 为 null 时,用 bus_no 替换
|
||||
groupId: item.groupId === null ? item.busNo : item.groupId,
|
||||
name: currentRow.value.patientName,
|
||||
sex: currentRow.value.genderEnum_enumText,
|
||||
age: currentRow.value.ageString,
|
||||
printDate: formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'),
|
||||
};
|
||||
}),
|
||||
};
|
||||
// 将对象转换为 JSON 字符串
|
||||
let jsonString = JSON.stringify(result, null, 2);
|
||||
console.log(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);
|
||||
});
|
||||
}
|
||||
//打印采血条码
|
||||
async function printbloodLabel() {
|
||||
const selectedRows = proxy.$refs['tableRef'].getSelectionRows();
|
||||
if (selectedRows.length === 0) {
|
||||
proxy.$modal.msgWarning('未选择要打印的检验项目,请重新选择,打印失败');
|
||||
return;
|
||||
}
|
||||
// 构造一个新的对象,添加头 "data"
|
||||
const result = {
|
||||
data: selectedRows.map((item) => {
|
||||
// 创建新对象避免修改原数据
|
||||
return {
|
||||
...item,
|
||||
// 当 groupid 为 null 时,用 bus_no 替换
|
||||
groupId: item.groupId === null ? item.busNo : item.groupId,
|
||||
name: currentRow.value.patientName,
|
||||
sex: currentRow.value.genderEnum_enumText,
|
||||
age: currentRow.value.ageString,
|
||||
};
|
||||
}),
|
||||
};
|
||||
// 将对象转换为 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);
|
||||
});
|
||||
}
|
||||
function handleRowClick(row) {
|
||||
recordRow.value = row;
|
||||
listPatientInfusionPerformRecord({
|
||||
serviceReqId: row.serviceId,
|
||||
}).then((response) => {
|
||||
historyRecordsList.value =
|
||||
response.data.records.length > 0
|
||||
? response.data.records.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
isEdit: true,
|
||||
};
|
||||
})
|
||||
: [];
|
||||
});
|
||||
}
|
||||
|
||||
function geiAdviceList() {
|
||||
if (!encounterId.value) {
|
||||
proxy.$modal.msgWarning('请先选择患者');
|
||||
return;
|
||||
}
|
||||
open.value = true;
|
||||
getAdvice({ encounterId: encounterId.value }).then((res) => {
|
||||
adviceList.value = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
function getRowMarkers(groupCounts, data) {
|
||||
const markers = new Array(data.length).fill('');
|
||||
|
||||
groupCounts.forEach((groupInfo, groupId) => {
|
||||
const { count, indices } = groupInfo;
|
||||
if (count === 1) {
|
||||
// 如果只有一行,不显示标记
|
||||
return;
|
||||
} else if (count === 2) {
|
||||
// 如果有两行,分别显示左右括号
|
||||
markers[indices[0]] = '┏';
|
||||
markers[indices[1]] = '┗ ';
|
||||
} else {
|
||||
// 如果有两行以上,第一条显示左括号,中间用竖线,最后一条显示右括号
|
||||
markers[indices[0]] = '┏';
|
||||
for (let i = 1; i < indices.length - 1; i++) {
|
||||
markers[indices[i]] = '┃';
|
||||
}
|
||||
markers[indices[indices.length - 1]] = '┗ ';
|
||||
}
|
||||
});
|
||||
|
||||
return markers;
|
||||
}
|
||||
|
||||
// 生成行数
|
||||
function countGroupRows(data) {
|
||||
const groupCounts = new Map();
|
||||
data.forEach((item, index) => {
|
||||
if (!groupCounts.has(item.groupId)) {
|
||||
groupCounts.set(item.groupId, { count: 0, indices: [] });
|
||||
}
|
||||
const groupInfo = groupCounts.get(item.groupId);
|
||||
groupInfo.count++;
|
||||
groupInfo.indices.push(index);
|
||||
});
|
||||
return groupCounts;
|
||||
}
|
||||
|
||||
// 执行输液
|
||||
function handleSubmit() {
|
||||
console.log(selectedItems.value);
|
||||
|
||||
const itemsList = selectedItems.value.map((item) => {
|
||||
return item.serviceId;
|
||||
});
|
||||
// 如果没有有效数据,直接返回
|
||||
if (itemsList.length === 0) {
|
||||
proxy.$modal.msgError('没有有效的数据可供提交');
|
||||
return;
|
||||
}
|
||||
// const allExecuted = itemsList.every((item) => item.executeNum === item.doneNum);
|
||||
// if (allExecuted) {
|
||||
// // 如果所有药品的 executeNum 和 doneNum 都相等,提示用户
|
||||
// proxy.$modal.msgError('已执行完总次数');
|
||||
// return;
|
||||
// }
|
||||
updateInfusionRecord(itemsList).then((response) => {
|
||||
proxy.$modal.msgSuccess('执行成功');
|
||||
// clearSelections();
|
||||
});
|
||||
}
|
||||
|
||||
function handleSelectionChange(selection) {
|
||||
// // 清空之前选中的数据
|
||||
selectedItems.value = [];
|
||||
// // 将当前选中的数据存到 selectedItems 中
|
||||
selection.forEach((item) => {
|
||||
selectedItems.value.push(item);
|
||||
});
|
||||
// // 更新 selectedGroupIds
|
||||
// selection.forEach((item) => {
|
||||
// const groupId = item.groupId;
|
||||
// // 检查 groupId 是否同时存在
|
||||
// if (selectedGroupIds.value.has(groupId)) {
|
||||
// // 如果都存在,则移除它们
|
||||
// selectedGroupIds.value.delete(groupId);
|
||||
// } else {
|
||||
// // 否则添加它们
|
||||
// selectedGroupIds.value.add(groupId);
|
||||
// }
|
||||
// });
|
||||
// // 动态更新表格行的选中状态
|
||||
// infusionList.value.forEach((row) => {
|
||||
// const isSelected = selectedGroupIds.value.has(row.groupId);
|
||||
// tableRef.value.toggleRowSelection(row, isSelected);
|
||||
// });
|
||||
}
|
||||
function clearSelections() {
|
||||
listInfusionRecord(currentRow.value.patientId).then((response) => {
|
||||
infusionList.value = response.data;
|
||||
});
|
||||
listPatientInfusionPerformRecord(currentRow.value.patientId).then((response) => {
|
||||
historyRecordsList.value = response.data;
|
||||
});
|
||||
}
|
||||
// function rowStyle({ row }) {
|
||||
// const colorIndex = row.groupId % 2; // 奇偶性决定颜色索引
|
||||
// return { backgroundColor: groupColors[colorIndex] };
|
||||
// }
|
||||
|
||||
function handleCurrentChange(row) {
|
||||
currentRow.value = row; // 更新当前选中行的数据
|
||||
console.log(row, '123123');
|
||||
listInfusionRecord({ encounterId: row.encounterId, serviceStatus: row.serviceStatus }).then(
|
||||
(response) => {
|
||||
encounterId.value = row.encounterId;
|
||||
console.log('Full response1:', response);
|
||||
infusionList.value = response.data.records;
|
||||
// 为每个 groupId 分配固定颜色
|
||||
response.data.records.forEach((item) => {
|
||||
const colorIndex = item.groupId % 2; // 奇偶性决定颜色索引
|
||||
item.color = groupColors[colorIndex];
|
||||
});
|
||||
// 更新表格行的样式
|
||||
updateTableRowStyles();
|
||||
// 统计每个 groupId 的行数
|
||||
const groupCounts = countGroupRows(infusionList.value);
|
||||
// 设置每行的标记
|
||||
markers.value = getRowMarkers(groupCounts, infusionList.value);
|
||||
}
|
||||
);
|
||||
historyRecordsList.value = [];
|
||||
// listPatientInfusionPerformRecord(currentRow.value.patientId).then((response) => {
|
||||
// historyRecordsList.value = response.data;
|
||||
// });
|
||||
}
|
||||
|
||||
function handleOccurrenceTimeChange(value, row) {
|
||||
editPatientInfusionTime({ serviceReqId: row.serviceId, performTime: value }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
row.isEdit = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleCancelPerform(row) {
|
||||
cancelPerform(row).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('操作成功');
|
||||
handleRowClick(recordRow.value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.app-container {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.left {
|
||||
width: 28%;
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: 2%;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
:deep(.el-table tbody tr:hover > td) {
|
||||
background-color: inherit !important;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
@@ -0,0 +1,2 @@
|
||||
<template>
|
||||
</template>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user