版本更新
This commit is contained in:
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>
|
||||
Reference in New Issue
Block a user