v0.2
This commit is contained in:
@@ -1,92 +0,0 @@
|
||||
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',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/cabinet-location/cabinet-location',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
@@ -1,552 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" v-model="visible" width="800px" append-to-body>
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="deviceDialogRef"
|
||||
label-width="110px"
|
||||
label-position="left"
|
||||
>
|
||||
<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' }"
|
||||
value-key="value"
|
||||
placeholder=""
|
||||
check-strictly
|
||||
disabled
|
||||
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>
|
||||
<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="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="substanceText">
|
||||
<el-input v-model="form.substanceText" placeholder="" />
|
||||
</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-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 yb_type"
|
||||
: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="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="form.id != undefined"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最高零售价" prop="maximumRetailPrice">
|
||||
<el-input v-model="form.maximumRetailPrice" placeholder="" :disabled="form.id != undefined"/>
|
||||
</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,yb_type } = proxy.useDict(
|
||||
"device_type_code",
|
||||
"unit_code",
|
||||
"fin_type_code",
|
||||
"yb_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" },
|
||||
],
|
||||
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" }],
|
||||
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 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;
|
||||
console.log(props, "22222", title.value, props.deviceCategories);
|
||||
getDeptTree();
|
||||
getLocationTree();
|
||||
visible.value = true;
|
||||
}
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
deptOptions.value = response.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询地点下拉树结构 */
|
||||
function getLocationTree() {
|
||||
locationTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
locationOptions.value = response.data.records;
|
||||
});
|
||||
}
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
reset();
|
||||
title.value = "";
|
||||
title.value = props.title;
|
||||
form.value = props.item;
|
||||
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, // 医保编码
|
||||
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, // 最高零售价
|
||||
};
|
||||
proxy.resetForm("deviceDialogRef");
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
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 cancel() {
|
||||
visible.value = false;
|
||||
reset();
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
edit,
|
||||
});
|
||||
</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>
|
||||
@@ -1,352 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" v-model="visible" width="800px" append-to-body>
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="diseaseRef"
|
||||
label-width="110px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="编号" prop="busNo">
|
||||
<el-input
|
||||
v-model="form.busNo"
|
||||
placeholder="请输入编码"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="品名" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder="请输入药品名"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拼音码(品名)" prop="name">
|
||||
<el-input v-model="form.name" placeholder="" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="厂家/产地" prop="conditionCode">
|
||||
<el-select v-model="queryParams.status" clearable>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="name">
|
||||
<el-input v-model="form.name" placeholder="" :disabled="true" />
|
||||
</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-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位" prop="conditionCode">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="规格" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最小单位" prop="conditionCode">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="conditionCode">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拆零零售价" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
label="处方限量(最小单位)"
|
||||
prop="conditionCode"
|
||||
class="custom-label-spacing"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="皮试判别" prop="name">
|
||||
<el-checkbox v-model="form.status" :disabled="true"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="注射药品" prop="name">
|
||||
<el-checkbox v-model="form.status" :disabled="true"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="给药途径" prop="conditionCode">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="name" :disabled="true">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="name" inline :disabled="true">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
style="width: 49%"
|
||||
/>
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
style="width: 49%"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="8">
|
||||
<el-form-item label="剂型" prop="conditionCode">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="name">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="status">
|
||||
<el-input
|
||||
v-model="textarea2"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="MedicineDialog">
|
||||
// import {
|
||||
// getDiseaseList,
|
||||
// editDisease,
|
||||
// addDisease,
|
||||
// getDiseaseCategory,
|
||||
// getDiseaseOne,
|
||||
// } from "./components/medicine";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_normal_disable",
|
||||
"sys_user_sex"
|
||||
);
|
||||
|
||||
const diseaseList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const selectedData = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const dateRange = ref([]);
|
||||
const deptName = ref("");
|
||||
const visible = ref(false);
|
||||
const conditionDefinitionOptions = ref(undefined);
|
||||
// const initPassword = ref(undefined);
|
||||
// const postOptions = ref([]);
|
||||
// const roleOptions = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
conditionCode: [
|
||||
{ required: true, message: "编码不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
// queryParams.roleId = props.roleId;
|
||||
// getList();
|
||||
visible.value = true;
|
||||
}
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
// queryParams.roleId = props.roleId;
|
||||
// getList();
|
||||
console.log(props, "22222");
|
||||
console.log(props.item);
|
||||
console.log("props.item");
|
||||
form.value = props.item;
|
||||
visible.value = true;
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
edit,
|
||||
});
|
||||
</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>
|
||||
@@ -1,657 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--器材目录-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<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="4">
|
||||
<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"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>添加新项目</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Remove"
|
||||
:disabled="multiple"
|
||||
@click="handleClose"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>停用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="CirclePlus"
|
||||
:disabled="multiple"
|
||||
@click="handleStart"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>启用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="getList"
|
||||
v-hasPermi="['system:user:import']"
|
||||
>查询</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="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"
|
||||
/>
|
||||
<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="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"
|
||||
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)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="openViewDevice(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>查看</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="deviceCategories"
|
||||
:statusFlagOptions="statusFlagOptions"
|
||||
:supplierListOptions="supplierListOptions"
|
||||
@submit="getList()"
|
||||
/>
|
||||
<!-- <device-view-dialog
|
||||
ref="deviceViewRef"
|
||||
:item="viewData"
|
||||
:viewFlg="viewFlg"
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Device">
|
||||
import {
|
||||
getDeviceList,
|
||||
stopDevice,
|
||||
startDevice,
|
||||
getDiseaseTreatmentInit,
|
||||
getDeviceOne,
|
||||
} from "./components/device";
|
||||
import deviceDialog from "./components/deviceDialog";
|
||||
import deviceViewDialog from "./components/deviceViewDialog";
|
||||
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 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 = response.data.deviceCategories.sort((a, b) => {
|
||||
return parseInt(a.value) - parseInt(b.value);
|
||||
});
|
||||
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();
|
||||
});
|
||||
// currentData.value = JSON.parse(JSON.stringify(row));
|
||||
// console.log(currentData.value, "currentData");
|
||||
// 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);
|
||||
// console.log(currentData.value, "currentDataform");
|
||||
|
||||
// title.value = "编辑";
|
||||
// // 确保子组件已经接收到最新的 props
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["deviceRef"].edit();
|
||||
// });
|
||||
// proxy.$refs["deviceRef"].edit();
|
||||
}
|
||||
/** 打开查看弹窗 */
|
||||
function openViewDevice(row) {
|
||||
// viewData.value = row;
|
||||
getDeviceOne(row.id).then((response) => {
|
||||
currentData.value = response.data;
|
||||
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();
|
||||
});
|
||||
// console.log(viewData.value, "currentData");
|
||||
// // 确保子组件已经接收到最新的 props
|
||||
// nextTick(() => {
|
||||
// proxy.$refs["deviceViewRef"].edit();
|
||||
// });
|
||||
// proxy.$refs["deviceRef"].edit();
|
||||
}
|
||||
|
||||
getDiseaseTreatmentList();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,478 +0,0 @@
|
||||
<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"
|
||||
>
|
||||
<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
|
||||
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
|
||||
:disabled="form.categoryCode != ''"
|
||||
>
|
||||
<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>
|
||||
<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
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in yb_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-select v-model="form.bodySiteCode" clearable>
|
||||
<el-option
|
||||
v-for="category in body_site_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="specimenCode">
|
||||
<el-select v-model="form.specimenCode" clearable>
|
||||
<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="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>
|
||||
<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>
|
||||
<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="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最高零售价" prop="maximumRetailPrice">
|
||||
<el-input
|
||||
v-model="form.maximumRetailPrice"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<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,
|
||||
locationTreeSelect,
|
||||
} from "./diagnosistreatment";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { unit_code, yb_type, fin_type_code, activity_category_code } =
|
||||
proxy.useDict(
|
||||
"unit_code",
|
||||
"yb_type",
|
||||
"fin_type_code",
|
||||
"activity_category_code"
|
||||
);
|
||||
|
||||
const title = ref("");
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(["submit"]); // 声明自定义事件
|
||||
const categoryCode = ref("");
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
const locationOptions = ref(undefined); // 地点树选项
|
||||
const diagnosisCategoryOptions = ref(undefined);
|
||||
const statusFlagOptions = ref(undefined);
|
||||
const exeOrganizations = ref(undefined);
|
||||
const typeEnumOptions = ref(undefined);
|
||||
|
||||
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" }],
|
||||
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,
|
||||
},
|
||||
});
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
reset();
|
||||
getLocationTree();
|
||||
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;
|
||||
console.log(props.currentCategoryEnum, "11111");
|
||||
console.log(props, "22222", title.value);
|
||||
visible.value = true;
|
||||
}
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
reset();
|
||||
getLocationTree();
|
||||
getDeptTree();
|
||||
title.value = "";
|
||||
title.value = props.title;
|
||||
form.value = props.item;
|
||||
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, // 说明
|
||||
};
|
||||
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);
|
||||
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 getLocationTree() {
|
||||
locationTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
locationOptions.value = response.data.records;
|
||||
});
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
visible.value = false;
|
||||
reset();
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
edit,
|
||||
});
|
||||
</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>
|
||||
@@ -1,347 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" v-model="visible" width="800px" append-to-body>
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="diseaseRef"
|
||||
label-width="110px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="编号" prop="busNo">
|
||||
<el-input
|
||||
v-model="form.busNo"
|
||||
placeholder="请输入编码"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="品名" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder="请输入药品名"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拼音码(品名)" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="厂家/产地" prop="conditionCode">
|
||||
<el-select v-model="queryParams.status" clearable>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</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-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位" prop="conditionCode">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="规格" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
label="最小单位"
|
||||
prop="conditionCode"
|
||||
>
|
||||
<el-select v-model="queryParams.status" clearable :disabled="true">
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="conditionCode">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拆零零售价" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="处方限量(最小单位)" prop="conditionCode" class="custom-label-spacing">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="皮试判别" prop="name">
|
||||
<el-checkbox v-model="form.status" :disabled="true"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="注射药品" prop="name">
|
||||
<el-checkbox v-model="form.status" :disabled="true"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="给药途径" prop="conditionCode">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="name" :disabled="true">
|
||||
<el-select v-model="queryParams.status" clearable :disabled="true">
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="name" inline :disabled="true">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
style="width: 49%"
|
||||
/>
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
style="width: 49%"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="8">
|
||||
<el-form-item label="剂型" prop="conditionCode">
|
||||
<el-select v-model="queryParams.status" clearable :disabled="true">
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="name">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="status">
|
||||
<el-input
|
||||
v-model="textarea2"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="MedicineDialog">
|
||||
// import {
|
||||
// getDiseaseList,
|
||||
// editDisease,
|
||||
// addDisease,
|
||||
// getDiseaseCategory,
|
||||
// getDiseaseOne,
|
||||
// } from "./components/medicine";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_normal_disable",
|
||||
"sys_user_sex"
|
||||
);
|
||||
|
||||
const diseaseList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const selectedData = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const dateRange = ref([]);
|
||||
const deptName = ref("");
|
||||
const visible = ref(false);
|
||||
const conditionDefinitionOptions = ref(undefined);
|
||||
// const initPassword = ref(undefined);
|
||||
// const postOptions = ref([]);
|
||||
// const roleOptions = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
conditionCode: [
|
||||
{ required: true, message: "编码不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
// queryParams.roleId = props.roleId;
|
||||
// getList();
|
||||
visible.value = true;
|
||||
}
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
// queryParams.roleId = props.roleId;
|
||||
// getList();
|
||||
console.log(props, "22222");
|
||||
console.log(props.item);
|
||||
console.log("props.item");
|
||||
form.value = props.item;
|
||||
visible.value = true;
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
edit,
|
||||
});
|
||||
</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>
|
||||
@@ -1,83 +0,0 @@
|
||||
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 locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/cabinet-location/cabinet-location',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
@@ -1,578 +0,0 @@
|
||||
<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="4">
|
||||
<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="4">
|
||||
<el-form-item
|
||||
label="医保是否对码"
|
||||
prop="ybMatchFlag"
|
||||
label-width="100"
|
||||
>
|
||||
<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"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>添加新项目</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Remove"
|
||||
:disabled="multiple"
|
||||
@click="handleClose"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>停用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="CirclePlus"
|
||||
:disabled="multiple"
|
||||
@click="handleStart"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>启用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="getList"
|
||||
v-hasPermi="['system:user:import']"
|
||||
>查询</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"
|
||||
/>
|
||||
<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="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="50"
|
||||
/>
|
||||
<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)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="openViewDiagnosisTreatment(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>查看</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()"
|
||||
/>
|
||||
<!-- <diagnosis-treatment-view-dialog
|
||||
ref="diagnosisTreatmentViewRef"
|
||||
:item="viewData"
|
||||
:viewFlg="viewFlg"
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="DiagnosisTreatment">
|
||||
import {
|
||||
getDiagnosisTreatmentList,
|
||||
stopDiseaseTreatment,
|
||||
startDiseaseTreatment,
|
||||
getDiseaseTreatmentInit,
|
||||
getDiagnosisTreatmentOne,
|
||||
} from "./components/diagnosistreatment";
|
||||
import diagnosisTreatmentDialog from "./components/diagnosisTreatmentDialog";
|
||||
import diagnosisTreatmentViewDialog from "./components/diagnosisTreatmentViewDialog";
|
||||
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();
|
||||
});
|
||||
}
|
||||
/** 打开查看弹窗 */
|
||||
function openViewDiagnosisTreatment(row) {
|
||||
// viewData.value = row;
|
||||
getDiagnosisTreatmentOne(row.id).then((response) => {
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
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
|
||||
})
|
||||
}
|
||||
@@ -1,549 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--疾病目录数据-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<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"
|
||||
>
|
||||
<template v-slot="{ node, data }">
|
||||
<span class="custom-tree-node">
|
||||
<i
|
||||
:class="{
|
||||
'el-icon-folder': !node.expanded && !data.children.length,
|
||||
'el-icon-folder-opened': node.expanded,
|
||||
'el-icon-document': data.children.length === 0,
|
||||
}"
|
||||
style="color: #409eff"
|
||||
/>
|
||||
<span>{{ node.label }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
</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"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>添加新项目</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Remove"
|
||||
:disabled="multiple"
|
||||
@click="handleClose"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>停用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="CirclePlus"
|
||||
:disabled="multiple"
|
||||
@click="handleStart"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>启用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="getList"
|
||||
v-hasPermi="['system:user:import']"
|
||||
>查询</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="pyStr"
|
||||
prop="pyStr"
|
||||
: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="ybName"
|
||||
prop="ybName"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保对码标志"
|
||||
align="center"
|
||||
key="ybMatchFlag"
|
||||
prop="ybMatchFlag_enumText"
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
align="center"
|
||||
key="statusEnum"
|
||||
prop="statusEnum_enumText"
|
||||
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)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>查看</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="ybNo">
|
||||
<el-input v-model="form.ybNo" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="医保标记" prop="ybFlag">
|
||||
<el-checkbox v-model="form.ybFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="疾病类型" prop="typeCode">
|
||||
<el-select
|
||||
v-model="form.typeCode"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in conditionDefinitionOptions"
|
||||
: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="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>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label="医保对码标记"
|
||||
prop="ybMatchFlag"
|
||||
label-width="100"
|
||||
>
|
||||
<el-checkbox v-model="form.ybMatchFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="停用" prop="status">
|
||||
<el-checkbox v-model="form.status"></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 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 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" }],
|
||||
// conditionCode: [
|
||||
// { 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 = 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,
|
||||
status: 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("请选择病种目录分类");
|
||||
// }
|
||||
form.value.typeCode = conditionDefinition.value
|
||||
reset();
|
||||
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();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 详细按钮操作 */
|
||||
function handleView(row) {
|
||||
reset();
|
||||
title.value = "查看";
|
||||
open.value = true;
|
||||
getDiseaseOne(row.id).then((response) => {
|
||||
console.log(response, "responsebbbb", row.id);
|
||||
form.value = response.data;
|
||||
// getList();
|
||||
});
|
||||
}
|
||||
getDiseaseCategoryList();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -1,92 +0,0 @@
|
||||
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',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
// 查询地点树形数据
|
||||
export function locationTreeSelect(queryParams) {
|
||||
return request({
|
||||
url: '/base-data-manage/cabinet-location/cabinet-location',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
@@ -1,948 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" v-model="visible" width="1150px" append-to-body>
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="基本信息">
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="medicationRef"
|
||||
label-width="110px"
|
||||
label-position="left"
|
||||
>
|
||||
<div class="title">基本信息</div>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6" 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="6">
|
||||
<el-form-item label="通用名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="商品名称" prop="merchandiseName">
|
||||
<el-input v-model="form.merchandiseName" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="医保编码" prop="ybNo">
|
||||
<el-input v-model="form.ybNo" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="药品分类" prop="categoryCode">
|
||||
<el-select v-model="form.categoryCode" clearable :disabled="form.categoryCode != ''">
|
||||
<el-option
|
||||
v-for="category in med_category_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="医保对码" prop="ybMatchFlag">
|
||||
<el-checkbox v-model="form.ybMatchFlag" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="title">临床信息</div>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="药品性质" prop="pharmacologyCategoryCode">
|
||||
<el-select v-model="form.pharmacologyCategoryCode" clearable>
|
||||
<el-option
|
||||
v-for="category in medicine_properties"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="规格" prop="totalVolume">
|
||||
<el-input v-model="form.totalVolume" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="剂型" prop="doseFormCode">
|
||||
<el-select v-model="form.doseFormCode" clearable>
|
||||
<el-option
|
||||
v-for="category in dose_form_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="剂量单位" prop="doseUnitCode">
|
||||
<el-select v-model="form.doseUnitCode" clearable>
|
||||
<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-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="用量限定" prop="usageLimit">
|
||||
<el-input v-model="form.usageLimit" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="用法" prop="methodCode">
|
||||
<el-select v-model="form.methodCode" clearable>
|
||||
<el-option
|
||||
v-for="category in method_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="用药频次" prop="rateCode">
|
||||
<el-select v-model="form.rateCode" clearable>
|
||||
<el-option
|
||||
v-for="category in rate_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单次最大剂量" prop="maxUnit">
|
||||
<el-input v-model="form.maxUnit" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="皮试判别" prop="skinTestFlag">
|
||||
<el-checkbox v-model="form.skinTestFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="title">库存信息</div>
|
||||
<el-row :gutter="24">
|
||||
<!-- <el-col :span="6">
|
||||
<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="6">
|
||||
<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="6">
|
||||
<el-form-item label="包装单位" prop="unitCode">
|
||||
<el-select v-model="form.unitCode" clearable>
|
||||
<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="6">
|
||||
<el-form-item label="最小单位" prop="minUnitCode">
|
||||
<el-select v-model="form.minUnitCode" clearable>
|
||||
<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-row>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="门诊拆分属性" prop="partAttributeEnum">
|
||||
<el-select v-model="form.partAttributeEnum" clearable>
|
||||
<el-option
|
||||
v-for="category in partAttributeEnumOptions"
|
||||
:key="category.value"
|
||||
:label="category.info"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="住院临时医嘱拆分属性"
|
||||
prop="thoPartAttributeEnum"
|
||||
class="custom-label-height"
|
||||
>
|
||||
<el-select v-model="form.thoPartAttributeEnum" clearable>
|
||||
<el-option
|
||||
v-for="category in tempOrderSplitPropertyOptions"
|
||||
:key="category.value"
|
||||
:label="category.info"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="拆零比" prop="partPercent">
|
||||
<el-input v-model="form.partPercent" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="title">价格信息</div>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<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="6">
|
||||
<el-form-item label="零售价" prop="retailPrice">
|
||||
<el-input
|
||||
v-model="form.retailPrice"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="最高零售价" prop="maximumRetailPrice">
|
||||
<el-input
|
||||
v-model="form.maximumRetailPrice"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="title">业务信息</div>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="财务类型" prop="typeCode">
|
||||
<el-select v-model="form.typeCode" 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="6">
|
||||
<el-form-item label="贯标国家编码" prop="nationalDrugCode">
|
||||
<el-input v-model="form.nationalDrugCode" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="药品版本" prop="version">
|
||||
<el-input v-model="form.version" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="批准文号" prop="approvalNumber">
|
||||
<el-input v-model="form.approvalNumber" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="6">
|
||||
<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-col :span="6">
|
||||
<el-form-item label="基本剂量" prop="doseUnitCode">
|
||||
<el-input
|
||||
v-model="form.doseUnitCode"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="医保类别" prop="ybType">
|
||||
<el-select
|
||||
v-model="form.ybType"
|
||||
placeholder="医保类别"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in yb_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="生产厂家 " prop="manufacturerText">
|
||||
<el-input v-model="form.manufacturerText" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<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="6">
|
||||
<el-form-item label="基药标识" prop="basicFlag">
|
||||
<el-checkbox v-model="form.basicFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="注射药品" prop="injectFlag">
|
||||
<el-checkbox v-model="form.injectFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="儿童用药标志" prop="childrenFlag">
|
||||
<el-checkbox v-model="form.childrenFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="自制药标识" prop="selfFlag">
|
||||
<el-checkbox v-model="form.selfFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="是否活性" prop="activeFlag">
|
||||
<el-checkbox v-model="form.activeFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="限制使用" prop="restrictedFlag">
|
||||
<el-checkbox v-model="form.restrictedFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="限制使用范围" prop="restrictedScope">
|
||||
<el-input v-model="form.restrictedScope" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="抗生素" prop="antibioticFlag">
|
||||
<el-checkbox v-model="form.antibioticFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="抗生素信息" v-if="form.id != undefined && form.antibioticFlag"> -->
|
||||
<el-tab-pane label="抗生素信息" v-if="form.antibioticFlag">
|
||||
<el-form
|
||||
:model="antibioticForm"
|
||||
:rules="rules"
|
||||
ref="antibioticRef"
|
||||
label-width="115px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="抗生素分类" prop="antibioticCode">
|
||||
<el-select v-model="antibioticForm.antibioticCode" clearable>
|
||||
<el-option
|
||||
v-for="dict in antibiotic_type_code"
|
||||
: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="12">
|
||||
<el-form-item
|
||||
label="权限级别"
|
||||
prop="conditionCode"
|
||||
class="custom-label-spacing"
|
||||
>
|
||||
<el-select v-model="antibioticForm.restrictedEnum" clearable>
|
||||
<el-option
|
||||
v-for="statusRestricted in statusRestrictedOptions"
|
||||
:key="statusRestricted.value"
|
||||
:label="statusRestricted.info"
|
||||
:value="statusRestricted.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单次剂量" prop="dose">
|
||||
<el-input
|
||||
v-model="antibioticForm.dose"
|
||||
placeholder="输入剂量"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
-
|
||||
<el-col :span="5">
|
||||
<el-form-item label="" prop="maxUnit" label-width="0px">
|
||||
<el-input
|
||||
v-model="antibioticForm.maxUnit"
|
||||
placeholder="输入剂量"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="频次范围" prop="minRateCode">
|
||||
<el-input
|
||||
v-model="antibioticForm.minRateCode"
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
-
|
||||
<el-col :span="5">
|
||||
<el-form-item label="" prop="maxRateCode" label-width="0px">
|
||||
<el-input
|
||||
v-model="antibioticForm.maxRateCode"
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6"> (小时一次) </el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="DDD值" prop="dddCode">
|
||||
<el-select v-model="antibioticForm.dddCode" clearable>
|
||||
<el-option
|
||||
v-for="category in ddd_code"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="DDD单位" prop="dddUnitCode">
|
||||
<el-select v-model="antibioticForm.dddUnitCode" clearable>
|
||||
<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-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<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="MedicineDialog">
|
||||
import { deptTreeSelect, locationTreeSelect } from "./medicine";
|
||||
import moment from "moment";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const {
|
||||
med_category_code,
|
||||
system_categories,
|
||||
medicine_properties,
|
||||
unit_code,
|
||||
dose_form_code,
|
||||
yb_type,
|
||||
rate_code,
|
||||
method_code,
|
||||
fin_type_code,
|
||||
antibiotic_type_code,
|
||||
ddd_code,
|
||||
dose_from_code,
|
||||
} = proxy.useDict(
|
||||
"med_category_code",
|
||||
"system_categories",
|
||||
"medicine_properties",
|
||||
"unit_code",
|
||||
"dose_form_code",
|
||||
"yb_type",
|
||||
"rate_code",
|
||||
"method_code",
|
||||
"fin_type_code",
|
||||
"antibiotic_type_code",
|
||||
"ddd_code",
|
||||
"dose_from_code"
|
||||
);
|
||||
|
||||
const title = ref("");
|
||||
const visible = ref(false);
|
||||
const emits = defineEmits(["submit"]); // 声明自定义事件
|
||||
const statusFlagOptions = ref(undefined);
|
||||
const domainEnumOptions = ref(undefined);
|
||||
const deptOptions = ref(undefined); // 部门树选项
|
||||
const locationOptions = ref(undefined); // 地点树选项
|
||||
const supplierListOptions = ref(undefined); // 供应商列表选项
|
||||
const statusRestrictedOptions = ref(undefined); // 权限级别选项
|
||||
const partAttributeEnumOptions = ref(undefined); // 部位属性选项
|
||||
const tempOrderSplitPropertyOptions = ref(undefined); // 临时订单拆分属性选项
|
||||
const data = reactive({
|
||||
form: {},
|
||||
antibioticForm: {},
|
||||
rules: {
|
||||
// statusEnum: [
|
||||
// { required: true, message: "药品状态不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// orgId: [{ required: true, message: "所属科室不能为空", trigger: "blur" }],
|
||||
locationId: [
|
||||
{ required: true, message: "所在位置不能为空", trigger: "blur" },
|
||||
],
|
||||
doseFormCode: [
|
||||
{ required: true, message: "剂型不能为空", trigger: "blur" },
|
||||
],
|
||||
totalVolume: [{ required: true, message: "规格不能为空", trigger: "blur" }],
|
||||
activeFlag: [{ required: true, message: "活性不能为空", trigger: "blur" }],
|
||||
methodCode: [{ required: true, message: "用法不能为空", trigger: "blur" }],
|
||||
rateCode: [
|
||||
{ required: true, message: "用药频次不能为空", trigger: "blur" },
|
||||
],
|
||||
dose: [{ required: true, message: "单次剂量不能为空", trigger: "blur" }],
|
||||
doseUnitCode: [
|
||||
{ required: true, message: "剂量单位不能为空", trigger: "blur" },
|
||||
],
|
||||
maxUnit: [
|
||||
{ required: true, message: "单次最大剂量不能为空", trigger: "blur" },
|
||||
],
|
||||
busNo: [{ required: true, message: "药品编号不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: "药品名称不能为空", trigger: "blur" }],
|
||||
categoryCode: [
|
||||
{ required: true, message: "药品分类不能为空", trigger: "blur" },
|
||||
],
|
||||
merchandiseName: [
|
||||
{ required: true, message: "商品名称不能为空", trigger: "blur" },
|
||||
],
|
||||
unitCode: [
|
||||
{ required: true, message: "药品单位不能为空", trigger: "blur" },
|
||||
],
|
||||
minUnitCode: [
|
||||
{ required: true, message: "最小单位不能为空", trigger: "blur" },
|
||||
],
|
||||
ingredient: [{ required: true, message: "成分不能为空", trigger: "blur" }],
|
||||
partPercent: [
|
||||
{ required: true, message: "拆零比不能为空", trigger: "blur" },
|
||||
],
|
||||
doseFrom: [
|
||||
{ required: true, message: "剂量形式不能为空", trigger: "blur" },
|
||||
],
|
||||
approvalNumber: [
|
||||
{ required: true, message: "批准文号不能为空", trigger: "blur" },
|
||||
],
|
||||
ybMatchFlag: [
|
||||
{ required: true, message: "医保对码不能为空", trigger: "blur" },
|
||||
],
|
||||
ybNo: [{ required: true, message: "医保编码不能为空", trigger: "blur" }],
|
||||
pharmacologyCategoryCode: [
|
||||
{ required: true, message: "药品性质不能为空", trigger: "blur" },
|
||||
],
|
||||
skinTestFlag: [
|
||||
{ required: true, message: "皮试不能为空", trigger: "blur" },
|
||||
],
|
||||
injectFlag: [{ required: true, message: "注射不能为空", trigger: "blur" }],
|
||||
supplyId: [{ required: true, message: "供应商不能为空", trigger: "blur" }],
|
||||
restrictedFlag: [
|
||||
{ required: true, message: "限制使用不能为空", trigger: "blur" },
|
||||
],
|
||||
childrenFlag: [
|
||||
{ required: true, message: "儿童用药不能为空", trigger: "blur" },
|
||||
],
|
||||
restrictedScope: [
|
||||
{ required: true, message: "限制使用范围不能为空", trigger: "blur" },
|
||||
],
|
||||
nationalDrugCode: [
|
||||
{ required: true, message: "贯标国家编码不能为空", trigger: "blur" },
|
||||
],
|
||||
partAttributeEnum: [
|
||||
{ required: true, message: "拆分属性不能为空", trigger: "blur" },
|
||||
],
|
||||
thoPartAttributeEnum: [
|
||||
{
|
||||
required: true,
|
||||
message: "住院临时医嘱拆分属性不能为空",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
basicFlag: [
|
||||
{ required: true, message: "基药标识不能为空", trigger: "blur" },
|
||||
],
|
||||
antibioticFlag: [
|
||||
{ required: true, message: "抗生素不能为空", trigger: "blur" },
|
||||
],
|
||||
selfFlag: [{ required: true, message: "自制不能为空", trigger: "blur" }],
|
||||
purchasePrice: [
|
||||
{ required: true, message: "购入价不能为空", trigger: "blur" },
|
||||
],
|
||||
retailPrice: [
|
||||
{ required: true, message: "零售价不能为空", trigger: "blur" },
|
||||
],
|
||||
maximumRetailPrice: [
|
||||
{ required: true, message: "最高零售价不能为空", trigger: "blur" },
|
||||
],
|
||||
ybType: [{ required: true, message: "医保类型不能为空", trigger: "blur" }],
|
||||
typeCode: [
|
||||
{ required: true, message: "财务类型不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const { form, antibioticForm, rules } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
domainEnum: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
status: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
supplierListOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
statusRestrictedOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
currentCategoryEnum: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
partAttributeEnumOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
tempOrderSplitPropertyOptions: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
/** 查询部门下拉树结构 */
|
||||
function getDeptTree() {
|
||||
deptTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
deptOptions.value = response.data.records;
|
||||
console.log(deptOptions.value, "部门下拉树结构");
|
||||
});
|
||||
}
|
||||
/** 查询地点下拉树结构 */
|
||||
function getLocationTree() {
|
||||
locationTreeSelect().then((response) => {
|
||||
console.log(response, "response查询部门下拉树结构");
|
||||
locationOptions.value = response.data.records;
|
||||
});
|
||||
}
|
||||
// 显示弹框
|
||||
function show() {
|
||||
getLocationTree();
|
||||
getDeptTree();
|
||||
reset();
|
||||
statusFlagOptions.value = props.status;
|
||||
domainEnumOptions.value = props.domainEnum;
|
||||
supplierListOptions.value = props.supplierListOptions;
|
||||
statusRestrictedOptions.value = props.statusRestrictedOptions;
|
||||
form.value.categoryCode = props.currentCategoryEnum;
|
||||
partAttributeEnumOptions.value = props.partAttributeEnumOptions;
|
||||
tempOrderSplitPropertyOptions.value = props.tempOrderSplitPropertyOptions;
|
||||
console.log(form.value.categoryCode, "form.value.categoryCode");
|
||||
visible.value = true;
|
||||
}
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
// getList();
|
||||
console.log(props, "22222");
|
||||
reset();
|
||||
getLocationTree();
|
||||
getDeptTree();
|
||||
form.value = props.item;
|
||||
if (form.value) {
|
||||
setFlag(form.value);
|
||||
}
|
||||
statusFlagOptions.value = props.status;
|
||||
domainEnumOptions.value = props.domainEnum;
|
||||
supplierListOptions.value = props.supplierListOptions;
|
||||
statusRestrictedOptions.value = props.statusRestrictedOptions;
|
||||
partAttributeEnumOptions.value = props.partAttributeEnumOptions;
|
||||
tempOrderSplitPropertyOptions.value = props.tempOrderSplitPropertyOptions;
|
||||
antibioticForm.value.antibioticCode = form.value.antibioticCode;
|
||||
antibioticForm.value.restrictedEnum = form.value.restrictedEnum;
|
||||
antibioticForm.value.dose = form.value.dose;
|
||||
antibioticForm.value.maxUnit = form.value.maxUnit;
|
||||
antibioticForm.value.minRateCode = form.value.maxRateCode;
|
||||
antibioticForm.value.maxRateCode = form.value.maxRateCode;
|
||||
antibioticForm.value.dddUnitCode = form.value.dddUnitCode;
|
||||
antibioticForm.value.dddCode = form.value.dddCode;
|
||||
visible.value = true;
|
||||
}
|
||||
// checkbox值转换
|
||||
function setFlag(data) {
|
||||
data.activeFlag == 1 ? (data.activeFlag = true) : (data.activeFlag = false); //是否为活性
|
||||
data.ybMatchFlag == 1
|
||||
? (data.ybMatchFlag = true)
|
||||
: (data.ybMatchFlag = false); //医保是否对码
|
||||
data.skinTestFlag == 1
|
||||
? (data.skinTestFlag = true)
|
||||
: (data.skinTestFlag = false); //是否皮试
|
||||
data.injectFlag == 1 ? (data.injectFlag = true) : (data.injectFlag = false); //是否为注射药物
|
||||
data.restrictedFlag == 1
|
||||
? (data.restrictedFlag = true)
|
||||
: (data.restrictedFlag = false); //是否限制使用
|
||||
data.childrenFlag == 1
|
||||
? (data.childrenFlag = true)
|
||||
: (data.childrenFlag = false); //儿童用药标志
|
||||
data.antibioticFlag == 1
|
||||
? (data.antibioticFlag = true)
|
||||
: (data.antibioticFlag = false); //抗生素
|
||||
data.selfFlag == 1 ? (data.selfFlag = true) : (data.selfFlag = false); //自制
|
||||
data.basicFlag == 1 ? (data.basicFlag = true) : (data.basicFlag = false); //自制
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
medicationDefId: undefined,
|
||||
// orgId: undefined,
|
||||
locationId: undefined,
|
||||
activeFlag: undefined,
|
||||
doseFrom: undefined,
|
||||
rateCode: undefined,
|
||||
approvalNumber: undefined,
|
||||
name: undefined,
|
||||
pyStr: undefined,
|
||||
wbStr: undefined,
|
||||
merchandiseName: undefined,
|
||||
merchandisePyStr: undefined,
|
||||
merchandiseWbStr: undefined,
|
||||
categoryCode: undefined,
|
||||
pharmacologyCategoryCode: undefined,
|
||||
totalVolume: undefined,
|
||||
unitCode: undefined,
|
||||
minUnitCode: undefined,
|
||||
doseUnitCode: undefined,
|
||||
doseFormCode: undefined,
|
||||
// statusEnum: undefined,
|
||||
skinTestFlag: undefined,
|
||||
injectFlag: undefined,
|
||||
childrenFlag: undefined,
|
||||
methodCode: undefined,
|
||||
maxUnit: undefined,
|
||||
busNo: undefined,
|
||||
domainEnum: undefined,
|
||||
version: undefined,
|
||||
partPercent: undefined,
|
||||
ybMatchFlag: undefined,
|
||||
ybNo: undefined,
|
||||
manufacturerId: undefined,
|
||||
manufacturerText: undefined,
|
||||
supplyId: undefined,
|
||||
restrictedFlag: undefined,
|
||||
restrictedScope: undefined,
|
||||
purchasePrice: undefined,
|
||||
retailPrice: undefined,
|
||||
maximumRetailPrice: undefined,
|
||||
ybType: undefined,
|
||||
typeCode: undefined,
|
||||
nationalDrugCode: undefined,
|
||||
antibioticFlag: undefined,
|
||||
selfFlag: undefined,
|
||||
// minRateCode: undefined,
|
||||
// maxRateCode: undefined,
|
||||
partAttributeEnum: undefined,
|
||||
thoPartAttributeEnum: undefined,
|
||||
usageLimit: undefined,
|
||||
basicFlag: undefined,
|
||||
};
|
||||
proxy.resetForm("medicationRef");
|
||||
antibioticForm.value = {
|
||||
antibioticCode: undefined,
|
||||
restrictedEnum: undefined,
|
||||
dose: undefined,
|
||||
maxUnit: undefined,
|
||||
minRateCode: undefined,
|
||||
maxRateCode: undefined,
|
||||
dddUnitCode: undefined,
|
||||
dddCode: undefined,
|
||||
};
|
||||
proxy.resetForm("antibioticRef");
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
form.value.activeFlag == true
|
||||
? (form.value.activeFlag = 1)
|
||||
: (form.value.activeFlag = 0); //是否为活性
|
||||
form.value.ybMatchFlag == true
|
||||
? (form.value.ybMatchFlag = 1)
|
||||
: (form.value.ybMatchFlag = 0); //医保是否对码
|
||||
form.value.skinTestFlag == true
|
||||
? (form.value.skinTestFlag = 1)
|
||||
: (form.value.skinTestFlag = 0); //是否皮试
|
||||
form.value.injectFlag == true
|
||||
? (form.value.injectFlag = 1)
|
||||
: (form.value.injectFlag = 0); //是否为注射药物
|
||||
form.value.restrictedFlag == true
|
||||
? (form.value.restrictedFlag = 1)
|
||||
: (form.value.restrictedFlag = 0); //是否限制使用
|
||||
form.value.childrenFlag == true
|
||||
? (form.value.childrenFlag = 1)
|
||||
: (form.value.childrenFlag = 0); //儿童用药标志
|
||||
form.value.antibioticFlag == true
|
||||
? (form.value.antibioticFlag = 1)
|
||||
: (form.value.antibioticFlag = 0); //抗生素标志v
|
||||
form.value.basicFlag == true
|
||||
? (form.value.basicFlag = 1)
|
||||
: (form.value.basicFlag = 0); //抗生素标志
|
||||
form.value.selfFlag == true
|
||||
? (form.value.selfFlag = 1)
|
||||
: (form.value.selfFlag = 0); //自制标志
|
||||
form.value.status == true ? (form.value.status = 1) : (form.value.status = 0); //启用状态
|
||||
proxy.$refs["medicationRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.activeFlag == true) {
|
||||
form.value.antibioticCode = antibioticForm.value.antibioticCode;
|
||||
form.value.restrictedEnum = antibioticForm.value.restrictedEnum;
|
||||
form.value.dose = antibioticForm.value.dose;
|
||||
form.value.maxUnit = antibioticForm.value.maxUnit;
|
||||
form.value.minRateCode = antibioticForm.value.minRateCode;
|
||||
form.value.maxRateCode = antibioticForm.value.maxRateCode;
|
||||
form.value.dddUnitCode = antibioticForm.value.dddUnitCode;
|
||||
form.value.dddCode = antibioticForm.value.dddCode;
|
||||
}
|
||||
// 将表单数据发送给父组件
|
||||
emits("submit", form.value);
|
||||
visible.value = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
visible.value = false;
|
||||
reset();
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
edit,
|
||||
});
|
||||
</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 和输入框之间的间距 */
|
||||
}
|
||||
.el-form-item {
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
::v-deep .custom-label-height .el-form-item__label {
|
||||
line-height: 20px; /* 设置 label 的行高为 15px */
|
||||
}
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-bottom: 10px;
|
||||
/* background-color: #f5f7fa; */
|
||||
}
|
||||
</style>
|
||||
@@ -1,347 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" v-model="visible" width="800px" append-to-body>
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="diseaseRef"
|
||||
label-width="110px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="编号" prop="busNo">
|
||||
<el-input
|
||||
v-model="form.busNo"
|
||||
placeholder="请输入编码"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="品名" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder="请输入药品名"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拼音码(品名)" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="厂家/产地" prop="conditionCode">
|
||||
<el-select v-model="queryParams.status" clearable>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</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-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位" prop="conditionCode">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="规格" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
label="最小单位"
|
||||
prop="conditionCode"
|
||||
>
|
||||
<el-select v-model="queryParams.status" clearable :disabled="true">
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="conditionCode">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拆零零售价" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="处方限量(最小单位)" prop="conditionCode" class="custom-label-spacing">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="皮试判别" prop="name">
|
||||
<el-checkbox v-model="form.status" :disabled="true"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="注射药品" prop="name">
|
||||
<el-checkbox v-model="form.status" :disabled="true"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="给药途径" prop="conditionCode">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="name" :disabled="true">
|
||||
<el-select v-model="queryParams.status" clearable :disabled="true">
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="name" inline :disabled="true">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
:disabled="form.id != undefined"
|
||||
style="width: 49%"
|
||||
/>
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
style="width: 49%"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="8">
|
||||
<el-form-item label="剂型" prop="conditionCode">
|
||||
<el-select v-model="queryParams.status" clearable :disabled="true">
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="name">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
: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="status">
|
||||
<el-input
|
||||
v-model="textarea2"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="MedicineDialog">
|
||||
// import {
|
||||
// getDiseaseList,
|
||||
// editDisease,
|
||||
// addDisease,
|
||||
// getDiseaseCategory,
|
||||
// getDiseaseOne,
|
||||
// } from "./components/medicine";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_normal_disable",
|
||||
"sys_user_sex"
|
||||
);
|
||||
|
||||
const diseaseList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const selectedData = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const dateRange = ref([]);
|
||||
const deptName = ref("");
|
||||
const visible = ref(false);
|
||||
const conditionDefinitionOptions = ref(undefined);
|
||||
// const initPassword = ref(undefined);
|
||||
// const postOptions = ref([]);
|
||||
// const roleOptions = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
conditionCode: [
|
||||
{ required: true, message: "编码不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
// queryParams.roleId = props.roleId;
|
||||
// getList();
|
||||
visible.value = true;
|
||||
}
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
// queryParams.roleId = props.roleId;
|
||||
// getList();
|
||||
console.log(props, "22222");
|
||||
console.log(props.item);
|
||||
console.log("props.item");
|
||||
form.value = props.item;
|
||||
visible.value = true;
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
edit,
|
||||
});
|
||||
</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>
|
||||
@@ -1,499 +0,0 @@
|
||||
<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="80"
|
||||
>
|
||||
<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"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>添加新项目</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Remove"
|
||||
:disabled="multiple"
|
||||
@click="handleClose"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>停用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="CirclePlus"
|
||||
:disabled="multiple"
|
||||
@click="handleStart"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>启用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Search"
|
||||
@click="getList"
|
||||
v-hasPermi="['system:user:import']"
|
||||
>查询</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="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"
|
||||
/>
|
||||
<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)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="openViewMedicine(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>查看</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"
|
||||
/>
|
||||
<!-- <medicine-view-dialog
|
||||
ref="medicineViewRef"
|
||||
:item="viewData"
|
||||
:viewFlg="viewFlg"
|
||||
/> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Medication">
|
||||
import {
|
||||
getMedicationList,
|
||||
editMedication,
|
||||
addMedication,
|
||||
getMedicationCategory,
|
||||
getMedicationOne,
|
||||
startMedication,
|
||||
stopMedication,
|
||||
} from "./components/medicine";
|
||||
import medicineDialog from "./components/medicineDialog";
|
||||
import medicineViewDialog from "./components/medicineViewDialog";
|
||||
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 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.sort(
|
||||
(a, b) => {
|
||||
return parseInt(a.value) - parseInt(b.value);
|
||||
}
|
||||
);
|
||||
medicationOptions.value.push({ 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 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["medicineRef"].show();
|
||||
}
|
||||
/** 打开编辑弹窗 */
|
||||
function openEditMedicine(row) {
|
||||
getMedicationOne(row.id).then((response) => {
|
||||
console.log(response, "responsebbbb", row.id);
|
||||
currentData.value = response.data;
|
||||
nextTick(() => {
|
||||
proxy.$refs["medicineRef"].edit();
|
||||
});
|
||||
});
|
||||
}
|
||||
/** 打开查看弹窗 */
|
||||
function openViewMedicine(row) {
|
||||
getMedicationOne(row.id).then((response) => {
|
||||
viewData.value = response.data;
|
||||
nextTick(() => {
|
||||
proxy.$refs["medicineViewRef"].edit();
|
||||
});
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/** 提交按钮 */
|
||||
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) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user