前端最新版本同步

This commit is contained in:
Zhang.WH
2025-09-25 10:36:07 +08:00
parent a3a06d6f3c
commit 1276dc4adb
117 changed files with 11964 additions and 2466 deletions

View File

@@ -9,6 +9,15 @@ export function searchTraceNo(data) {
})
}
// 获取处方打印数据
export function advicePrint(data) {
return request({
url:'/app-common/advice-print',
method: 'get',
params: data,
})
}
import axios from 'axios';
const env = import.meta.env.MODE;
@@ -18,7 +27,7 @@ if(env == 'development'){
return axios.create(
{
// axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: '/ybplugin',
baseURL: '',//ybplugin
// 超时
timeout: 60000
}

View File

@@ -94,7 +94,7 @@
</div>
</div>
<div>
追溯码{{ existenceTraceNoList[rowData.itemId] }}
追溯码{{ existenceTraceNoList[rowData ? rowData.itemId : 0] }}
</div>
</div>
<template #footer>
@@ -197,7 +197,9 @@ const throttledGetList = debounce(handelTraceNo, 500);
function handelTraceNo(value) {
let list = value.trim().split('\n');
list.forEach((item) => {
traceNoList.value.push(item);
if(traceNoList.value.indexOf(item) === -1) {
traceNoList.value.push(item);
}
});
traceNo.value = traceNoList.value
.map((item, index) => {

View File

@@ -188,7 +188,6 @@
</div>
</div>
</div>
<hip-dividers></hip-dividers>
</div>
</div>
</div>
@@ -201,7 +200,6 @@ import { patientInfo } from '@/views/inpatientDoctor/home/store/patient.js';
const expand = ref(false);
// 定义一个布尔变量来控制是否显示 hip-dividers
const showDividers = ref(true);
// 示例方法:切换显示状态

View File

@@ -44,9 +44,9 @@ import TreeSelect from '@/components/TreeSelect'
// 字典标签组件
import DictTag from '@/components/DictTag'
import { ElDialog } from 'element-plus';
import { ElDialog, ElMessage } from 'element-plus';
import {registerComponents} from './template';
const app = createApp(App);
if(chrome.webview !== undefined) {
@@ -73,13 +73,13 @@ app.component('ImageUpload', ImageUpload)
app.component('ImagePreview', ImagePreview)
app.component('RightToolbar', RightToolbar)
app.component('Editor', Editor)
app.use(registerComponents)
app.use(ElMessage)
app.use(router)
app.use(store)
app.use(plugins)
app.use(elementIcons)
app.component('svg-icon', SvgIcon)
directive(app)
// 全局禁止点击遮罩层关闭弹窗
ElDialog.props.closeOnClickModal.default = false;

View File

@@ -1,9 +1,9 @@
import axios from 'axios'
import axios from 'axios'
import { ElLoading, ElMessage } from 'element-plus'
import { saveAs } from 'file-saver'
import { getToken } from '@/utils/auth'
import errorCode from '@/utils/errorCode'
import { blobValidate } from '@/utils/openhis'
import { blobValidate, tansParams } from '@/utils/openhis'
const baseURL = import.meta.env.VITE_APP_BASE_API
let downloadLoadingInstance;
@@ -66,6 +66,36 @@ export default {
downloadLoadingInstance.close();
})
},
// 添加GET方式下载方法
downloadGet(url, params, filename) {
let fullUrl = baseURL + url;
if (params) {
fullUrl += '?' + tansParams(params);
}
downloadLoadingInstance = ElLoading.service({ text: "正在下载数据,请稍候", background: "rgba(0, 0, 0, 0.7)", })
axios({
method: 'get',
url: fullUrl,
responseType: 'blob',
headers: { 'Authorization': 'Bearer ' + getToken() }
}).then(async (res) => {
const isBlob = blobValidate(res.data);
if (isBlob) {
const blob = new Blob([res.data])
this.saveAs(blob, filename)
} else {
const resText = await res.data.text();
const rspObj = JSON.parse(resText);
const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
ElMessage.error(errMsg);
}
downloadLoadingInstance.close();
}).catch((r) => {
console.error(r)
ElMessage.error('下载文件出现错误,请联系管理员!')
downloadLoadingInstance.close();
})
},
saveAs(text, name, opts) {
saveAs(text, name, opts);
},
@@ -75,5 +105,4 @@ export default {
const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
ElMessage.error(errMsg);
}
}
}

View File

@@ -16,7 +16,8 @@ const useUserStore = defineStore(
nickName: '',
fixmedinsCode: '', // 医疗机构编码
roles: [],
permissions: []
permissions: [],
tenantId: ''
}),
actions: {
// 登录
@@ -30,6 +31,7 @@ const useUserStore = defineStore(
login(username, password, code, uuid ,tenantId).then(res => {
setToken(res.token)
this.token = res.token
this.tenantId = tenantId
resolve()
}).catch(error => {
reject(error)
@@ -70,6 +72,7 @@ const useUserStore = defineStore(
this.token = ''
this.roles = []
this.permissions = []
this.tenantId = ''
removeToken()
resolve()
}).catch(error => {

View File

@@ -0,0 +1,17 @@
// 动态引入 template 目录下的所有 .vue 文件
const templates = import.meta.glob('./*.vue', { eager: true });
const components = [];
// 遍历所有引入的文件
for (const path in templates) {
const component = templates[path].default;
components.push(component);
}
const registerComponents = (app) => {
components.forEach((component) => {
app.component(component.name, component);
})
}
export { components, registerComponents };

View File

@@ -0,0 +1,695 @@
<!--
* @Author: sjjh
* @Date: 2025-09-19 13:04:49
* @Description: 手术患者移交
-->
<template>
<div class="surgicalPatientHandover-container">
<div class="handover-form">
<div class="form-header">
<h1 class="hospital-name">**医院</h1>
<h2 class="form-title">手术患者交接单</h2>
</div>
<div class="patient-info">
<el-row :gutter="20">
<el-col :span="6">
<div class="info-item">日期{{ state.formData.date }}</div>
</el-col>
<el-col :span="6">
<div class="info-item">姓名{{ state.formData.patientName }}</div>
</el-col>
<el-col :span="6">
<div class="info-item">性别{{ state.formData.gender }}</div>
</el-col>
<el-col :span="6">
<div class="info-item">年龄{{ state.formData.age }}</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<div class="info-item">科室{{ state.formData.department }}</div>
</el-col>
<el-col :span="6">
<div class="info-item">床号{{ state.formData.bedNumber }}</div>
</el-col>
<el-col :span="6">
<div class="info-item">住院号{{ state.formData.hospitalNumber }}</div>
</el-col>
<el-col :span="6">
<div class="info-item">术前诊断{{ state.formData.preDiagnosis }}</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="info-item">拟行手术方式{{ state.formData.surgeryMethod }}</div>
</el-col>
</el-row>
</div>
<el-form :model="state.formData" label-width="0" class="handover-form-content">
<!-- 病房护士与手术室护士交接记录 -->
<div class="form-section">
<div class="section-title">病房护士与手术室护士交接记录</div>
<el-row :gutter="20">
<el-col :span="12">
<div class="form-item">
<span class="item-label">药物过敏史</span>
<el-radio-group v-model="state.formData.drugAllergy">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</div>
</el-col>
<el-col :span="12">
<div class="form-item">
<span v-if="state.formData.drugAllergy === 2"
>药物名称
<el-input v-model="state.formData.allergyDrugName" class="inline-input"
/></span>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">身份确认</span>
<el-checkbox-group v-model="state.formData.identityConfirm">
<el-checkbox :label="1">患者姓名核实</el-checkbox>
<el-checkbox :label="2">病例核实</el-checkbox>
<el-checkbox :label="3">腕带核</el-checkbox>
</el-checkbox-group>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">手术标识</span>
<el-radio-group v-model="state.formData.surgeryMark">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">生命体征</span>
<span>
<el-input v-model="state.formData.temperature" class="inline-input">
<template #prepend>T</template>
<template #append></template>
</el-input>
</span>
<span class="ml-20"
><el-input v-model="state.formData.pulse" class="inline-input">
<template #prepend>P</template>
<template #append>/</template>
</el-input></span
>
<span class="ml-20"
><el-input v-model="state.formData.respiration" class="inline-input">
<template #prepend>R</template>
<template #append>/</template>
</el-input></span
>
<span class="ml-20"
><el-input v-model="state.formData.respiration" class="inline-input">
<template #prepend>BP</template>
<template #append>mmHg</template>
</el-input></span
>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">意识状态</span>
<el-checkbox-group v-model="state.formData.consciousness">
<el-checkbox :label="1">清醒</el-checkbox>
<el-checkbox :label="2">嗜睡</el-checkbox>
<el-checkbox :label="3">意识模糊</el-checkbox>
<el-checkbox :label="4">躁动</el-checkbox>
<el-checkbox :label="5">偏瘫</el-checkbox>
<el-checkbox :label="6">昏迷</el-checkbox>
</el-checkbox-group>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">皮肤情况</span>
<el-checkbox-group v-model="state.formData.skinCondition">
<el-checkbox :label="1">正常</el-checkbox>
<el-checkbox :label="2">破损</el-checkbox>
<el-checkbox :label="3">压力性损伤</el-checkbox>
<el-checkbox :label="4">其他</el-checkbox>
</el-checkbox-group>
<span v-if="state.formData.skinCondition.includes(4)"
>其他 <el-input v-model="state.formData.skinOther" class="inline-input"
/></span>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<div class="form-item">
<span class="item-label">皮肤情况</span>
<span>部位</span>
<el-input v-model="state.formData.skinPosition1" class="inline-input" style="width: 50px" />
<span>面积</span>
<el-input
v-model="state.formData.skinArea1"
class="inline-input"
style="width: 50px"
/>
<span>×</span>
<el-input
v-model="state.formData.skinArea2"
class="inline-input"
style="width: 50px"
/>
</div>
</el-col>
<el-col :span="12">
<div class="form-item">
<span>部位</span>
<el-input v-model="state.formData.skinPosition2" class="inline-input" style="width: 50px" />
<span>面积</span>
<el-input
v-model="state.formData.skinArea3"
class="inline-input"
style="width: 50px"
/>
<span>×</span>
<el-input
v-model="state.formData.skinArea4"
class="inline-input"
style="width: 50px"
/>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">留置管路</span>
<el-checkbox-group v-model="state.formData.preOperativePipeline">
<el-checkbox :label="1"></el-checkbox>
<el-checkbox :label="2">中心静脉置管</el-checkbox>
<el-checkbox :label="3">动脉置管</el-checkbox>
<el-checkbox :label="4">气管插管</el-checkbox>
<el-checkbox :label="5">胃管</el-checkbox>
<el-checkbox :label="6">尿管</el-checkbox>
<el-checkbox :label="7">引流管</el-checkbox>
</el-checkbox-group>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">外周静脉通路</span>
<el-input
v-model="state.formData.peripheralVein"
class="inline-input"
style="width: 50px"
/>
<span></span>
<el-checkbox-group v-model="state.formData.veinPosition" class="ml-20">
<el-checkbox :label="1">右上肢</el-checkbox>
<el-checkbox :label="2">右下肢</el-checkbox>
<el-checkbox :label="3">左上肢</el-checkbox>
<el-checkbox :label="4">左下肢</el-checkbox>
</el-checkbox-group>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">确认事项</span>
<el-checkbox-group v-model="state.formData.confirmItems">
<el-checkbox :label="1">禁食水</el-checkbox>
<el-checkbox :label="2">备皮</el-checkbox>
<el-checkbox :label="3">无活动义齿</el-checkbox>
<el-checkbox :label="4">无随形眼镜</el-checkbox>
<el-checkbox :label="5">摘首饰</el-checkbox>
<el-checkbox :label="6">非月经期</el-checkbox>
<el-checkbox :label="7">病员服</el-checkbox>
</el-checkbox-group>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">携带物品</span>
<el-checkbox-group v-model="state.formData.carryItems">
<el-checkbox :label="1">病例</el-checkbox>
<el-checkbox :label="2">药物</el-checkbox>
<el-checkbox :label="3">影像资料</el-checkbox>
<el-checkbox :label="4">/腹带</el-checkbox>
<el-checkbox :label="5">血制品</el-checkbox>
</el-checkbox-group>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<div class="form-item">
<span class="item-label">病房护士签名</span>
<el-input v-model="state.formData.wardNurseName" class="inline-input" />
</div>
</el-col>
<el-col :span="8">
<div class="form-item">
<span class="item-label">手术护士签名</span>
<el-input v-model="state.formData.surgeryNurseName" class="inline-input" />
</div>
</el-col>
<el-col :span="8">
<div class="form-item">
<span class="item-label">交接时间</span>
<el-input v-model="state.formData.handoverTime" class="inline-input" />
</div>
</el-col>
</el-row>
</div>
<!-- 手术室护士与麻醉复苏室护士/病房护士交接记录 -->
<div class="form-section">
<div class="section-title">手术室护士与麻醉复苏室护士/病房护士交接记录</div>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">生命体征</span>
<span>P</span>
<el-input
v-model="state.formData.postPulse"
class="inline-input"
style="width: 50px"
/>
<span>/</span>
<span class="ml-20">R</span>
<el-input
v-model="state.formData.postRespiration"
class="inline-input"
style="width: 50px"
/>
<span>/</span>
<span class="ml-20">BP</span>
<el-input v-model="state.formData.postBloodPressure" class="inline-input" />
<span>mmHg</span>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">意识状态</span>
<el-checkbox-group v-model="state.formData.postConsciousness">
<el-checkbox :label="1">清醒</el-checkbox>
<el-checkbox :label="2">未清醒</el-checkbox>
<el-checkbox :label="3">其他</el-checkbox>
</el-checkbox-group>
<span v-if="state.formData.postConsciousness.includes(3)"
>其他
<el-input v-model="state.formData.postConsciousnessOther" class="inline-input"
/></span>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">皮肤情况</span>
<el-checkbox-group v-model="state.formData.postSkinCondition">
<el-checkbox :label="1">正常</el-checkbox>
<el-checkbox :label="2">破损</el-checkbox>
<el-checkbox :label="3">压力性损伤</el-checkbox>
<el-checkbox :label="4">其他</el-checkbox>
</el-checkbox-group>
<span v-if="state.formData.postSkinCondition.includes(4)"
>其他 <el-input v-model="state.formData.postSkinOther" class="inline-input"
/></span>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<div class="form-item">
<span class="item-label">皮肤情况</span>
<span>部位</span>
<el-input v-model="state.formData.postSkinPosition1" class="inline-input" style="width: 50px" />
<span>面积</span>
<el-input
v-model="state.formData.postSkinArea1"
class="inline-input"
style="width: 50px"
/>
<span>×</span>
<el-input
v-model="state.formData.postSkinArea2"
class="inline-input"
style="width: 50px"
/>
</div>
</el-col>
<el-col :span="12">
<div class="form-item">
<span>部位</span>
<el-input v-model="state.formData.postSkinPosition2" class="inline-input" style="width: 50px" />
<span>面积</span>
<el-input
v-model="state.formData.postSkinArea3"
class="inline-input"
style="width: 50px"
/>
<span>×</span>
<el-input
v-model="state.formData.postSkinArea4"
class="inline-input"
style="width: 50px"
/>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">术后管路</span>
<el-checkbox-group v-model="state.formData.postOperativePipeline">
<el-checkbox :label="1"></el-checkbox>
<el-checkbox :label="2">中心静脉置管</el-checkbox>
<el-checkbox :label="3">动脉置管</el-checkbox>
<el-checkbox :label="4">气管插管</el-checkbox>
<el-checkbox :label="5">胃管</el-checkbox>
<el-checkbox :label="6">尿管</el-checkbox>
<el-checkbox :label="7">引流管</el-checkbox>
</el-checkbox-group>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">外周静脉通路</span>
<el-input
v-model="state.formData.postPeripheralVein"
class="inline-input"
style="width: 50px"
/>
<span></span>
<el-checkbox-group v-model="state.formData.postVeinPosition" class="ml-20">
<el-checkbox :label="1">右上肢</el-checkbox>
<el-checkbox :label="2">右下肢</el-checkbox>
<el-checkbox :label="3">左上肢</el-checkbox>
<el-checkbox :label="4">左下肢</el-checkbox>
</el-checkbox-group>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">携带物品</span>
<el-checkbox-group v-model="state.formData.postCarryItems">
<el-checkbox :label="1">病历</el-checkbox>
<el-checkbox :label="2">药物</el-checkbox>
<el-checkbox :label="3">影像资料</el-checkbox>
<el-checkbox :label="4">/腹带</el-checkbox>
<el-checkbox :label="5">血制品</el-checkbox>
</el-checkbox-group>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<span class="item-label">镇痛泵</span>
<el-radio-group v-model="state.formData.painPump">
<el-radio :label="1"></el-radio>
<el-radio :label="2"></el-radio>
</el-radio-group>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<div class="form-item">
<span class="item-label" style="width: 220px;">手术室/麻醉复苏室护士签名</span>
<el-input v-model="state.formData.surgeryRecoveryNurseName" class="inline-input" />
</div>
</el-col>
<el-col :span="12">
<div class="form-item">
<span class="item-label">病房护士签名</span>
<el-input v-model="state.formData.postWardNurseName" class="inline-input" />
</div>
</el-col>
<el-col :span="12">
<div class="form-item">
<span class="item-label">病房护士填写</span>
<span>P</span>
<el-input
v-model="state.formData.wardNursePulse"
class="inline-input"
style="width: 50px"
/>
<span>/</span>
<span class="ml-10">BP</span>
<el-input
v-model="state.formData.wardNurseBloodPressure"
class="inline-input"
style="width: 80px"
/>
<span>mmHg</span>
</div>
</el-col>
<el-col :span="12">
<div class="form-item">
<span class="item-label">交接时间</span>
<el-input v-model="state.formData.postHandoverTime" class="inline-input" />
</div>
</el-col>
</el-row>
</div>
<!-- 其他 -->
<div class="form-section">
<div class="section-title">其他</div>
<el-row :gutter="20">
<el-col :span="24">
<div class="form-item">
<el-checkbox-group v-model="state.formData.otherItems">
<el-checkbox :label="1">离院</el-checkbox>
<el-checkbox :label="2">死亡</el-checkbox>
</el-checkbox-group>
</div>
</el-col>
</el-row>
</div>
</el-form>
</div>
</div>
</template>
<script setup>
defineOptions({
name: 'SurgicalPatientHandover',
});
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue';
import { ElMessageBox, ElMessage, ElLoading, ElTree } from 'element-plus';
const { proxy } = getCurrentInstance();
const emits = defineEmits(['submitOk']);
const props = defineProps({});
const state = reactive({
formData: {
// 患者基本信息
date: '2025/8/13 13:36:41',
patientName: '于学斌',
gender: '男',
age: '46',
department: '普外科门诊区',
bedNumber: '035',
hospitalNumber: '2508000328',
preDiagnosis: '胆囊结石',
surgeryMethod: '腹腔镜胆囊切除术',
// 术前交接记录
drugAllergy: 1, // 1-无, 2-有
allergyDrugName: '',
identityConfirm: [1, 2, 3], // 1-患者姓名核实, 2-病例核实, 3-腕带核
surgeryMark: 1, // 1-无, 2-有
temperature: '37.5',
pulse: '78',
respiration: '19',
bloodPressure: '124/76',
consciousness: [1], // 1-清醒, 2-嗜睡, 3-意识模糊, 4-躁动, 5-偏瘫, 6-昏迷
skinCondition: [1], // 1-正常, 2-破损, 3-压力性损伤, 4-其他
skinOther: '',
skinPosition1: '',
skinArea1: '',
skinPosition2: '',
skinArea2: '',
preOperativePipeline: [1], // 1-无, 2-中心静脉置管, 3-动脉置管, 4-气管插管, 5-胃管, 6-尿管, 7-引流管
peripheralVein: '1',
veinPosition: [1], // 1-右上肢, 2-右下肢, 3-左上肢, 4-左下肢
confirmItems: [1, 2], // 1-禁食水, 2-备皮, 3-无活动义齿, 4-无随形眼镜, 5-摘首饰, 6-非月经期, 7-病员服
carryItems: [1, 2], // 1-病例, 2-药物, 3-影像资料, 4-胸/腹带, 5-血制品
wardNurseName: '周春贺',
surgeryNurseName: '',
handoverTime: '2025/8/13 13:40:37',
// 术后交接记录
postPulse: '',
postRespiration: '',
postBloodPressure: '',
postConsciousness: [], // 1-清醒, 2-未清醒, 3-其他
postConsciousnessOther: '',
postSkinCondition: [], // 1-正常, 2-破损, 3-压力性损伤, 4-其他
postSkinOther: '',
postSkinPosition1: '',
postSkinArea1: '',
postSkinPosition2: '',
postSkinArea2: '',
postOperativePipeline: [], // 1-无, 2-中心静脉置管, 3-动脉置管, 4-气管插管, 5-胃管, 6-尿管, 7-引流管
postPeripheralVein: '',
postVeinPosition: [], // 1-右上肢, 2-右下肢, 3-左上肢, 4-左下肢
postCarryItems: [], // 1-病历, 2-药物, 3-影像资料, 4-胸/腹带, 5-血制品
painPump: 1, // 1-无, 2-有
surgeryRecoveryNurseName: '',
postWardNurseName: '',
wardNursePulse: '',
wardNurseBloodPressure: '',
postHandoverTime: '',
// 其他
otherItems: [], // 1-离院, 2-死亡
},
});
const submit = ()=> {
// ElMessage.success('提交成功');
emits('submitOk',state.formData)
}
const setFormData = (data) => {
if (data) {
state.formData = data;
}
}
onBeforeMount(() => {});
onMounted(() => {});
defineExpose({ state, submit,setFormData });
</script>
<style lang="scss" scoped>
.surgicalPatientHandover-container {
padding: 20px;
.handover-form {
width: 100%;
max-width: 900px;
margin: 0 auto;
border: 1px solid #ccc;
padding: 20px;
background-color: #fff;
.form-header {
text-align: center;
margin-bottom: 20px;
.hospital-name {
font-size: 24px;
font-weight: bold;
margin-bottom: 10px;
}
.form-title {
font-size: 20px;
font-weight: bold;
}
}
.patient-info {
margin-bottom: 20px;
.info-item {
line-height: 30px;
}
}
.handover-form-content {
.form-section {
margin-bottom: 20px;
border: 1px solid #ddd;
.section-title {
font-weight: bold;
padding: 10px;
background-color: #f5f5f5;
border-bottom: 1px solid #ddd;
}
.form-item {
padding: 10px;
border-bottom: 1px solid #eee;
display: flex;
align-items: center;
&:last-child {
border-bottom: none;
}
.item-label {
display: inline-block;
width: 120px;
font-weight: bold;
}
.inline-input {
width: 150px;
margin: 0 5px;
}
.ml-10 {
margin-left: 10px;
}
.ml-20 {
margin-left: 20px;
}
}
}
}
:deep(.el-input-group__prepend){
padding: 0 8px;
}
:deep(.el-input-group__append){
padding: 0 8px;
}
}
}
</style>

View File

@@ -0,0 +1,44 @@
<template>
<div class="template-content">
<div class="template-header">
<h3>股骨头坏死(模板1)</h3>
</div>
<div class="template-body">
<p>主诉左侧髋部疼痛X个月加重1周</p>
<p>现病史患者X个月前无明显诱因出现左侧髋部疼痛活动后加重休息后减轻未予重视1周前疼痛加重行走困难遂来我院就诊</p>
<p>既往史否认高血压糖尿病冠心病等慢性病史否认手术外伤史否认药物过敏史</p>
<p>体格检查左侧髋关节压痛(+)活动受限左下肢肌力下降</p>
<p>辅助检查DR示左侧股骨头坏死</p>
<p>诊断左侧股骨头坏死</p>
<p>治疗方案1. 避免负重2. 药物治疗3. 必要时手术治疗</p>
</div>
</div>
</template>
<script setup>
defineOptions({
name: 'Template1'
})
// 可以在这里添加组件逻辑
</script>
<style scoped>
.template-content {
background-color: white;
border: 1px solid #ddd;
border-radius: 4px;
padding: 15px;
min-height: 300px;
}
.template-header {
border-bottom: 1px solid #eee;
padding-bottom: 10px;
margin-bottom: 15px;
}
.template-body p {
margin-bottom: 10px;
line-height: 1.5;
}
</style>

View File

@@ -0,0 +1,44 @@
<template>
<div class="template-content">
<div class="template-header">
<h3>上呼吸道感染(模板2)</h3>
</div>
<div class="template-body">
<p>主诉发热咳嗽2天</p>
<p>现病史患者2天前因受凉后出现发热体温最高38.5伴咳嗽咽痛无咳痰胸痛等不适自服感冒药后症状无明显缓解遂来我院就诊</p>
<p>既往史体健否认慢性病史否认手术外伤史否认药物过敏史</p>
<p>体格检查体温38.2咽部充血双侧扁桃体Ⅰ度肿大双肺呼吸音清未闻及干湿啰音</p>
<p>辅助检查血常规示白细胞计数正常淋巴细胞比例升高</p>
<p>诊断急性上呼吸道感染</p>
<p>治疗方案1. 注意休息多饮水2. 对症治疗3. 必要时抗病毒治疗</p>
</div>
</div>
</template>
<script setup>
defineOptions({
name: 'Template2'
})
// 可以在这里添加组件逻辑
</script>
<style scoped>
.template-content {
background-color: white;
border: 1px solid #ddd;
border-radius: 4px;
padding: 15px;
min-height: 300px;
}
.template-header {
border-bottom: 1px solid #eee;
padding-bottom: 10px;
margin-bottom: 15px;
}
.template-body p {
margin-bottom: 10px;
line-height: 1.5;
}
</style>

View File

@@ -0,0 +1,210 @@
<template>
<el-form
ref="ruleFormRef"
style="max-width: 600px"
:model="ruleForm"
:rules="rules"
label-width="auto"
>
<el-form-item label="Activity name" prop="name">
<el-input v-model="ruleForm.name" />
</el-form-item>
<el-form-item label="Activity zone" prop="region">
<el-select v-model="ruleForm.region" placeholder="Activity zone">
<el-option label="Zone one" value="shanghai" />
<el-option label="Zone two" value="beijing" />
</el-select>
</el-form-item>
<el-form-item label="Activity count" prop="count">
<el-select-v2
v-model="ruleForm.count"
placeholder="Activity count"
:options="options"
/>
</el-form-item>
<el-form-item label="Activity time" required>
<el-col :span="11">
<el-form-item prop="date1">
<el-date-picker
v-model="ruleForm.date1"
type="date"
aria-label="Pick a date"
placeholder="Pick a date"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col class="text-center" :span="2">
<span class="text-gray-500">-</span>
</el-col>
<el-col :span="11">
<el-form-item prop="date2">
<el-time-picker
v-model="ruleForm.date2"
aria-label="Pick a time"
placeholder="Pick a time"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-form-item>
<el-form-item label="Instant delivery" prop="delivery">
<el-switch v-model="ruleForm.delivery" />
</el-form-item>
<el-form-item label="Activity location" prop="location">
<el-segmented v-model="ruleForm.location" :options="locationOptions" />
</el-form-item>
<el-form-item label="Activity type" prop="type">
<el-checkbox-group v-model="ruleForm.type">
<el-checkbox value="Online activities" name="type">
Online activities
</el-checkbox>
<el-checkbox value="Promotion activities" name="type">
Promotion activities
</el-checkbox>
<el-checkbox value="Offline activities" name="type">
Offline activities
</el-checkbox>
<el-checkbox value="Simple brand exposure" name="type">
Simple brand exposure
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="Resources" prop="resource">
<el-radio-group v-model="ruleForm.resource">
<el-radio value="Sponsorship">Sponsorship</el-radio>
<el-radio value="Venue">Venue</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="Activity form" prop="desc">
<el-input v-model="ruleForm.desc" type="textarea" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm(ruleFormRef)">
Create
</el-button>
<el-button @click="resetForm(ruleFormRef)">Reset</el-button>
</el-form-item>
</el-form>
</template>
<script lang="ts" setup>
defineOptions({
name: 'Template3'
})
import { reactive, ref } from 'vue'
import type { FormInstance, FormRules } from 'element-plus'
interface RuleForm {
name: string
region: string
count: string
date1: string
date2: string
delivery: boolean
location: string
type: string[]
resource: string
desc: string
}
const ruleFormRef = ref<FormInstance>()
const ruleForm = reactive<RuleForm>({
name: 'Hello',
region: '',
count: '',
date1: '',
date2: '',
delivery: false,
location: '',
type: [],
resource: '',
desc: '',
})
const locationOptions = ['Home', 'Company', 'School']
const rules = reactive<FormRules<RuleForm>>({
name: [
{ required: true, message: 'Please input Activity name', trigger: 'blur' },
{ min: 3, max: 5, message: 'Length should be 3 to 5', trigger: 'blur' },
],
region: [
{
required: true,
message: 'Please select Activity zone',
trigger: 'change',
},
],
count: [
{
required: true,
message: 'Please select Activity count',
trigger: 'change',
},
],
date1: [
{
type: 'date',
required: true,
message: 'Please pick a date',
trigger: 'change',
},
],
date2: [
{
type: 'date',
required: true,
message: 'Please pick a time',
trigger: 'change',
},
],
location: [
{
required: true,
message: 'Please select a location',
trigger: 'change',
},
],
type: [
{
type: 'array',
required: true,
message: 'Please select at least one activity type',
trigger: 'change',
},
],
resource: [
{
required: true,
message: 'Please select activity resource',
trigger: 'change',
},
],
desc: [
{ required: true, message: 'Please input activity form', trigger: 'blur' },
],
})
const submitForm = async (formEl: FormInstance | undefined) => {
if (!formEl) return
await formEl.validate((valid, fields) => {
if (valid) {
console.log('submit!')
} else {
console.log('error submit!', fields)
}
})
}
const resetForm = (formEl: FormInstance | undefined) => {
if (!formEl) return
formEl.resetFields()
}
const options = Array.from({ length: 10000 }).map((_, idx) => ({
value: `${idx + 1}`,
label: `${idx + 1}`,
}))
</script>

View File

@@ -151,4 +151,30 @@ export function download(url, params, filename, config) {
})
}
// 添加GET方式下载方法
export function downloadGet(url, params, filename, config) {
downloadLoadingInstance = ElLoading.service({ text: "正在下载数据,请稍候", background: "rgba(0, 0, 0, 0.7)", })
return service.get(url, {
params: params,
responseType: 'blob',
...config
}).then(async (data) => {
const isBlob = blobValidate(data);
if (isBlob) {
const blob = new Blob([data])
saveAs(blob, filename)
} else {
const resText = await data.text();
const rspObj = JSON.parse(resText);
const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default']
ElMessage.error(errMsg);
}
downloadLoadingInstance.close();
}).catch((r) => {
console.error(r)
ElMessage.error('下载文件出现错误,请联系管理员!')
downloadLoadingInstance.close();
})
}
export default service

View File

@@ -0,0 +1,59 @@
import request from '@/utils/request'
// 查询诊疗项目列表
export function getTreeList(queryParams) {
return request({
url: '/document/definition/treeList',
method: 'get',
params: queryParams
})
}
// 初始化
export function init() {
return request({
url: '/document/definition/init',
method: 'get'
})
}
// 新增
export function add(data) {
return request({
url: '/document/definition/add',
method: 'post',
data
})
}
// 修改
export function update(data) {
return request({
url: '/document/definition/update',
method: 'post',
data
})
}
// 查询就诊科室
export function getLocationTree(query) {
return request({
url: '/charge-manage/register/org-list',
method: 'get',
params: query
})
}
// 查询就诊科室
export function getDefinitionById(id) {
return request({
url: `/document/definition/${id}`,
method: 'get'
})
}
export function deleteDefinition(id) {
return request({
url: `/document/definition/delete/${id}`,
method: 'delete'
})
}

View File

@@ -0,0 +1,250 @@
<template>
<!-- 病历文件基本信息弹窗 -->
<el-dialog
:title="title"
v-model="dialogVisible"
width="900px"
destroy-on-close
@open="handleOpen"
>
<!-- 使用el-form包裹表单 -->
<el-form :model="formData" ref="formRef" :rules="rules" label-width="120px">
<el-form-item label="一级菜单" prop="primaryMenuEnum">
<el-select
v-model="formData.primaryMenuEnum"
placeholder="请选择一级菜单"
value-key="value"
>
<el-option
v-for="item in props.docTypes || []"
:key="item.value"
:label="item.info"
:value="Number(item.value)"
/>
</el-select>
</el-form-item>
<el-form-item label="二级菜单" prop="subMenu">
<el-input v-model="formData.subMenu" placeholder="二级菜单"></el-input>
</el-form-item>
<el-form-item label="版本" prop="version">
<el-input v-model="formData.version" placeholder="请输入版本"></el-input>
</el-form-item>
<el-form-item label="名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入名称"></el-input>
</el-form-item>
<el-form-item label="文件" prop="vueRouter">
<el-select v-model="formData.vueRouter" placeholder="请选择文件路径">
<el-option
v-for="item in components"
:key="item.name"
:label="item.name"
:value="item.name"
/>
</el-select>
<!-- <el-input v-model="formData.vueRouter" placeholder="请输入文件路径"></el-input>s -->
</el-form-item>
<el-form-item label="显示顺序" prop="displayOrder">
<el-input-number v-model="formData.displayOrder" :min="1" label="描述文字"></el-input-number>
</el-form-item>
<el-form-item label="使用范围" prop="useRangeEnum">
<div class="radio-group">
<el-radio
v-for="item in props.useRanges"
:key="item.value"
v-model="formData.useRangeEnum"
:label="item.value"
>{{item.info}}</el-radio>
{{ formData.organizationIds }}
</div>
</el-form-item>
<!-- 科室选择框仅当使用范围为科室使用时显示 -->
<el-form-item v-if="formData.useRangeEnum === 2" label="科室选择" prop="organizationIds">
<el-transfer
v-model="formData.organizationIds"
filterable
:titles="['未分配科室', '已分配科室']"
:button-texts="['移除', '添加']"
:format="{
noChecked: '${total}',
hasChecked: '${checked}/${total}',
}"
:props="{key: 'id', label: 'name',}"
:data="transferData"
>
</el-transfer>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer"></div>
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="submitForm">确定</el-button>
</template>
</el-dialog>
</template>
<script setup >
import { ref, onMounted } from 'vue'
import useUserStore from '@/store/modules/user';
import { add, update,getLocationTree } from '../api';
import { ElMessage } from 'element-plus';
import { components } from '@/template';
const emits = defineEmits(['submitOk'])
const props = defineProps({
title: {
type: String,
default: '编辑病历文件信息'
},
formData: {
type: Object,
default: () => ({})
},
currentNodeData: {
type: Object,
default: () => ({})
},
docTypes: {
type: Array,
default: () => []
},
useRanges: {
type: Array,
default: () => []
},
})
const userStore = useUserStore();
const formRef = ref(null)
const dialogVisible= defineModel( 'dialogVisible', {
type: Boolean,
default: false
})
// 表单数据
const formData = ref({
primaryMenuEnum: undefined,
subMenu: '',
displayOrder: 1,
version: '',
name: '',
vueRouter: '',
useRangeEnum: 0, // 默认"暂不使用"0暂不使用1全院使用2科室使用
organizationIds: [], // 选中的科室ID列表整数类型
environment: '0'
});
// 表单验证规则(响应式,支持动态验证)
const rules = reactive({
primaryMenuEnum: [{ required: true, message: '请选择一级菜单', trigger: 'change' }],
// subMenu: [{ required: true, message: '请输入二级菜单', trigger: 'blur' }],
version: [{ required: true, message: '请输入版本', trigger: 'blur' }],
name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
vueRouter: [{ required: true, message: '请输入文件路径', trigger: 'blur' }],
displayOrder: [{ required: true, message: '请设置显示顺序', trigger: 'change' }],
useRangeEnum: [{ required: true, message: '请选择使用范围', trigger: 'change' }],
organizationIds: [
{
required: () => formData.value.useRangeEnum === 2, // 仅当"科室使用"时必填
message: '请选择科室',
trigger: ['change', 'blur']
}
]
});
const transferData = ref([]);
/** 查询科室树数据TreeSelect和Transfer共用 */
const getLocationInfo = () => {
getLocationTree().then((response) => {
transferData.value = response?.data || [];
}).catch((error) => {
ElMessage.error('获取科室树失败');
});
}
/** 递归将所有ID转换为整数类型 */
const convertIdsToNumbers = (item) => {
return {
...item,
id: Number(item.id), // 确保ID为整数
...(item.children && item.children.length > 0
? { children: item.children.map((child ) => convertIdsToNumbers(child)) }
: {})
};
};
const handleOpen = () => {
if (props.formData) {
console.log('props.formData', props.formData);
formData.value= props.formData
} else {
resetForm();
formRef.value.resetFields()
}
}
// 提交表单
const submitForm = () => {
formRef.value.validate((valid) => {
if (valid) {
// 表单验证通过,执行保存操作
saveForm();
} else {
// 表单验证失败
ElMessage.error('请填写必填项');
return false;
}
});
};
// 保存表单
const saveForm =async () => {
const userStore = useUserStore()
console.log('提交表单数据:', formData.value);
let data = { ...formData.value, tenantId: userStore.tenantId }
if (formData.value.useRangeEnum !== 2) {
formData.value.organizationIds = [];
}
try {
// 如果有当前节点数据,表示是编辑操作
if (props.currentNodeData) {
data.id = props.currentNodeData.id; // 添加ID
data.busNo = props.currentNodeData.busNo;
data.hospitalId = props.currentNodeData.hospitalId;
console.log('data',data)
const res = await update(data);
if (res.code == 200) {
ElMessage.success('更新成功');
emits('submitOk')
}else {
ElMessage.error('保存失败');
}
} else {
// 新建操作
const res = await add(data);
if (res.code == 200) {
ElMessage.success('保存成功');
emits('submitOk')
}else {
ElMessage.error('保存失败',error);
}
}
}
catch (error) {
console.log(error)
// ElMessage.error('保存失败',error);
}
}
// 重置表单
const resetForm = () => {
formRef.value?.resetFields();
formData.value.useRangeEnum = 0;
formData.value.environment = '0';
formData.value.organizationIds = [];
};
onMounted(()=>{
getLocationInfo()
})
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,2 +1,436 @@
<template>
</template>
<div class="case-templates-container">
<!-- 顶部工具栏 -->
<div class="toolbar">
<el-button type="primary" @click="newTemplate">新建</el-button>
<el-button type="primary" @click="editTemplate">编辑</el-button>
<el-button @click="refresh">刷新</el-button>
<el-button type="danger" @click="deleteTemplate">删除</el-button>
<el-button @click="printTemplate">打印</el-button>
</div>
<div class="content-area">
<!-- 左侧病历类型树 -->
<div class="left-panel">
<div style="margin-bottom: 10px">
<el-tree-select
v-model="orgId"
:data="orgOptions"
:props="{
value: 'id',
label: 'name',
children: 'children',
}"
value-key="id"
placeholder="请选择就诊科室"
check-strictly
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="locationTreeRef"
node-key="id"
highlight-current
default-expand-all
@node-click="initTemplateTree"
@clear="handleOrgClear"
clearable
/>
</div>
<div class="search-box">
<el-input
placeholder="病历名称搜索..."
v-model="searchKeyword"
></el-input>
<el-button class="search-btn" @click="handleSearch">查询</el-button>
</div>
<el-tree
ref="templateTree"
:data="templateData"
:props="defaultProps"
node-key="id"
@node-click="handleNodeClick"
class="template-tree"
></el-tree>
<el-button @click="toggleExpand">{{ isExpanded ? '全部收起' : '全部展开' }}</el-button>
</div>
<div class="middle-panel">
<el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="打印预览" name="first">
<!-- {{components}} -->
<component :is="currentComponent" />
</el-tab-pane>
<!-- <el-tab-pane label="编辑内容" name="second">
<component :is="currentComponent" />
</el-tab-pane> -->
</el-tabs>
</div>
</div>
<EditTemplate
v-model:dialogVisible="dialogVisible"
:title="currentNodeData ? '编辑病历文件信息' : '病历文件基本信息'"
:formData="formData"
:currentNodeData="currentNodeData"
@submitOk="handleSubmitOk"
:docTypes="templateDataInit.docTypes"
:useRanges="templateDataInit.useRanges"
/>
</div>
</template>
<script setup>
// 从Vue导入所需的API
import { ref, reactive, onMounted, defineAsyncComponent, nextTick, watch } from 'vue';
import { ElMessageBox, ElMessage, ElLoading, ElTree } from 'element-plus';
import { getTreeList, init, getDefinitionById, deleteDefinition,getLocationTree } from './api';
import EditTemplate from './components/editTemplate.vue';
// 添加当前模板路径和组件的响应式变量
const currentComponent = ref('');
const currentNodeData = ref(null); // 存储当前选中的节点数据
const isExpanded = ref(true); // 控制树形结构的展开状态
// 弹窗可见性
const dialogVisible = ref(false);
const orgId = ref('');
const orgOptions = ref([]); // 科室选项整数ID
const locationTreeRef = ref(null); // TreeSelect引用
const templateTree = ref(null);
const searchKeyword = ref(''); // 搜索关键字
const activeName = ref('first');
// Transfer组件选项类型定义ID为整数类型
// 表单数据
const formData = reactive({
primaryMenuEnum: undefined,
subMenu: '',
displayOrder: 1,
version: '',
name: '',
vueRouter: '',
useRangeEnum: 0, // 默认"暂不使用"0暂不使用1全院使用2科室使用
organizationIds: [], // 选中的科室ID列表整数类型
environment: '0',
});
const initFormData = () => {
formData.primaryMenuEnum = undefined;
formData.subMenu = '';
formData.displayOrder = 1;
formData.version = '';
formData.name = '';
formData.vueRouter = '';
formData.useRangeEnum = 0;
formData.organizationIds = [];
formData.environment = '0';
};
const getLocationInfo = () => {
getLocationTree().then((response) => {
orgOptions.value = response?.data || [];
}).catch((error) => {
ElMessage.error('获取科室树失败');
});
}
const handleSubmitOk = () => {
dialogVisible.value = false;
initFormData();
refresh();
};
// 组件初始化时加载基础数据
onMounted(() => {
getInit(); // 加载模板初始化数据(一级菜单、使用范围等)
getLocationInfo(); // 加载科室树
handleOrgClear(); // 初始化模板树(加载所有科室模板)
});
/** 将树形结构转换为Transfer组件所需的格式不扁平化保留层级关系 */
const convertTreeToTransferFormat = (tree) => {
return tree.map((item) => {
const option = {
key: item.id, // 整数ID
label: item.name,
disabled: false,
};
// 如果有子节点递归处理Transfer组件会自动处理层级显示
if (item.children && item.children.length > 0) {
option.children = convertTreeToTransferFormat(item.children);
}
return option;
});
};
// 病历模板树数据
const templateData = ref([]);
const templateDataInit = ref({}); // 初始化数据(菜单、使用范围)
// 树配置(模板树)
const defaultProps = {
children: 'children',
label: 'name',
value: 'id',
};
/** 过滤节点科室TreeSelect搜索 */
const filterNode = (value, data) => {
if (!value) return true;
return data?.name.toLowerCase().includes(value.toLowerCase()); // 不区分大小写搜索
};
/** 统一的API错误处理函数 */
const handleApiError = (userMessage, logMessage) => {
return (error) => {
// 记录详细错误日志,包括错误对象和调用栈
console.error(`${logMessage}:`, error);
// 显示用户友好的错误提示
ElMessage.error(
`${userMessage}失败${error.message ? ': ' + error.message : ',请刷新页面重试'}`
);
};
};
/** 加载模板初始化数据(一级菜单、使用范围枚举) */
const getInit = async () => {
try {
const response = await init();
templateDataInit.value = response.data || {};
console.log('模板初始化数据:', templateDataInit.value);
} catch (error) {
handleApiError('初始化', '初始化接口异常')(error);
}
};
/** 清除科室选择时,加载所有科室模板 */
const handleOrgClear = () => {
orgId.value = '';
initTemplateTree({ id: '' });
};
/** 搜索模板(可扩展按科室+关键字筛选) */
const handleSearch = () => {
console.log('搜索模板,关键字:', searchKeyword.value);
initTemplateTree({ id: orgId.value });
};
/** 初始化病历模板树(按科室筛选) */
function initTemplateTree(data) {
const queryParams = {
organizationId: data.id || '', // 科室ID空表示所有科室
name: searchKeyword.value || '', // 模板名称(空表示不筛选)
};
getTreeList(queryParams)
.then((res) => {
templateData.value = res.data || [];
nextTick().then(() => {
expandTree(); // 展开树节点
})
// console.log('模板树数据(按科室筛选):', templateData.value);
})
.catch((error) => {
handleApiError('获取模板列表', '获取模板树失败')(error);
templateData.value = [];
});
}
/** 编辑模板(打开弹窗并回显数据) */
const editTemplate = async () => {
if (!currentNodeData.value) {
ElMessage.warning('请先选择一个模板节点');
return;
}
const loading = ElLoading.service({
lock: true,
text: '加载模板信息...',
background: 'rgba(0, 0, 0, 0.7)',
});
try {
const response = await getDefinitionById(currentNodeData.value.id);
if (response.data) {
openEditDialog(response.data);
}
} catch (error) {
handleApiError('加载模板信息', '加载模板信息失败')(error);
} finally {
loading.close();
}
};
/** 打开编辑弹窗,回显选中的模板数据并正确初始化科室选择 */
const openEditDialog = async (nodeData) => {
currentNodeData.value = nodeData;
console.log('回显模板数据:', nodeData);
// 回显表单数据(与接口返回字段匹配)
formData.primaryMenuEnum = nodeData.primaryMenuEnum;
formData.subMenu = nodeData.subMenu;
formData.version = nodeData.version;
formData.name = nodeData.name;
formData.vueRouter = nodeData.vueRouter;
formData.displayOrder = nodeData.displayOrder;
formData.useRangeEnum = nodeData.useRangeEnum;
formData.environment = nodeData.environment || '0';
formData.organizationIds = nodeData.organizationIds.map((id) => id.toString());
// 打开弹窗
dialogVisible.value = true;
};
// 处理节点点击,根据后台返回的路径加载组件
const handleNodeClick = async (data, node) => {
console.log('点击节点:', data, node);
// 检查是否为子节点没有children或children为空
// const isLeafNode = !data.children || data.children.length === 0;
if (node.isLeaf) {
// 存储当前节点数据
currentNodeData.value = data.document;
// 检查是否为子节点没有children或children为空
currentComponent.value = data.document.vueRouter || '';
} else {
currentNodeData.value = null;
currentComponent.value = null;
}
};
const toggleExpand = () => {
isExpanded.value = !isExpanded.value;
console.log('展开状态:', templateTree.value.store);
expandTree();
};
const expandTree = () => {
templateTree.value.store._getAllNodes().forEach((node) => {
node.expanded = isExpanded.value;
});
};
const refresh = () => {
initTemplateTree({ id: orgId.value });
};
// 新建模板
const newTemplate = () => {
dialogVisible.value = true;
};
// 删除模板
const deleteTemplate = async () => {
// 1. 检查是否选中节点
if (!currentNodeData.value) {
ElMessage.warning('请先选择一个模板节点');
return;
}
let loading = null;
const templateName = currentNodeData.value.name;
const templateId = currentNodeData.value.id;
try {
// 2. 显示确认对话框,增加操作描述
const confirmResult = await ElMessageBox.confirm(
`确定要删除模板「${templateName}」吗?<br>此操作不可撤销,删除后将无法恢复。`,
'删除确认',
{
confirmButtonText: '确认删除',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true,
center: true,
closeOnClickModal: false,
}
);
// 3. 用户确认删除后执行操作
if (confirmResult === 'confirm') {
// 显示加载状态
loading = ElLoading.service({
lock: true,
text: '正在删除模板...',
background: 'rgba(0, 0, 0, 0.7)',
});
// 调用删除API
await deleteDefinition(templateId);
// 删除成功处理
ElMessage.success(`模板「${templateName}」删除成功`);
// 清空当前选中状态
currentNodeData.value = null;
initFormData();
currentComponent.value = null;
// 刷新列表
refresh();
}
} catch (error) {
// 错误处理区分用户取消和API错误
if (error === 'cancel' || error === undefined) {
// 用户取消删除,不显示错误提示
console.log('用户取消删除操作');
} else {
// API错误或其他错误使用统一的错误处理函数
handleApiError('删除模板', '删除模板失败')(error);
}
} finally {
// 确保加载状态总是被关闭
if (loading) {
loading.close();
}
}
};
// 打印模板
const printTemplate = () => {
window.print();
};
// 标签页点击事件
const handleClick = (tab) => {
console.log('标签页点击:', tab);
};
</script>
<style scoped>
.case-templates-container {
display: flex;
flex-direction: column;
height: 91vh;
}
.toolbar {
display: flex;
padding: 10px;
background-color: #f5f5f5;
border-bottom: 1px solid #ddd;
gap: 10px;
}
.content-area {
display: flex;
flex: 1;
overflow: hidden;
}
.left-panel {
width: 280px;
border-right: 1px solid #ddd;
display: flex;
flex-direction: column;
padding: 10px;
}
.search-box {
display: flex;
margin-bottom: 10px;
}
.search-btn {
margin-left: 5px;
}
.template-tree {
flex: 1;
overflow-y: auto;
}
.middle-panel {
flex: 1;
overflow-y: auto;
padding: 10px;
}
</style>

View File

@@ -32,7 +32,7 @@
<PopoverList @search="handleSearch" :width="800" :modelValue="scope.row.name">
<template #popover-content="{}">
<DeviceList
v-if="scope.row.type == '2'"
v-if="scope.row.type == '2' || props.tab == 2 "
@selectRow="(row) => selectRow(row, scope.$index)"
:searchKey="searchKey"
/>
@@ -58,6 +58,26 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column label="单位" align="center" prop="unitCode_dictText" width="100">
<template #default="scope">
<span v-if="!scope.row.isEdit">{{ scope.row.unitCode_dictText }}</span>
<el-form-item
v-else
:prop="`consumablesList.${scope.$index}.unitCode`"
:rules="rules.unitCode"
>
<el-select v-model="scope.row.unitCode" placeholder="">
<el-option
v-for="(item, index) in scope.row.unitCodeList"
@click="handleUnitCodeClick(item)"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</template>
</el-table-column>
<!-- <el-table-column label="使用范围" align="center" prop="rangeCode" width="150">
<template #default="scope">
<span v-if="!scope.row.isEdit">{{ scope.row.rangeCode_dictText }}</span>
@@ -70,7 +90,7 @@
</el-form-item>
</template>
</el-table-column> -->
<el-table-column label="范围" align="center" prop="rangeCode" width="250">
<!-- <el-table-column label="范围" align="center" prop="rangeCode" width="250">
<template #default="scope">
<span v-if="!scope.row.isEdit">{{ scope.row.rangeCode_dictText }}</span>
<el-form-item
@@ -88,7 +108,7 @@
</el-select>
</el-form-item>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="启用状态" align="center" prop="statusEnum" width="250">
<template #default="scope">
<span v-if="!scope.row.isEdit">{{ scope.row.statusEnum_dictText }}</span>
@@ -208,6 +228,8 @@ watch(
quantity: item.quantity,
rangeCode: item.rangeCode,
rangeCode_dictText: item.rangeCode_dictText,
unitCode: item.unitCode,
unitCode_dictText: item.unitCode_dictText,
statusEnum: item.statusEnum,
statusEnum_dictText: item.statusEnum_enumText,
typeCode: item.typeCode,
@@ -259,8 +281,9 @@ function handleSave(row, index) {
itemNo: props.bindInfo.id,
devActId: row.devActId,
typeCode: props.bindInfo.typeCode,
rangeCode: row.rangeCode,
rangeCode: '3',
quantity: row.quantity,
unitCode: row.unitCode,
statusEnum: row.statusEnum,
id: row.id ? row.id : undefined,
devActTable: row.type == '1' ? 'wor_activity_definition' : 'adm_device_definition',
@@ -298,6 +321,10 @@ function initOptions() {
});
}
function handleUnitCodeClick(row, item) {
row.unitCode_dictText = item.label;
}
function handleSearch(value) {
searchKey.value = value;
}
@@ -306,6 +333,16 @@ initOptions();
function selectRow(row, index) {
form.consumablesList[index].devActId = row.id;
form.consumablesList[index].name = row.name;
if (row.minUnitCode == row.unitCode) {
form.consumablesList[index].unitCodeList = [
{ label: row.unitCode_dictText, value: row.unitCode },
];
} else {
form.consumablesList[index].unitCodeList = [
{ label: row.unitCode_dictText, value: row.unitCode },
{ label: row.minUnitCode_dictText, value: row.minUnitCode },
];
}
}
</script>

View File

@@ -185,6 +185,7 @@ import {
deleteImplementDepartment,
} from './components/implementDepartment';
import { debounce } from 'lodash-es';
import { fa } from 'element-plus/es/locales.mjs';
const { proxy } = getCurrentInstance();
const organization = ref([]);
const loading = ref(true);
@@ -256,12 +257,14 @@ function DiagnosisTreatmentList(row,index,type) {
}else if(type == 2){
params.searchKey = row.activityDefinitionId_dictText
}
console.log(params,'params');
getImplementDepartmentOne(params)
.then((res) => {
if (res.code === 200) {
projectList.value = [];
row.name = null;
projectList.value = res.data.records.map((item) => ({ value: item.id, info: item.name }));
catagoryList.value[index].projectList = projectList.value
} else {
proxy.$modal.msgError(res.msg);
@@ -278,7 +281,12 @@ function remoteMethod(query, row) {
statusEnum: 2,
activityCategoryCode: row.activityCategoryCode, // 确保已选诊疗目录
searchKey: query, // 模糊搜索关键字
...row,
categoryCode: row.activityCategoryCode,
pageSize:100,
};
console.log(params,row,query,'params');
getImplementDepartmentOne(params).then((res) => {
loading.value = false;
if (res.code === 200) {
@@ -291,6 +299,8 @@ function remoteMethod(query, row) {
proxy.$modal.msgError(res.msg);
}
});
loading.value = false;
}
/** 选择条数 */

View File

@@ -0,0 +1,161 @@
<template>
<div @keyup="handleKeyDown" tabindex="0" ref="tableWrapper">
<el-table
ref="adviceBaseRef"
height="400"
:data="adviceBaseList"
highlight-current-row
@current-change="handleCurrentChange"
row-key="patientId"
@cell-click="clickRow"
>
<el-table-column label="名称" align="center" prop="adviceName" />
<el-table-column label="类型" align="center" prop="activityType_enumText" />
<el-table-column label="包装单位" align="center" prop="unitCode_dictText" />
<el-table-column label="最小单位" align="center" prop="minUnitCode_dictText" />
<el-table-column label="规格" align="center" prop="volume" />
<el-table-column label="用法" align="center" prop="methodCode_dictText" />
<el-table-column label="频次" align="center" prop="rateCode_dictText" />
<el-table-column label="单次剂量" align="center" prop="dose" />
<el-table-column label="剂量单位" align="center" prop="doseUnitCode_dictText" />
<el-table-column label="注射药品" align="center" prop="injectFlag_enumText" />
<el-table-column label="皮试" align="center" prop="skinTestFlag_enumText" />
</el-table>
</div>
</template>
<script setup>
import { nextTick } from 'vue';
import { getAdviceBaseInfo } from './api';
import { throttle } from 'lodash-es';
const props = defineProps({
adviceQueryParams: {
type: Object,
default: '',
},
patientInfo: {
type: Object,
required: true,
},
});
const emit = defineEmits(['selectAdviceBase']);
const total = ref(0);
const adviceBaseRef = ref();
const tableWrapper = ref();
const currentIndex = ref(0); // 当前选中行索引
const currentSelectRow = ref({});
const queryParams = ref({
pageSize: 100,
pageNum: 1,
adviceTypes: '2,3',
});
const adviceBaseList = ref([]);
// 节流函数
const throttledGetList = throttle(
() => {
getList();
},
300,
{ leading: true, trailing: true }
);
// 监听adviceQueryParams变化
watch(
() => props.adviceQueryParams,
(newValue) => {
queryParams.value.searchKey = newValue.searchKey;
queryParams.value.adviceType = newValue.adviceType;
console.log(queryParams.value);
throttledGetList();
},
{ deep: true }
);
// 监听searchKey变化
watch(
() => props.adviceQueryParams?.searchKey,
(newVal) => {
queryParams.value.searchKey = newVal;
throttledGetList();
}
);
getList();
function getList() {
// queryParams.value.organizationId = '1922545444781481985';
getAdviceBaseInfo(queryParams.value).then((res) => {
adviceBaseList.value = res.data.records;
console.log(adviceBaseList.value)
total.value = res.data.total;
nextTick(() => {
currentIndex.value = 0;
if (adviceBaseList.value.length > 0) {
adviceBaseRef.value.setCurrentRow(adviceBaseList.value[0]);
}
});
});
}
// 处理键盘事件
const handleKeyDown = (event) => {
const key = event.key;
const data = adviceBaseList.value;
switch (key) {
case 'ArrowUp': // 上箭头
event.preventDefault(); // 阻止默认滚动行为
if (currentIndex.value > 0) {
currentIndex.value--;
setCurrentRow(data[currentIndex.value]);
}
break;
case 'ArrowDown': // 下箭头`
event.preventDefault();
if (currentIndex.value < data.length - 1) {
currentIndex.value++;
setCurrentRow(data[currentIndex.value]);
}
break;
case 'Enter': // 回车键
// const currentRow = adviceBaseRef.value.getSelectionRows();
event.preventDefault();
if (currentSelectRow.value) {
// 这里可以触发自定义逻辑,如弹窗、跳转等
emit('selectAdviceBase', currentSelectRow.value);
}
break;
}
};
// 设置选中行(带滚动)
const setCurrentRow = (row) => {
adviceBaseRef.value.setCurrentRow(row);
// 滚动到选中行
const tableBody = adviceBaseRef.value.$el.querySelector('.el-table__body-wrapper');
const currentRowEl = adviceBaseRef.value.$el.querySelector('.current-row');
if (tableBody && currentRowEl) {
currentRowEl.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}
};
// 当前行变化时更新索引
const handleCurrentChange = (currentRow) => {
currentIndex.value = adviceBaseList.value.findIndex((item) => item === currentRow);
currentSelectRow.value = currentRow;
};
function clickRow(row) {
emit('selectAdviceBase', row);
}
defineExpose({
handleKeyDown,
});
</script>
<style scoped>
.popover-table-wrapper:focus {
outline: 2px solid #409eff; /* 聚焦时的高亮效果 */
}
</style>

View File

@@ -0,0 +1,129 @@
import request from '@/utils/request'
/**
* 获取个人组套
* @param {*} queryParams
*/
export function getPersonalList(queryParams) {
return request({
url: '/personalization/orders-group-package/get-personal',
method: 'get',
params: queryParams
})
}
/**
* 获取科室组套
* @param {*} queryParams
*/
export function getDeptList(queryParams) {
return request({
url: '/personalization/orders-group-package/get-organization',
method: 'get',
params: queryParams
})
}
/**
* 获取全院组套
* @param {*} queryParams
*/
export function getAllList(queryParams) {
return request({
url: '/personalization/orders-group-package/get-hospital',
method: 'get',
params: queryParams
})
}
/**
* 保存个人组套
* @param {*} data
*/
export function savePersonal(data) {
return request({
url: '/personalization/orders-group-package/save-personal',
method: 'post',
data: data
})
}
/**
* 保存科室组套
* @param {*} data
*/
export function saveDepartment(data) {
return request({
url: '/personalization/orders-group-package/save-organization',
method: 'post',
data: data
})
}
/**
* 保存全院组套
* @param {*} data
*/
export function saveAll(data) {
return request({
url: '/personalization/orders-group-package/save-hospital',
method: 'post',
data: data
})
}
/**
* 查询组套明细
* @param {*} data
*/
export function queryGroupDetail(params) {
return request({
url: '/personalization/orders-group-package/get-group-package-detail',
method: 'get',
params: params
})
}
/**
* 删除组套
* @param {*} data
*/
export function deleteGroup(data) {
return request({
url: '/personalization/orders-group-package/group-package-detail?groupPackageId=' + data.groupPackageId,
method: 'delete'
})
}
/**
* 查询参与者下拉列表
* @param {*} data
*/
export function queryParticipantList(params) {
return request({
url: '/app-common/practitioner-list',
method: 'get',
params: params
})
}
/**
* 获取药品列表
*/
export function getAdviceBaseInfo(queryParams) {
return request({
url: '/doctor-station/advice/advice-base-info',
method: 'get',
params: queryParams
})
}
/**
* 获取科室列表
*/
export function getOrgTree() {
return request({
url: '/base-data-manage/organization/organization',
method: 'get',
})
}

View File

@@ -0,0 +1,686 @@
<template>
<div class="app-container">
<el-tabs v-model="activeTab" @tab-change="handleTabChange">
<el-tab-pane label="个人" name="personal">
<div class="mb10">
<el-row :gutter="10" class="mb10">
<el-col :span="6">
<el-input v-model="personalQuery.searchKey" placeholder="请输入名称" clearable @keyup.enter="getPersonalListData" />
</el-col>
<el-col :span="1.5">
<el-button type="primary" icon="Search" @click="getPersonalListData">查询</el-button>
</el-col>
</el-row>
<el-button type="primary" plain icon="Plus" @click="handleAdd('personal')">新增</el-button>
</div>
<el-table :data="personalList" border v-loading="loading.personal">
<el-table-column prop="name" label="名称" />
<el-table-column prop="practitionerName" label="参与者" />
<el-table-column label="操作" width="150">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleEdit('personal', scope.row)">编辑</el-button>
<el-button link type="danger" icon="Delete" @click="handleDelete('personal', scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="科室" name="department">
<div class="mb10">
<el-row :gutter="10" class="mb10">
<el-col :span="6">
<el-input v-model="departmentQuery.searchKey" placeholder="请输入名称" clearable @keyup.enter="getDepartmentListData" />
</el-col>
<el-col :span="1.5">
<el-button type="primary" icon="Search" @click="getDepartmentListData">查询</el-button>
</el-col>
</el-row>
<el-button type="primary" plain icon="Plus" @click="handleAdd('department')">新增</el-button>
</div>
<el-table :data="departmentList" border v-loading="loading.department">
<el-table-column prop="name" label="名称" />
<el-table-column prop="organizationName" label="科室" />
<el-table-column label="操作" width="150">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleEdit('department', scope.row)">编辑</el-button>
<el-button link type="danger" icon="Delete" @click="handleDelete('department', scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="全院" name="hospital">
<div class="mb10">
<el-row :gutter="10" class="mb10">
<el-col :span="6">
<el-input v-model="hospitalQuery.searchKey" placeholder="请输入名称" clearable @keyup.enter="getHospitalListData" />
</el-col>
<el-col :span="1.5">
<el-button type="primary" icon="Search" @click="getHospitalListData">查询</el-button>
</el-col>
</el-row>
<el-button type="primary" plain icon="Plus" @click="handleAdd('hospital')">新增</el-button>
</div>
<el-table :data="hospitalList" border v-loading="loading.hospital">
<el-table-column prop="name" label="名称" />
<el-table-column label="操作" width="150">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleEdit('hospital', scope.row)">编辑</el-button>
<el-button link type="danger" icon="Delete" @click="handleDelete('hospital', scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<!-- 新增/编辑弹窗 -->
<el-dialog
:title="dialogTitle"
v-model="dialogVisible"
width="800px"
@close="handleDialogClose"
>
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item label="名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="参与者" prop="practitionerId" v-if="currentTab == 'personal'">
<el-select
v-model="formData.practitionerId"
placeholder="请选择参与者"
clearable
>
<el-option
v-for="item in participantListOptions"
:key="item.practitionerId"
:label="item.practitionerName"
:value="item.practitionerId"
/>
</el-select>
</el-form-item>
<el-form-item label="科室" prop="organizationId" v-if="currentTab == 'department'">
<el-tree-select
clearable
v-model="formData.organizationId"
:data="organization"
:props="{ value: 'id', label: 'name', children: 'children' }"
value-key="id"
check-strictly
default-expand-all
placeholder="请选择科室"
:render-after-expand="false"
@change="handleOrgChange"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
max-height="650"
ref="prescriptionRef"
:data="prescriptionList"
row-key="uniqueKey"
border
@cell-click="clickRow"
:expand-row-keys="expandOrder"
>
<el-table-column label="医嘱" align="center" prop="productName">
<template #default="scope">
<template v-if="getRowDisabled(scope.row)">
<el-popover
:popper-style="{ padding: '0' }"
placement="bottom-start"
:visible="scope.row.showPopover"
:width="1200"
>
<adviceBaseList
ref="adviceTableRef"
:popoverVisible="scope.row.showPopover"
:adviceQueryParams="adviceQueryParams"
@selectAdviceBase="(row) => selectAdviceBase(scope.row.uniqueKey, row)"
/>
<template #reference>
<el-input
:ref="'adviceRef' + scope.$index"
style="width: 50%"
v-model="scope.row.adviceName"
placeholder="请选择项目"
@input="(value) => handleInput(value, scope.row, scope.$index)"
@click="handleFocus(scope.row, scope.$index)"
@keyup.enter.stop="handleFocus(scope.row, scope.$index)"
@keydown="
(e) => {
if (!scope.row.showPopover) return;
// 拦截上下键和回车事件
if (['ArrowUp', 'ArrowDown', 'Enter'].includes(e.key)) {
e.preventDefault();
// 传递事件到弹窗容器
adviceTableRef.handleKeyDown(e);
}
}
"
@blur="handleBlur(scope.row)"
/>
</template>
</el-popover>
</template>
<span v-else>{{ scope.row.adviceName }}</span>
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="100" prop="sortNumber">
<template #default="scope">
<template v-if="!scope.row.groupPackageId">
<el-input
v-model="scope.row.sortNumber"
type="number"
min="1"
@change="handleQuantityChange(scope.row)"
/>
</template>
<span v-else>{{ scope.row.sortNumber }}</span>
</template>
</el-table-column>
<el-table-column label="单位" align="center" width="120" prop="unitCode">
<template #default="scope">
<template v-if="!scope.row.groupPackageId">
<el-select
v-model="scope.row.selectUnitCode"
placeholder="请选择单位"
@change="handleUnitChange(scope.row)"
>
<el-option
v-if="scope.row.minUnitCode"
:key="scope.row.minUnitCode"
:label="scope.row.minUnitCode_dictText || scope.row.minUnitCode"
:value="scope.row.minUnitCode"
/>
<el-option
v-if="scope.row.unitCode"
:key="scope.row.unitCode"
:label="scope.row.unitCode_dictText || scope.row.unitCode"
:value="scope.row.unitCode"
/>
</el-select>
</template>
<span>{{ scope.row.unitCodeName }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="80">
<template #default="scope">
<el-button
type="danger"
icon="Delete"
circle
size="small"
@click="handleDeleteRow(scope.$index, scope.row)"
/>
</template>
</el-table-column>
</el-table>
<template #footer>
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm" :loading="submitLoading"> </el-button>
</template>
</el-dialog>
</div>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
import {
getPersonalList,
getDeptList,
getAllList,
queryParticipantList,
savePersonal,
saveDepartment,
saveAll,
queryGroupDetail,
getOrgTree,
deleteGroup
} from './components/api.js';
import adviceBaseList from './components/adviceBaseList';
import { ElMessage } from 'element-plus';
import useUserStore from '@/store/modules/user';
// 定义tab相关数据
const activeTab = ref('personal')
// 定义各tab列表数据
const personalList = ref([])
const departmentList = ref([])
const hospitalList = ref([])
const prescriptionList = ref([]);
const expandOrder = ref([]); //目前的展开行
// 查询参数
const personalQuery = reactive({ searchKey: '' })
const departmentQuery = reactive({ searchKey: '' })
const hospitalQuery = reactive({ searchKey: '' })
// 加载状态
const loading = reactive({
personal: false,
department: false,
hospital: false
})
// 提交按钮加载状态
const submitLoading = ref(false)
// 弹窗相关数据
const dialogVisible = ref(false)
const dialogTitle = ref('')
const currentTab = ref('') // 记录当前操作的tab
const isEdit = ref(false) // 是否为编辑模式
const currentRow = ref(null) // 当前编辑的行数据
const participantListOptions = ref([])
const organization = ref([]);
const adviceQueryParams = reactive({})
// 表单数据
const formData = reactive({
id: undefined,
name: ''
})
const nextId = ref(1);
const rowIndex = ref(0);
// 表单验证规则
const formRules = {
name: [
{ required: true, message: '请输入名称', trigger: 'blur' }
]
}
// 表单引用
const formRef = ref()
// 页面加载时获取所有列表数据
onMounted(() => {
// 可以添加初始查询参数
const initialParams = {
searchKey: '' // 初始查询关键字
};
fetchAllData(initialParams)
getInit()
})
function getInit() {
queryParticipantList().then((res) => {
participantListOptions.value = res.data
});
getOrgTree().then(res => {
organization.value = res.data.records;
})
}
// 获取所有数据
function fetchAllData(params = {}) {
getPersonalListData(params)
getDepartmentListData(params)
getHospitalListData(params)
}
// 获取个人医嘱列表
function getPersonalListData(params = {}) {
// 合并查询参数
Object.assign(personalQuery, params);
loading.personal = true
getPersonalList(personalQuery).then(response => {
personalList.value = response.data
loading.personal = false
}).catch(error => {
console.error('获取个人医嘱列表失败:', error)
loading.personal = false
proxy.$modal.msgError('获取个人医嘱列表失败')
})
}
// 获取科室医嘱列表
function getDepartmentListData(params = {}) {
// 合并查询参数
Object.assign(departmentQuery, params);
loading.department = true
getDeptList(departmentQuery).then(response => {
departmentList.value = response.data
loading.department = false
}).catch(error => {
console.error('获取科室医嘱列表失败:', error)
loading.department = false
proxy.$modal.msgError('获取科室医嘱列表失败')
})
}
// 获取全院医嘱列表
function getHospitalListData(params = {}) {
// 合并查询参数
Object.assign(hospitalQuery, params);
loading.hospital = true
getAllList(hospitalQuery).then(response => {
hospitalList.value = response.data
loading.hospital = false
}).catch(error => {
console.error('获取全院医嘱列表失败:', error)
loading.hospital = false
proxy.$modal.msgError('获取全院医嘱列表失败')
})
}
// tab切换处理
function handleTabChange(tab) {
// 根据切换到的tab调用相应的接口获取数据
switch (tab) {
case 'personal':
getPersonalListData()
break
case 'department':
getDepartmentListData()
break
case 'hospital':
getHospitalListData()
break
}
}
// 新增按钮处理
function handleAdd(tab) {
currentTab.value = tab
isEdit.value = false
dialogTitle.value = '新增医嘱'
dialogVisible.value = true
// 重置表单
prescriptionList.value.unshift({
uniqueKey: nextId.value++,
showPopover: false,
check: false,
isEdit: true,
statusEnum: 1,
});
formData.groupPackageId = undefined
formData.name = ''
// 获取当前登录用户信息
const userStore = useUserStore()
const userId = userStore.id
const orgId = userStore.orgId
const practitionerId = userStore.practitionerId
// 根据不同tab设置默认值
if (tab === 'personal') {
// 个人医嘱默认设置当前用户为参与者
formData.practitionerId = practitionerId
} else if (tab === 'department') {
// 科室医嘱默认设置当前科室
formData.organizationId = orgId
}
// 全院医嘱不需要设置默认值
}
// 编辑按钮处理
function handleEdit(tab, row) {
currentTab.value = tab
isEdit.value = true
currentRow.value = row
dialogTitle.value = '编辑医嘱'
dialogVisible.value = true
formData.groupPackageId = row.groupPackageId
formData.name = row.name
formData.practitionerId = row.practitionerId
formData.organizationId = row.organizationId
// 填充表单数据
queryGroupDetail({ groupPackageId: row.groupPackageId }).then(res => {
prescriptionList.value = res.data.map(item => {
return {
groupPackageId: item.groupPackageId,
adviceDefinitionId: item.orderDefinitionId,
adviceTableName: item.orderDefinitionTable,
sortNumber: item.quantity,
selectUnitCode: item.unitCode,
adviceName: item.orderDefinitionName,
unitCodeName: item.unitCodeName
}
})
prescriptionList.value.unshift({
uniqueKey: nextId.value++,
showPopover: false,
check: false,
isEdit: true,
statusEnum: 1,
});
})
}
// 删除按钮处理
function handleDelete(tab, row) {
// 显示确认框
proxy.$modal.confirm('确定要删除该医嘱吗?').then(() => {
deleteGroup({groupPackageId: row.groupPackageId}).then(res => {
proxy.$modal.msgSuccess(res.msg)
fetchAllData()
})
}).catch(() => {})
}
// 提交表单
function submitForm() {
formRef.value.validate((valid) => {
if (valid) {
submitLoading.value = true
// 模拟提交操作这里应该调用相应的API
setTimeout(() => {
console.log('提交表单数据:', formData)
let params = {...formData}
// 过滤掉空列表项没有adviceDefinitionId的项
params.detailList = prescriptionList.value
.filter(item => item.adviceDefinitionId) // 过滤掉空列表项
.map(item => {
return {
orderDefinitionId: item.adviceDefinitionId,
orderDefinitionTable: item.adviceTableName,
quantity: item.sortNumber,
unitCode: item.selectUnitCode,
}
})
// 编辑模式
switch (currentTab.value) {
case 'personal':
savePersonal(params).then(res => {
if (res.code === 200) {
ElMessage.success(res.message)
// 重新获取数据以保持一致性
fetchAllData()
}
submitLoading.value = false
dialogVisible.value = false
// 清空处方列表
prescriptionList.value = []
})
break
case 'department':
saveDepartment(params).then(res => {
if (res.code === 200) {
ElMessage.success(res.message)
// 重新获取数据以保持一致性
fetchAllData()
}
submitLoading.value = false
dialogVisible.value = false
// 清空处方列表
prescriptionList.value = []
})
break
case 'hospital':
saveAll(params).then(res => {
if (res.code === 200) {
ElMessage.success(res.message)
// 重新获取数据以保持一致性
fetchAllData()
}
submitLoading.value = false
dialogVisible.value = false
// 清空处方列表
prescriptionList.value = []
})
break
}
}, 500)
}
})
}
/**
* 选择药品回调
*/
function selectAdviceBase(key, row) {
prescriptionList.value[rowIndex.value] = {
...prescriptionList.value[rowIndex.value],
...JSON.parse(JSON.stringify(row)),
};
prescriptionList.value[rowIndex.value].orgId = undefined;
prescriptionList.value[rowIndex.value].dose = undefined;
prescriptionList.value[rowIndex.value].doseUnitCode = row.doseUnitCode;
prescriptionList.value[rowIndex.value].minUnitCode = row.minUnitCode;
prescriptionList.value[rowIndex.value].unitCode =
row.partAttributeEnum == 1 ? row.minUnitCode : row.unitCode;
prescriptionList.value[rowIndex.value].categoryEnum = row.categoryCode;
prescriptionList.value[rowIndex.value].isEdit = false;
prescriptionList.value[rowIndex.value].definitionId = JSON.parse(
JSON.stringify(row)
).chargeItemDefinitionId;
prescriptionList.value.unshift({
uniqueKey: nextId.value++,
showPopover: false,
check: false,
isEdit: true,
statusEnum: 1,
});
expandOrder.value = [key];
}
function handleFocus(row, index) {
rowIndex.value = index;
row.showPopover = true;
// 将输入框的值传递给adviceBaseList组件作为查询条件
adviceQueryParams.searchKey = row.adviceName || '';
}
// 处理输入事件
function handleInput(value, row, index) {
// 更新查询参数
adviceQueryParams.searchKey = value || '';
// 显示弹窗
handleFocus(row, index);
}
function handleBlur(row) {
row.showPopover = false;
}
/**
* 点击行赋值
*/
function clickRow(row) {
}
function getRowDisabled(row) {
return row.isEdit;
}
// 处理数量变化
function handleQuantityChange(row) {
// 验证数量是否为正整数
if (row.sortNumber && row.sortNumber > 0) {
row.sortNumber = parseInt(row.sortNumber);
} else {
row.sortNumber = 1;
}
// 触发更新列表事件
prescriptionList.value = [...prescriptionList.value];
}
// 处理单位变化
function handleUnitChange(row) {
// 当单位改变时触发的逻辑可以在这里添加
console.log('单位已更改:', row.unitCode);
// 触发更新列表事件
prescriptionList.value = [...prescriptionList.value];
}
// 删除行
function handleDeleteRow(index, row) {
// 确保至少保留一行
if (prescriptionList.value.length <= 1) {
proxy.$modal.msgWarning('至少保留一行');
return;
}
// 确认删除
proxy.$modal.confirm('确定要删除该行吗?').then(() => {
prescriptionList.value.splice(index, 1);
proxy.$modal.msgSuccess('删除成功');
}).catch(() => {
// 取消删除
});
}
// 判断是否为叶子节点
function isLeafNode(node) {
return !node.children || node.children.length === 0;
}
// 弹窗关闭处理
function handleDialogClose() {
formRef.value.resetFields()
// 清空处方列表
prescriptionList.value = []
}
// 处理科室选择变化
function handleOrgChange(value) {
if (!value) return;
// 查找选中的节点
const findNode = (nodes) => {
for (let node of nodes) {
if (node.id === value) {
return node;
}
if (node.children && node.children.length > 0) {
const found = findNode(node.children);
if (found) return found;
}
}
return null;
};
const selectedNode = findNode(organization.value);
// 如果选中的不是叶子节点,则清空选择
if (selectedNode && !isLeafNode(selectedNode)) {
proxy.$modal.msgWarning('只能选择末级科室');
formData.organizationId = null;
}
}
// 获取当前实例用于使用proxy
const { proxy } = getCurrentInstance()
</script>
<style scoped>
.mb10 {
margin-bottom: 10px;
}
</style>

View File

@@ -55,11 +55,11 @@ export function deptTreeSelect(queryParams) {
}
// 查询地点树形数据
export function locationTreeSelect(queryParams) {
export function locationTreeSelect(param) {
return request({
url: '/base-data-manage/location/location-page-tree',
method: 'get',
param: queryParams
params: param
})
}

View File

@@ -467,7 +467,7 @@ function getDeptTree() {
/** 查询地点下拉树结构 */
function getLocationTree() {
locationTreeSelect().then((response) => {
locationTreeSelect({ formList: '11,16' }).then((response) => {
console.log(response, 'response查询部门下拉树结构');
locationOptions.value = response.data.records;
console.log(locationOptions.value, '部门下拉树结构');

View File

@@ -5,113 +5,55 @@
<el-col :span="4" :xs="24">
<div class="head-title">器材目录</div>
<div class="head-container">
<el-tree
:data="deviceCategories"
:props="{ label: 'info', children: 'children' }"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="treeRef"
node-key="id"
highlight-current
default-expand-all
@node-click="handleNodeClick"
/>
<el-tree :data="deviceCategories" :props="{ label: 'info', children: 'children' }"
:expand-on-click-node="false" :filter-node-method="filterNode" ref="treeRef" node-key="id" highlight-current
default-expand-all @node-click="handleNodeClick" />
</div>
</el-col>
<!--器材目录-->
<el-col :span="20" :xs="24">
<el-form
:model="queryParams"
ref="queryRef"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-row :gutter="24">
<!-- <el-col :span="6"> -->
<el-form-item label="项目名" prop="searchKey" label-width="55">
<el-input
v-model="queryParams.searchKey"
placeholder="品名/商品名/英文品名/编码/拼音"
clearable
style="width: 220px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="项目名" prop="searchKey" label-width="55">
<el-input v-model="queryParams.searchKey" placeholder="品名/商品名/英文品名/编码/拼音" clearable style="width: 220px"
@keyup.enter="handleQuery" />
</el-form-item>
<!-- </el-col> -->
<!-- <el-col :span="5"> -->
<el-form-item label="状态" prop="statusEnum" label-width="50">
<el-select v-model="queryParams.statusEnum" clearable>
<el-option
v-for="status in statusFlagOptions"
:key="status.value"
:label="status.info"
:value="status.value"
/>
</el-select>
</el-form-item>
<el-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-form-item label="医保是否对码" prop="ybMatchFlag" label-width="100">
<el-select v-model="queryParams.ybMatchFlag" placeholder="" clearable>
<el-option v-for="item in statusYBWeatherOptions" :key="item.value" :label="item.info"
:value="item.value" />
</el-select>
</el-form-item>
<!-- </el-col> -->
</el-row>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="openAddDevice"
>添加新项目</el-button
>
<el-button type="primary" plain icon="Plus" @click="openAddDevice">添加新项目</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Remove"
:disabled="multiple"
@click="handleClose"
>停用</el-button
>
<el-button type="danger" plain icon="Remove" :disabled="multiple" @click="handleClose">停用</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="CirclePlus"
:disabled="multiple"
@click="handleStart"
>启用</el-button
>
<el-button type="success" plain icon="CirclePlus" :disabled="multiple" @click="handleStart">启用</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Search"
@click="getList"
>查询</el-button
>
<el-button type="info" plain icon="Upload" @click="handleImport">导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="Search" @click="getList">查询</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button
@@ -124,167 +66,50 @@
</el-col> -->
</el-row>
<el-table
v-loading="loading"
:data="deviceList"
@selection-change="handleSelectionChange"
width="90%"
>
<el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange" width="90%">
<el-table-column type="selection" width="50" align="center" />
<el-table-column
label="编码"
align="center"
key="busNo"
prop="busNo"
:show-overflow-tooltip="true"
/>
<el-table-column
label="器材名称"
align="center"
key="name"
prop="name"
:show-overflow-tooltip="true"
/>
<el-table-column
label="拼音"
align="center"
key="pyStr"
prop="pyStr"
:show-overflow-tooltip="true"
/>
<el-table-column
label="器材分类"
align="center"
key="categoryCode_dictText"
prop="categoryCode_dictText"
:show-overflow-tooltip="true"
width="100"
/>
<el-table-column
label="器材种类"
align="center"
key="typeCode_dictText"
prop="typeCode_dictText"
:show-overflow-tooltip="true"
width="50"
/>
<el-table-column
label="包装单位"
align="center"
key="unitCode_dictText"
prop="unitCode_dictText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="包装规格"
align="center"
key="size"
prop="size"
:show-overflow-tooltip="true"
/>
<el-table-column
label="拆零比"
align="center"
key="partPercent"
prop="partPercent"
:show-overflow-tooltip="true"
>
<el-table-column label="编码" align="center" key="busNo" prop="busNo" :show-overflow-tooltip="true" />
<el-table-column label="器材名称" align="center" key="name" prop="name" :show-overflow-tooltip="true" />
<el-table-column label="拼音" align="center" key="pyStr" prop="pyStr" :show-overflow-tooltip="true" />
<el-table-column label="器材分类" align="center" key="categoryCode_dictText" prop="categoryCode_dictText"
:show-overflow-tooltip="true" width="100" />
<el-table-column label="器材种类" align="center" key="typeCode_dictText" prop="typeCode_dictText"
:show-overflow-tooltip="true" width="50" />
<el-table-column label="包装单位" align="center" key="unitCode_dictText" prop="unitCode_dictText"
:show-overflow-tooltip="true" />
<el-table-column label="包装规格" align="center" key="size" prop="size" :show-overflow-tooltip="true" />
<el-table-column label="拆零比" align="center" key="partPercent" prop="partPercent"
:show-overflow-tooltip="true">
<template #default="scope">
{{ scope.row.partPercent !== null && scope.row.partPercent !== undefined ? scope.row.partPercent : 1 }}
</template>
</el-table-column>
<el-table-column
label="最小使用单位"
align="center"
key="minUnitCode_dictText"
prop="minUnitCode_dictText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="所属科室"
align="center"
key="orgId_dictText"
prop="orgId_dictText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="所在位置"
align="center"
key="locationId_dictText"
prop="locationId_dictText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="产品型号"
align="center"
key="modelNumber"
prop="modelNumber"
:show-overflow-tooltip="true"
/>
<el-table-column
label="高值器材标志"
align="center"
key="hvcmFlag_enumText"
prop="hvcmFlag_enumText"
:show-overflow-tooltip="true"
/>
<el-table-column label="最小使用单位" align="center" key="minUnitCode_dictText" prop="minUnitCode_dictText"
:show-overflow-tooltip="true" />
<el-table-column label="所属科室" align="center" key="orgId_dictText" prop="orgId_dictText"
:show-overflow-tooltip="true" />
<el-table-column label="所在位置" align="center" key="locationId_dictText" prop="locationId_dictText"
:show-overflow-tooltip="true" />
<el-table-column label="产品型号" align="center" key="modelNumber" prop="modelNumber"
:show-overflow-tooltip="true" />
<el-table-column label="高值器材标志" align="center" key="hvcmFlag_enumText" prop="hvcmFlag_enumText"
:show-overflow-tooltip="true" />
<el-table-column
label="销售单位"
align="center"
key="salesUnitCode_dictText"
prop="salesUnitCode_dictText"
:show-overflow-tooltip="true"
width="100"
/>
<el-table-column
label="批准文号"
align="center"
key="approvalNumber"
prop="approvalNumber"
:show-overflow-tooltip="true"
/>
<el-table-column
label="医保标记"
align="center"
key="ybFlag_enumText"
prop="ybFlag_enumText"
:show-overflow-tooltip="true"
width="110"
/>
<el-table-column
label="医保编码"
align="center"
key="ybNo"
prop="ybNo"
:show-overflow-tooltip="true"
width="110"
/>
<el-table-column
label="医药机构目录编码"
align="center"
key="ybOrgNo"
prop="ybOrgNo"
:show-overflow-tooltip="true"
width="130"
/>
<el-table-column
label="医保对码标记"
align="center"
key="ybMatchFlag_enumText"
prop="ybMatchFlag_enumText"
:show-overflow-tooltip="true"
width="105"
/>
<el-table-column
label="状态"
align="center"
key="statusEnum_enumText"
prop="statusEnum_enumText"
:show-overflow-tooltip="true"
width="90"
/>
<el-table-column label="销售单位" align="center" key="salesUnitCode_dictText" prop="salesUnitCode_dictText"
:show-overflow-tooltip="true" width="100" />
<el-table-column label="批准文号" align="center" key="approvalNumber" prop="approvalNumber"
:show-overflow-tooltip="true" />
<el-table-column label="医保标记" align="center" key="ybFlag_enumText" prop="ybFlag_enumText"
:show-overflow-tooltip="true" width="110" />
<el-table-column label="医保编码" align="center" key="ybNo" prop="ybNo" :show-overflow-tooltip="true"
width="110" />
<el-table-column label="医药机构目录编码" align="center" key="ybOrgNo" prop="ybOrgNo" :show-overflow-tooltip="true"
width="130" />
<el-table-column label="医保对码标记" align="center" key="ybMatchFlag_enumText" prop="ybMatchFlag_enumText"
:show-overflow-tooltip="true" width="105" />
<el-table-column label="状态" align="center" key="statusEnum_enumText" prop="statusEnum_enumText"
:show-overflow-tooltip="true" width="90" />
<!-- <el-table-column
label="生产厂家"
align="center"
@@ -293,136 +118,74 @@
:show-overflow-tooltip="true"
width="90"
/> -->
<el-table-column
label="生产厂家"
align="center"
key="manufacturerText"
prop="manufacturerText"
:show-overflow-tooltip="true"
width="90"
/>
<el-table-column
label="供应商"
align="center"
key="supplyId_dictText"
prop="supplyId_dictText"
:show-overflow-tooltip="true"
width="110"
/>
<el-table-column
label="说明"
align="center"
key="description"
prop="description"
:show-overflow-tooltip="true"
/>
<el-table-column
label="适用范围"
align="center"
key="jurisdiction"
prop="jurisdiction"
:show-overflow-tooltip="true"
width="120"
/>
<el-table-column
label="器材版本"
align="center"
key="version"
prop="version"
:show-overflow-tooltip="true"
width="120"
/>
<el-table-column
label="主要成分"
align="center"
key="substanceText"
prop="substanceText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="过敏标记"
align="center"
key="allergenFlag_enumText"
prop="allergenFlag_enumText"
:show-overflow-tooltip="true"
width="90"
/>
<el-table-column
label="售价"
align="center"
key="retailPrice"
prop="retailPrice"
:show-overflow-tooltip="true"
width="90"
/>
<el-table-column
label="财务类别"
align="center"
key="itemTypeCode_dictText"
prop="itemTypeCode_dictText"
:show-overflow-tooltip="true"
width="90"
/>
<el-table-column
label="医保类别"
align="center"
key="ybType_dictText"
prop="ybType_dictText"
:show-overflow-tooltip="true"
width="90"
/>
<el-table-column
label="操作"
align="center"
width="150"
class-name="small-padding fixed-width"
fixed="right"
>
<el-table-column label="生产厂家" align="center" key="manufacturerText" prop="manufacturerText"
:show-overflow-tooltip="true" width="90" />
<el-table-column label="供应商" align="center" key="supplyId_dictText" prop="supplyId_dictText"
:show-overflow-tooltip="true" width="110" />
<el-table-column label="说明" align="center" key="description" prop="description"
:show-overflow-tooltip="true" />
<el-table-column label="适用范围" align="center" key="jurisdiction" prop="jurisdiction"
:show-overflow-tooltip="true" width="120" />
<el-table-column label="器材版本" align="center" key="version" prop="version" :show-overflow-tooltip="true"
width="120" />
<el-table-column label="主要成分" align="center" key="substanceText" prop="substanceText"
:show-overflow-tooltip="true" />
<el-table-column label="过敏标记" align="center" key="allergenFlag_enumText" prop="allergenFlag_enumText"
:show-overflow-tooltip="true" width="90" />
<el-table-column label="售价" align="center" key="retailPrice" prop="retailPrice" :show-overflow-tooltip="true"
width="90" />
<el-table-column label="财务类别" align="center" key="itemTypeCode_dictText" prop="itemTypeCode_dictText"
:show-overflow-tooltip="true" width="90" />
<el-table-column label="医保类别" align="center" key="ybType_dictText" prop="ybType_dictText"
:show-overflow-tooltip="true" width="90" />
<el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width" fixed="right">
<template #default="scope">
<el-button
link
type="primary"
icon="Edit"
@click="openEditDevice(scope.row)"
>编辑</el-button
>
<el-button link type="primary" icon="Edit" @click="openEditDevice(scope.row)">编辑</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize" @pagination="getList" />
</el-col>
</el-row>
<device-dialog
ref="deviceRef"
:title="title"
:item="currentData"
:currentCategoryEnum="currentCategoryEnum"
:deviceCategories="deviceCategorieList"
:statusFlagOptions="statusFlagOptions"
:supplierListOptions="supplierListOptions"
@submit="getList()"
@ybDialog="() => {
<device-dialog ref="deviceRef" :title="title" :item="currentData" :currentCategoryEnum="currentCategoryEnum"
:deviceCategories="deviceCategorieList" :statusFlagOptions="statusFlagOptions"
:supplierListOptions="supplierListOptions" @submit="getList()" @ybDialog="() => {
proxy.$refs['deviceYbRef'].show()
}"
/>
<DeviceYbDialog
ref="deviceYbRef"
@selectDevice="
(row) => {
proxy.$refs['deviceRef'].setValue(row);
}
"
/>
}" />
<DeviceYbDialog ref="deviceYbRef" @selectDevice="
(row) => {
proxy.$refs['deviceRef'].setValue(row);
}
" />
<!-- 器材目录导入对话框 -->
<el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
<el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<template #tip>
<div class="el-upload__tip text-center">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
@click="importTemplate">下载模板</el-link>
</div>
</template>
</el-upload>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="Device">
import { getToken } from "@/utils/auth";
import {
getDeviceList,
stopDevice,
@@ -455,6 +218,22 @@ const currentData = ref({});
const viewData = ref({});
const currentCategoryEnum = ref("");
/*** 器材目录导入参数 */
const upload = reactive({
// 是否显示弹出层
open: false,
// 弹出层标题
title: "",
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的数据
updateSupport: 0,
// 设置上传的请求头部
headers: { Authorization: "Bearer " + getToken() },
// 上传的地址
url: import.meta.env.VITE_APP_BASE_API + "/data-dictionary/device/import-data"
});
const data = reactive({
form: {},
queryParams: {
@@ -482,7 +261,7 @@ const filterNode = (value, data) => {
function getDiseaseTreatmentList() {
getDiseaseTreatmentInit().then((response) => {
console.log(response, "response器材目录分类查询下拉树结构");
deviceCategories.value = JSON.parse(JSON.stringify(response.data.deviceCategories)).sort((a, b) => {
deviceCategories.value = JSON.parse(JSON.stringify(response.data.deviceCategories)).sort((a, b) => {
return parseInt(a.value) - parseInt(b.value);
});
deviceCategories.value.push({ info: "全部", value: "" });
@@ -530,7 +309,7 @@ function handleStart() {
getList();
proxy.$modal.msgSuccess("启用成功");
})
.catch(() => {});
.catch(() => { });
}
/** 停用按钮操作 */
function handleClose() {
@@ -544,7 +323,7 @@ function handleClose() {
getList();
proxy.$modal.msgSuccess("停用成功");
})
.catch(() => {});
.catch(() => { });
}
/** 导出按钮操作 */
function handleExport() {
@@ -557,6 +336,38 @@ function handleExport() {
);
}
/** 导入按钮操作 */
function handleImport() {
upload.title = '器材目录导入';
upload.open = true;
}
/** 下载模板操作 */
function importTemplate() {
proxy.download('/data-dictionary/device/import-template', {}, `device_template_${new Date().getTime()}.xlsx`);
}
/**文件上传中处理 */
const handleFileUploadProgress = (event, file, fileList) => {
upload.isUploading = true;
};
/** 文件上传成功处理 */
const handleFileSuccess = (response, file, fileList) => {
upload.open = false;
upload.isUploading = false;
proxy.$refs['uploadRef'].handleRemove(file);
proxy.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
response.msg +
'</div>',
'导入结果',
{ dangerouslyUseHTMLString: true }
);
getList();
};
/** 提交上传文件 */
function submitFileForm() {
proxy.$refs['uploadRef'].submit();
}
/** 选择条数 */
function handleSelectionChange(selection) {
console.log(selection, "selection");
@@ -614,7 +425,8 @@ getList();
vertical-align: middle;
margin-right: 10px !important;
}
.el-select{
width: 150px!important;
.el-select {
width: 150px !important;
}
</style>

View File

@@ -36,7 +36,7 @@
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="是否停用" prop="statusEnum">
<el-form-item label="状态" prop="statusEnum">
<el-select v-model="queryParams.statusEnum" style="width: 240px" clearable>
<el-option
v-for="status in statusFlagOptions"

View File

@@ -476,6 +476,24 @@ function handleImport() {
function importTemplate() {
proxy.download('/data-dictionary/medication/import-template', {}, `medication_template_${new Date().getTime()}.xlsx`);
}
/**文件上传中处理 */
const handleFileUploadProgress = (event, file, fileList) => {
upload.isUploading = true;
};
/** 文件上传成功处理 */
const handleFileSuccess = (response, file, fileList) => {
upload.open = false;
upload.isUploading = false;
proxy.$refs['uploadRef'].handleRemove(file);
proxy.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
response.msg +
'</div>',
'导入结果',
{ dangerouslyUseHTMLString: true }
);
getList();
};
/** 提交上传文件 */
function submitFileForm() {
proxy.$refs['uploadRef'].submit();

View File

@@ -92,7 +92,7 @@ export function unprecharge(data) {
*/
export function dispenseMedicalConsumables(data) {
return request({
url: '/pharmacy-manage/medical-consumables-dispense/consumables-dispense',
url: '/pharmacy-manage/device-dispense/consumables-dispense',
method: 'put',
data: data
})

View File

@@ -108,6 +108,7 @@
<el-button type="primary" @click="throttledGetList" :disabled="dialogLoading"
> </el-button
>
<el-button type="primary" @click="print()" :disabled="dialogLoading"> </el-button>
<el-button @click="close" :disabled="dialogLoading"> </el-button>
</div>
</template>
@@ -120,6 +121,8 @@ import { computed, watch, reactive, ref, getCurrentInstance, nextTick } from 'vu
import { Delete } from '@element-plus/icons-vue';
import { debounce } from 'lodash-es';
import useUserStore from '@/store/modules/user';
import { hiprint } from 'vue-plugin-hiprint';
import templateJson from './template.json';
const props = defineProps({
open: {
@@ -159,6 +162,10 @@ const props = defineProps({
type: Object,
default: undefined,
},
chargedItems: {
type: [],
default: [],
},
});
const { proxy } = getCurrentInstance();
@@ -269,29 +276,50 @@ async function printReceipt(param) {
age: props.patientInfo.age,
personType: '职工医保',
fixmedinsName: param.fixmedinsName + '门诊收费明细',
name: props.patientInfo.patientName, // 姓名
gender: props.patientInfo.genderEnum_enumText, // 性别
age: props.patientInfo.age, // 年龄
encounterBusNo: props.patientInfo.encounterBusNo, // 病例号
currentDate: currentDate.value, // 收费日期
chargedItems: props.chargedItems, // 收费项目
totalAmount: props.totalAmount.toFixed(2) + ' 元', // 应收金额
displayAmount: displayAmount.value + ' 元', // 实收金额
returnedAmount: returnedAmount.value + ' 元', // 应找零
},
],
// feeDetial: param.detail, //收费项目,后端还未返回
};
// 将对象转换为 JSON 字符串
let jsonString = JSON.stringify(result, null, 2);
console.log(jsonString, 'jsonString');
await CefSharp.BindObjectAsync('boundAsync');
await boundAsync.printReport(
'门诊收费明细单.grf',
jsonString
)
.then((response) => {
//返回结果是jsonString可判断其调用是否成功
console.log(response, 'response');
var res = JSON.parse(response);
if (!res.IsSuccess) {
proxy.$modal.msgError('调用打印插件失败:' + res.ErrorMessage);
}
})
.catch((error) => {
proxy.$modal.msgError('调用打印插件失败:' + error);
});
console.log(result, '==result.data==');
const printElements = templateJson;
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
const printerList = hiprintTemplate.getPrinterList();
console.log(hiprintTemplate, '打印机列表');
hiprintTemplate.print2(result.data[0], {
printer: 'xp',
title: '门诊收费结算单',
});
// // 将对象转换为 JSON 字符串
// let jsonString = JSON.stringify(result, null, 2);
// console.log(jsonString, 'jsonString');
// await CefSharp.BindObjectAsync('boundAsync');
// await boundAsync.printReport(
// '门诊收费明细单.grf',
// jsonString
// )
// .then((response) => {
// //返回结果是jsonString可判断其调用是否成功
// console.log(response, 'response');
// var res = JSON.parse(response);
// if (!res.IsSuccess) {
// proxy.$modal.msgError('调用打印插件失败:' + res.ErrorMessage);
// }
// })
// .catch((error) => {
// proxy.$modal.msgError('调用打印插件失败:' + error);
// });
}
const throttledGetList = debounce(submit, 300);
@@ -333,13 +361,22 @@ async function submit() {
})
.then((res) => {
if (res.code == 200) {
printReceipt(res.data);
(formData.selfPay = [{ payEnum: 220100, amount: 0.0, payLevelEnum: 2 }]),
emit('close', 'success', res.msg);
// 长春大学自动发耗材
if (userStore.fixmedinsCode == 'H22010200672' && props.consumablesIdList.length > 0) {
dispenseMedicalConsumables(props.consumablesIdList);
}
// // 添加确认窗口
// proxy.$modal
// .confirm('是否打印收费结算单?')
// .then(() => {
// printReceipt(res.data);
// })
// .catch(() => {
// // 用户取消打印
// console.log('用户取消打印');
// });
}
})
.finally(() => {
@@ -347,6 +384,43 @@ async function submit() {
});
}
/** 打印收费结算单 */
async function print() {
console.log('patientInfo', props.patientInfo);
console.log('category', props.category);
console.log('totalAmount', props.totalAmount);
console.log('chargeItemIds', props.chargeItemIds);
console.log('consumablesIdList', props.consumablesIdList);
console.log('userCardInfo', props.userCardInfo);
console.log('paymentId', props.paymentId);
console.log('details', props.details);
console.log('chargedItems', props.chargedItems);
const result = {
data: [
{
name: props.patientInfo.patientName, // 姓名
gender: props.patientInfo.genderEnum_enumText, // 性别
age: props.patientInfo.age, // 年龄
encounterBusNo: props.patientInfo.encounterBusNo, // 病例号
currentDate: currentDate.value, // 收费日期
chargedItems: props.chargedItems, // 收费项目
totalAmount: props.totalAmount.toFixed(2) + ' 元', // 应收金额
displayAmount: displayAmount.value + ' 元', // 实收金额
returnedAmount: returnedAmount.value + ' 元', // 应找零
},
],
};
console.log(result, '==result.data==');
const printElements = templateJson;
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
const printerList = hiprintTemplate.getPrinterList();
console.log(hiprintTemplate, '打印机列表');
hiprintTemplate.print2(result.data[0], {
title: '门诊收费结算单',
});
}
const currentDate = ref(new Date().toLocaleString());
const selfPayMethods = [

View File

@@ -0,0 +1,451 @@
{
"panels": [
{
"index": 0,
"name": 1,
"paperType": "自定义",
"height": 200,
"width": 80,
"paperNumberContinue": true,
"overPrintOptions": {
"content": "",
"opacity": 0.7,
"type": 1
},
"watermarkOptions": {
"content": "",
"fillStyle": "rgba(184, 184, 184, 0.3)",
"fontSize": "36px",
"rotate": 25,
"width": 413,
"height": 310,
"timestamp": false,
"format": "YYYY-MM-DD HH:mm"
},
"panelLayoutOptions": {
"layoutType": "column",
"layoutRowGap": 0,
"layoutColumnGap": 0
},
"paperHeader": 0,
"paperFooter": 841.8897637795277,
"printElements": [
{
"options": {
"left": 55.5,
"top": 24,
"height": 16.5,
"width": 120,
"title": "长大医院门诊收费结算单",
"coordinateSync": false,
"widthHeightSync": false,
"fontWeight": "bold",
"letterSpacing": 0.75,
"textAlign": "center",
"qrCodeLevel": 0,
"fontSize": 10
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 142.5,
"top": 45,
"height": 80,
"width": 70,
"textAlign": "center",
"title": "院内门诊号",
"qrCodeLevel": 0,
"coordinateSync": false,
"widthHeightSync": false,
"field": "encounterBusNo"
},
"printElementType": {
"title": "二维码",
"type": "qrcode"
}
},
{
"options": {
"left": 15,
"top": 55.5,
"height": 14,
"width": 80,
"title": "姓名",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "name"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 78,
"height": 14,
"width": 60,
"title": "性别",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "gender"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 75,
"top": 78,
"height": 14,
"width": 60,
"title": "年龄",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "age"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 105,
"height": 14,
"width": 120,
"title": "病人类型",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "medType"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 127.5,
"height": 14,
"width": 120,
"title": "病历号",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "encounterBusNo"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 157,
"height": 37.5,
"width": 200,
"title": "undefined+beforeDragIn",
"field": "chargedItems",
"coordinateSync": false,
"widthHeightSync": false,
"textAlign": "center",
"tableBodyRowBorder": "border",
"tableBodyCellBorder": "border",
"columns": [
[
{
"title": "收费名称",
"titleSync": false,
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 70.07165247626199,
"field": "itemName",
"checked": true,
"columnId": "itemName",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "数量",
"titleSync": false,
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 38.66458945433993,
"field": "quantityValue",
"checked": true,
"columnId": "quantityValue",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "金额",
"titleSync": false,
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 50.90935931687881,
"field": "totalPrice",
"checked": true,
"columnId": "totalPrice",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "费用性质",
"titleSync": false,
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 40.354398752519245,
"field": "contractName",
"checked": true,
"columnId": "contractName",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "收费名称",
"titleSync": false,
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 56.86712269302148,
"field": "chargeItem",
"checked": false,
"columnId": "chargeItem",
"fixed": false,
"rowspan": 1,
"colspan": 1
}
]
]
},
"printElementType": {
"title": "表格",
"type": "table",
"editable": true,
"columnDisplayEditable": true,
"columnDisplayIndexEditable": true,
"columnTitleEditable": true,
"columnResizable": true,
"columnAlignEditable": true,
"isEnableEditField": true,
"isEnableContextMenu": true,
"isEnableInsertRow": true,
"isEnableDeleteRow": true,
"isEnableInsertColumn": true,
"isEnableDeleteColumn": true,
"isEnableMergeCell": true
}
},
{
"options": {
"left": 15,
"top": 225,
"height": 14,
"width": 180,
"title": "个人现金支付金额",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "SELF_CASH_PAY"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 250,
"height": 14,
"width": 180,
"title": "个人负担总金额",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "SELF_PAY"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 275,
"height": 14,
"width": 180,
"title": "基金支付总额",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "YB_FUND_PAY"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 13.5,
"top": 300,
"height": 14,
"width": 180,
"title": "基本医保统筹基金支出",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "YB_TC_FUND_AMOUNT"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 325,
"height": 14,
"width": 180,
"title": "个人医保账户支付",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "SELF_YB_ZH_PAY"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 349.5,
"height": 14,
"width": 180,
"title": "全自费金额",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "FULAMT_OWNPAY_AMT"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 375,
"height": 14,
"width": 180,
"title": "应收金额",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "totalAmount"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 400,
"height": 14,
"width": 180,
"title": "实收金额",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "displayAmount"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 425,
"height": 14,
"width": 180,
"title": "应找零",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "returnedAmount"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 450,
"height": 14,
"width": 100,
"title": "收费员",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 475,
"height": 14,
"width": 170,
"title": "收费时间",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"field": "currentDate"
},
"printElementType": {
"title": "文本",
"type": "text"
}
}
]
}
]
}

View File

@@ -1,62 +1,31 @@
<template>
<div
style="display: flex; justify-content: space-between"
class="app-container"
v-loading="readCardLoading"
:element-loading-text="loadingText"
>
<div style="display: flex; justify-content: space-between" class="app-container" v-loading="readCardLoading"
:element-loading-text="loadingText">
<el-card style="width: 30%">
<template #header>
<span style="vertical-align: middle">患者列表</span>
</template>
<div style="width: 100%">
<el-input
v-model="queryParams.searchKey"
placeholder="请输入患者名/病历号"
clearable
style="width: 48%; margin-bottom: 10px; margin-right: 10px"
@keyup.enter="getPatientList"
>
<el-input v-model="queryParams.searchKey" placeholder="请输入患者名/病历号" clearable
style="width: 48%; margin-bottom: 10px; margin-right: 10px" @keyup.enter="getPatientList">
<template #append>
<el-button icon="Search" @click="getPatientList" />
</template>
</el-input>
<el-select
v-model="queryParams.statusEnum"
style="width: 48%; margin-bottom: 10px; margin-right: 10px"
placeholder="收费状态"
@change="getPatientList"
>
<el-option
v-for="item in chargeStatusOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-select v-model="queryParams.statusEnum" style="width: 48%; margin-bottom: 10px; margin-right: 10px"
placeholder="收费状态" @change="getPatientList">
<el-option v-for="item in chargeStatusOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<div style="width: 100%">
<el-date-picker
v-model="receptionTime"
type="daterange"
range-separator="~"
start-placeholder="开始时间"
end-placeholder="结束时间"
placement="bottom"
value-format="YYYY-MM-DD"
style="width: 84%; margin-bottom: 10px; margin-right: 10px"
/>
<el-date-picker v-model="receptionTime" type="daterange" range-separator="~" start-placeholder="开始时间"
end-placeholder="结束时间" placement="bottom" value-format="YYYY-MM-DD"
style="width: 84%; margin-bottom: 10px; margin-right: 10px" @change="getPatientList"/>
<el-button type="primary" style="margin-bottom: 10px" @click="getPatientList">
搜索
</el-button>
</div>
<el-table
ref="patientListRef"
height="620"
:data="patientList"
row-key="encounterId"
@cell-click="clickRow"
highlight-current-row
>
<el-table ref="patientListRef" height="620" :data="patientList" row-key="encounterId" @cell-click="clickRow"
highlight-current-row>
<el-table-column label="病历号" align="center" prop="encounterBusNo" />
<el-table-column label="姓名" align="center" prop="patientName" />
<!-- <el-table-column label="时间" align="center" prop="receptionTime" width="160">
@@ -73,15 +42,15 @@
<template #header>
<span style="vertical-align: middle">基本信息</span>
</template>
<el-descriptions :column="4">
<el-descriptions :column="5">
<el-descriptions-item label="姓名:">{{ patientInfo.patientName }}</el-descriptions-item>
<el-descriptions-item label="性别:">
{{ patientInfo.genderEnum_enumText }}
</el-descriptions-item>
<el-descriptions-item label="年龄:">{{ patientInfo.age }}</el-descriptions-item>
<el-descriptions-item label="合同类型:">
{{ patientInfo.categoryEnum_enumText }}
</el-descriptions-item>
<el-descriptions-item label="科室:">{{ patientInfo.organizationName }}</el-descriptions-item>
<el-descriptions-item label="就诊时间:">{{ formatDateStr(patientInfo.receptionTime, "YYYY-MM-DD HH:mm:ss")
}}</el-descriptions-item>
<!-- <el-descriptions-item label="身份证号:">{{ patientInfo.idCard }}</el-descriptions-item> -->
<!-- <el-descriptions-item label="手机号">{{ patientInfo.name }}</el-descriptions-item>
<el-descriptions-item label="出生日期">{{ patientInfo.name }}</el-descriptions-item> -->
@@ -98,47 +67,23 @@
<el-button type="primary" plain @click="handleReadCard('01')" style="width: 65px">
电子凭证
</el-button>
<el-button
type="primary"
plain
@click="handleReadCard('02')"
style="width: 65px"
:disabled="true"
>
<el-button type="primary" plain @click="handleReadCard('02')" style="width: 65px" :disabled="true">
身份证
</el-button>
<el-button type="primary" plain @click="handleReadCard('03')" style="width: 65px">
医保卡
</el-button>
<el-button
type="primary"
@click="payToSelt()"
style="margin-left: 20px"
:disabled="buttonDisabled"
>
<el-button type="primary" @click="payToSelt()" style="margin-left: 20px" :disabled="buttonDisabled">
医保转自费
</el-button>
<el-button
type="primary"
@click="patToMedicalInsurance()"
style="margin-left: 20px"
:disabled="buttonDisabled"
>
<el-button type="primary" @click="patToMedicalInsurance()" style="margin-left: 20px"
:disabled="buttonDisabled">
自费转医保
</el-button>
<span style="float: right"
>合计金额{{ totalAmounts ? totalAmounts.toFixed(2) : 0 }}</span
>
<span style="float: right">合计金额{{ totalAmounts ? totalAmounts.toFixed(2) : 0 }}</span>
</div>
<el-table
ref="chargeListRef"
height="530"
:data="chargeList"
row-key="id"
@selection-change="handleSelectionChange"
v-loading="chargeLoading"
border
>
<el-table ref="chargeListRef" height="530" :data="chargeList" row-key="id"
@selection-change="handleSelectionChange" v-loading="chargeLoading" border>
<el-table-column type="selection" :selectable="checkSelectable" width="55" />
<el-table-column label="单据号" align="center" prop="busNo" width="180" />
<el-table-column label="收费项目" align="center" prop="itemName" width="200" />
@@ -148,10 +93,7 @@
<el-table-column label="费用性质" align="center" prop="contractName" />
<el-table-column label="收费状态" align="center" prop="statusEnum_enumText" width="150">
<template #default="scope">
<el-tag
:type="scope.row.statusEnum === 1 ? 'default' : 'success'"
disable-transitions
>
<el-tag :type="scope.row.statusEnum === 1 ? 'default' : 'success'" disable-transitions>
{{ scope.row.statusEnum_enumText }}
</el-tag>
</template>
@@ -177,6 +119,7 @@
:userCardInfo="userCardInfo"
:paymentId="paymentId"
:details="details"
:chargedItems="chargedItems"
/>
</div>
</template>
@@ -224,6 +167,7 @@ const receptionTime = ref([
const buttonDisabled = computed(() => {
return Object.keys(patientInfo.value).length === 0;
});
const chargedItems = ref([]);
watch(
() => selectedRows.value,
@@ -305,6 +249,7 @@ const consumablesIdList = ref([]);
// 确认收费
function confirmCharge() {
let selectRows = chargeListRef.value.getSelectionRows();
console.log('selectRows:',selectRows);
if (selectRows.length == 0) {
proxy.$modal.msgWarning('请选择一条收费项目');
return;
@@ -319,6 +264,7 @@ function confirmCharge() {
.map((item) => {
return item.id;
});
chargedItems.value = selectRows;
// totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
// return accumulator + (currentRow.totalPrice || 0);
@@ -410,14 +356,14 @@ async function handleReadCard(value) {
readCardLoading.value = true;
loadingText.value = '正在读取...';
await invokeYbPlugin(
JSON.stringify({
FunctionId: 1,
IP: 'ddjk.jlhs.gov.cn',
PORT: 20215,
TIMEOUT: 60,
SFZ_DRIVER_TYPE: 1,
})
)
JSON.stringify({
FunctionId: 1,
IP: 'ddjk.jlhs.gov.cn',
PORT: 20215,
TIMEOUT: 60,
SFZ_DRIVER_TYPE: 1,
})
)
.then((res) => {
jsonResult = JSON.stringify(res.data);
})
@@ -531,5 +477,4 @@ function patToMedicalInsurance() {
});
}
</script>
<style scoped>
</style>
<style scoped></style>

View File

@@ -72,7 +72,8 @@
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"qrCodeLevel": 0
"qrCodeLevel": 0,
"field": "timeRange"
},
"printElementType": {
"title": "文本",
@@ -85,7 +86,7 @@
"top": 58.5,
"height": 13.5,
"width": 145.5,
"title": "机构名称:长春大学医院",
"title": "机构名称:医院",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
@@ -1369,10 +1370,90 @@
"type": "text"
}
},
{
"options": {
"left": 19,
"top": 368.5,
"height": 13.5,
"width": 76.5,
"title": "省医保总额",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"qrCodeLevel": 0,
"field": "1"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 81.5,
"top": 369.5,
"height": 13.5,
"width": 75,
"title": "文本",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"qrCodeLevel": 0,
"field": "provinceYbTotal",
"textAlign": "right",
"testData": "20000.00",
"hideTitle": true,
"formatter": "function(title,value,options,templateData,target,paperNo){\n return value ? value.toFixed(2) + ' 元' : '0.00' + ' 元'\n}"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 164,
"top": 369.5,
"height": 13.5,
"width": 64.5,
"title": "市医保总额",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"qrCodeLevel": 0,
"field": "1"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 220.5,
"top": 370.5,
"height": 13.5,
"width": 75,
"title": "文本",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"qrCodeLevel": 0,
"field": "municipalYbTotal",
"textAlign": "right",
"testData": "20000.00",
"hideTitle": true,
"formatter": "function(title,value,options,templateData,target,paperNo){\n return value ? value.toFixed(2) + ' 元' : '0.00' + ' 元'\n}"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 369,
"top": 397.5,
"height": 9,
"width": 567,
"borderWidth": "1.5",
@@ -1387,7 +1468,7 @@
{
"options": {
"left": 162,
"top": 382.5,
"top": 411,
"height": 13.5,
"width": 76.5,
"title": "制表人",
@@ -1405,7 +1486,7 @@
{
"options": {
"left": 216,
"top": 382.5,
"top": 411,
"height": 13.5,
"width": 75,
"title": "文本",
@@ -1425,8 +1506,8 @@
},
{
"options": {
"left": 298.5,
"top": 382.5,
"left": 333,
"top": 411,
"height": 13.5,
"width": 76.5,
"title": "制表时间",
@@ -1443,10 +1524,10 @@
},
{
"options": {
"left": 370.5,
"top": 382.5,
"left": 390,
"top": 411,
"height": 13.5,
"width": 148.5,
"width": 129,
"title": "文本",
"coordinateSync": false,
"widthHeightSync": false,

View File

@@ -357,7 +357,7 @@ async function print() {
...reportValue.value, // 将 reportValue.value 中的所有属性展开到 result 中
nickName: userStore.nickName,
orgName: userStore.orgName,
fixmedinsName: '长春大学医院',
fixmedinsName: '医院',
queryTime: queryTime.value[0] + '~' + queryTime.value[1],
zfAmount: new Decimal(reportValue.value.zhSum || 0).add(reportValue.value.fundSum || 0),
feeAmount: new Decimal(reportValue.value.DIAGNOSTIC_FEE || 0)

View File

@@ -92,7 +92,7 @@
</el-col>
<el-col :span="5">
<span class="label">机构</span>
<span class="value">{{ '长春大学医院' }}</span>
<span class="value">{{ '医院' }}</span>
</el-col>
<el-col :span="7">
<span class="label">时间</span>
@@ -155,15 +155,15 @@
</el-col> -->
<el-col :span="5">
<span class="label">微信</span>
<span class="value">{{ formatValue(reportValue.vxCashSum) }}</span>
<span class="value">{{ formatValue(reportValue['0000cash']) }}</span>
</el-col>
<el-col :span="5">
<span class="label">支付宝</span>
<span class="value">{{ formatValue(reportValue.aliCashSum) }}</span>
<span class="value">{{ '0.00 元' }}</span>
</el-col>
<el-col :span="5">
<span class="label">网银</span>
<span class="value">{{ formatValue(reportValue.aliCashSum) }}</span>
<span class="value">{{ '0.00 元' }}</span>
</el-col>
</el-row>
<!-- <el-row
@@ -301,11 +301,15 @@
>
<el-col :span="5">
<span class="label">省医保总额</span>
<span class="value">{{ formatValue((reportValue['229900cash'] || 0 + reportValue['229900tcSum'] || 0 + reportValue['229900zhSum'] || 0 + reportValue['229900fundSum'] || 0)) }}</span>
<span class="value">{{
formatValue((reportValue['229900fundSum'] || 0) + (reportValue['229900zhSum'] || 0))
}}</span>
</el-col>
<el-col :span="5">
<span class="label">医保总额</span>
<span class="value">{{ formatValue((reportValue['220100cash'] || 0 + reportValue['220100tcSum'] || 0 + reportValue['220100zhSum'] || 0 + reportValue['220100fundSum'] || 0)) }}</span>
<span class="label">医保总额</span>
<span class="value">{{
formatValue((reportValue['220100fundSum'] || 0) + (reportValue['220100zhSum'] || 0))
}}</span>
</el-col>
</el-row>
</div>
@@ -407,10 +411,10 @@ async function print() {
...reportValue.value, // 将 reportValue.value 中的所有属性展开到 result 中
nickName: userStore.nickName,
orgName: userStore.orgName,
fixmedinsName: '长春大学医院',
fixmedinsName: '医院',
createTime: formatDateStr(new Date(), 'YYYY-MM-DD HH:mm:ss'),
scheduler: userStore.nickName,
queryTime: queryTime.value[0] + '~' + queryTime.value[1],
timeRange: queryTime.value[0] + '~' + queryTime.value[1],
zfAmount: new Decimal(reportValue.value.zhSum || 0).add(reportValue.value.fundSum || 0),
feeAmount: new Decimal(reportValue.value.DIAGNOSTIC_FEE || 0)
.add(reportValue.value.CHECK_FEE || 0)
@@ -423,6 +427,10 @@ async function print() {
.add(reportValue.value.REGISTRATION_FEE || 0)
.add(reportValue.value.OTHER_FEE || 0)
.add(reportValue.value.SANITARY_MATERIALS_FEE || 0),
provinceYbTotal:
(reportValue.value['229900zhSum'] || 0) + (reportValue.value['229900fundSum'] || 0),
municipalYbTotal:
(reportValue.value['220100zhSum'] || 0) + (reportValue.value['220100fundSum'] || 0),
},
],
};
@@ -466,7 +474,7 @@ function getPrintFileName(value) {
}
function formatValue(value) {
return value == null || value == undefined || value == NaN ? '0.00 元' : value.toFixed(2) + ' 元';
return value == null || value == undefined || value == NaN ? '0.00 元' : value.toFixed(2) + ' 元';
}
</script>
<style scoped>

View File

@@ -74,3 +74,19 @@ export function getPerformRecord(params) {
params: params
})
}
export function listWesternmedicine(query) {
return request({
url: '/pharmacy-manage/western-medicine-dispense/prescription-list',
method: 'get',
params: query
})
}
export function printBloodCode(query) {
return request({
url: '/outpatient-manage/treatment/blood-transfusion-patch',
method: 'get',
params: query
})
}

View File

@@ -0,0 +1,159 @@
{
"panels": [
{
"index": 0,
"name": 1,
"paperType": "自定义",
"height": 30,
"width": 50,
"paperNumberDisabled": true,
"paperNumberContinue": true,
"overPrintOptions": {
"content": "",
"opacity": 0.7,
"type": 1
},
"watermarkOptions": {
"content": "",
"fillStyle": "rgba(184, 184, 184, 0.3)",
"fontSize": "14px",
"rotate": 25,
"width": 200,
"height": 200,
"timestamp": false,
"format": "YYYY-MM-DD HH:mm"
},
"panelLayoutOptions": {},
"paperHeader": 0,
"paperFooter": 841.8897637795277,
"printElements": [
{
"options": {
"left": 7.5,
"top": 4.5,
"height": 9.75,
"width": 61.5,
"title": "文本+beforeDragIn",
"field": "patientName",
"coordinateSync": false,
"widthHeightSync": false,
"hideTitle": true,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 76.5,
"top": 4.5,
"height": 9.75,
"width": 27,
"title": "文本+beforeDragIn",
"field": "age",
"coordinateSync": false,
"widthHeightSync": false,
"hideTitle": true,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 111,
"top": 4.5,
"height": 9.75,
"width": 25.5,
"title": "文本+beforeDragIn",
"field": "genderEnum_enumText",
"coordinateSync": false,
"widthHeightSync": false,
"hideTitle": true,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 7.5,
"top": 16.5,
"height": 9.75,
"width": 129,
"title": "文本+beforeDragIn",
"field": "activityName",
"coordinateSync": false,
"widthHeightSync": false,
"hideTitle": true,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 7.5,
"top": 30,
"height": 9.75,
"width": 58.5,
"title": "文本+beforeDragIn",
"field": "orgName",
"coordinateSync": false,
"widthHeightSync": false,
"hideTitle": true,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 72,
"top": 30,
"height": 9.75,
"width": 63,
"title": "文本+beforeDragIn",
"field": "practitionerName",
"coordinateSync": false,
"widthHeightSync": false,
"hideTitle": true,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 15,
"top": 42,
"height": 33,
"width": 111,
"textType": "barcode",
"title": "1",
"field": "busNo",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "barcode",
"type": "text"
}
}
]
}
]
}

View File

@@ -0,0 +1,334 @@
{
"panels": [
{
"index": 0,
"name": 1,
"paperType": "A5",
"height": 210,
"width": 148,
"paperNumberDisabled": true,
"paperNumberContinue": true,
"overPrintOptions": {
"content": "",
"opacity": 0.7,
"type": 1
},
"watermarkOptions": {
"content": "",
"fillStyle": "rgba(184, 184, 184, 0.3)",
"fontSize": "14px",
"rotate": 25,
"width": 200,
"height": 200,
"timestamp": false,
"format": "YYYY-MM-DD HH:mm"
},
"panelLayoutOptions": {},
"paperHeader": 0,
"paperFooter": 841.8897637795277,
"printElements": [
{
"options": {
"left": 169.5,
"top": 22.5,
"height": 12,
"width": 88.5,
"title": "医院",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 13.5,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 189,
"top": 45,
"height": 9.75,
"width": 42,
"title": "处置单",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 11.25,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 22.5,
"top": 67.5,
"height": 9.75,
"width": 120,
"title": "姓名",
"field": "patientName",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 157.5,
"top": 67.5,
"height": 9.75,
"width": 120,
"title": "年龄",
"field": "age",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 300,
"top": 67.5,
"height": 9.75,
"width": 120,
"title": "性别",
"field": "genderEnum_enumText",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 22.5,
"top": 94.5,
"height": 9.75,
"width": 96,
"title": "科室",
"field": "departmentName",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 156,
"top": 94.5,
"height": 9.75,
"width": 118.5,
"title": "费用性质",
"field": "contractName",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 300,
"top": 94.5,
"height": 9.75,
"width": 120,
"title": "日期",
"field": "reqTime",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 22.5,
"top": 121.5,
"height": 9.75,
"width": 123,
"title": "门诊号",
"field": "encounterNo",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 156,
"top": 121.5,
"height": 9.75,
"width": 120,
"title": "开单医生",
"field": "doctorName",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 18,
"top": 141,
"height": 9,
"width": 393,
"borderWidth": "1.5",
"title": "undefined+beforeDragIn",
"coordinateSync": false,
"widthHeightSync": false
},
"printElementType": {
"title": "横线",
"type": "hline"
}
},
{
"options": {
"left": 22.5,
"top": 156,
"height": 9.75,
"width": 24,
"title": "Rp",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 12,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 22.5,
"top": 177,
"height": 36,
"width": 387,
"title": "undefined+beforeDragIn",
"coordinateSync": false,
"widthHeightSync": false,
"field": "adviceItemList",
"columns": [
[
{
"title": "项目名",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 180.11284430829235,
"field": "itemName",
"checked": true,
"columnId": "itemName",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "单价",
"titleSync": false,
"align": "right",
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"formatter2": "function(value,row,index,options,rowIndex,column){ return value + ' 元'; }",
"width": 65.15543233883191,
"field": "unitPrice",
"checked": true,
"columnId": "unitPrice",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "数量",
"titleSync": false,
"align": "right",
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"formatter2": "function(value,row,index,options,rowIndex,column){ return value + ' ' + row.unitCode_dictText; }",
"width": 61.720533008519084,
"field": "quantity",
"checked": true,
"columnId": "quantity",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "执行次数",
"titleSync": false,
"align": "right",
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 80.01119034435662,
"field": "quantity",
"checked": true,
"columnId": "quantity",
"fixed": false,
"rowspan": 1,
"colspan": 1
}
]
]
},
"printElementType": {
"title": "表格",
"type": "table",
"editable": true,
"columnDisplayEditable": true,
"columnDisplayIndexEditable": true,
"columnTitleEditable": true,
"columnResizable": true,
"columnAlignEditable": true,
"isEnableEditField": true,
"isEnableContextMenu": true,
"isEnableInsertRow": true,
"isEnableDeleteRow": true,
"isEnableInsertColumn": true,
"isEnableDeleteColumn": true,
"isEnableMergeCell": true
}
}
]
}
]
}

View File

@@ -0,0 +1,640 @@
{
"panels": [
{
"index": 1,
"name": 2,
"paperType": "A5",
"height": 210,
"width": 148,
"paperNumberDisabled": true,
"paperNumberContinue": true,
"overPrintOptions": {
"content": "",
"opacity": 0.7,
"type": 1
},
"watermarkOptions": {
"content": "",
"fillStyle": "rgba(184, 184, 184, 0.3)",
"fontSize": "14px",
"rotate": 25,
"width": 200,
"height": 200,
"timestamp": false,
"format": "YYYY-MM-DD HH:mm"
},
"panelLayoutOptions": {
"layoutType": "column",
"layoutRowGap": 0,
"layoutColumnGap": 0
},
"paperHeader": 6,
"paperFooter": 595.2755905511812,
"printElements": [
{
"options": {
"left": 150,
"top": 16.5,
"height": 22.5,
"width": 120,
"title": "医院",
"coordinateSync": false,
"widthHeightSync": false,
"fontFamily": "Microsoft YaHei",
"fontSize": 18,
"textAlign": "center",
"textContentVerticalAlign": "middle",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 187.5,
"top": 54,
"height": 10.5,
"width": 43.5,
"title": "处方签",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 13.5,
"textAlign": "justify",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 34.5,
"top": 76.5,
"height": 12,
"width": 171,
"title": "医保编号:",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 252,
"top": 76.5,
"height": 10.5,
"width": 163.5,
"title": "就诊类型:",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 252,
"top": 93,
"height": 12,
"width": 163.5,
"title": "费用性质",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "contractName"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 34.5,
"top": 94.5,
"height": 12,
"width": 171,
"title": "处方编号",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "prescriptionNo"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 28.5,
"top": 112.5,
"height": 9,
"width": 387,
"borderWidth": "1.5",
"coordinateSync": false,
"widthHeightSync": false
},
"printElementType": {
"title": "横线",
"type": "hline"
}
},
{
"options": {
"left": 195,
"top": 121.5,
"height": 12,
"width": 63,
"title": "性别",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "genderEnum_enumText"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 294,
"top": 121.5,
"height": 12,
"width": 79.5,
"title": "年龄",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "age"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 36,
"top": 123,
"height": 12,
"width": 133.5,
"title": "姓名",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "patientName"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 36,
"top": 141,
"height": 12,
"width": 192,
"title": "门诊号",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "encounterNo"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 295.5,
"top": 142.5,
"height": 12,
"width": 124.5,
"title": "科室",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "departmentName"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 36,
"top": 160.5,
"height": 12,
"width": 384,
"title": "临床诊断",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "conditionName"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 36,
"top": 178.5,
"height": 12,
"width": 124.5,
"title": "电话",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "phone"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 228,
"top": 178.5,
"height": 12,
"width": 189,
"title": "开具日期",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "reqTime"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 30,
"top": 195,
"height": 9,
"width": 387,
"borderWidth": "1.5",
"coordinateSync": false,
"widthHeightSync": false
},
"printElementType": {
"title": "横线",
"type": "hline"
}
},
{
"options": {
"left": 30,
"top": 201,
"height": 13.5,
"width": 19.5,
"title": "Rp",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"fontWeight": "500",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 25.5,
"top": 225,
"height": 229.5,
"width": 381,
"field": "prescriptionList",
"coordinateSync": false,
"widthHeightSync": false,
"tableBorder": "noBorder",
"tableHeaderBorder": "noBorder",
"tableHeaderCellBorder": "noBorder",
"tableHeaderBackground": "#ffffff",
"tableBodyRowBorder": "noBorder",
"tableBodyCellBorder": "noBorder",
"tableFooterBorder": "noBorder",
"tableFooterCellBorder": "noBorder",
"lHeight": 180,
"groupFieldsFormatter": "function(type,options,data){ return ['medicineName'] }",
"tableBodyRowHeight": 15,
"columns": [
[
{
"title": "组别",
"titleSync": false,
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 39.000229209979196,
"field": "group",
"checked": true,
"columnId": "group",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "名称",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>' + '用法用量'; }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 108.73814856163877,
"field": "itemName",
"checked": true,
"columnId": "itemName",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "规格",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>'+ '每次:' + row.dose + row.doseUnitCode_dictText + ' ' + row.methodCode_dictText; }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 69.3034805684682,
"field": "totalVolume",
"checked": true,
"columnId": "totalVolume",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "单价",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>' + '' }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 33.26994450894975,
"field": "unitPrice",
"checked": true,
"columnId": "unitPrice",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "数量",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + row.unitCode_dictText + '<br/>' + '' }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 44.36950563405129,
"field": "quantity",
"checked": true,
"columnId": "quantity",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "金额",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>' + '' }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 41.19436702834297,
"field": "totalPrice",
"checked": true,
"columnId": "totalPrice",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "等级",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>' + row.rateCode_dictText }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 45.1243244885698,
"field": "contractName",
"checked": true,
"columnId": "contractName",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "名称",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>' + '用法用量'; }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 108.73814856163877,
"field": "medicineName",
"checked": false,
"columnId": "medicineName",
"fixed": false,
"rowspan": 1,
"colspan": 1
}
]
]
},
"printElementType": {
"title": "表格",
"type": "table",
"editable": true,
"columnDisplayEditable": true,
"columnDisplayIndexEditable": true,
"columnTitleEditable": true,
"columnResizable": true,
"columnAlignEditable": true,
"isEnableEditField": true,
"isEnableContextMenu": true,
"isEnableInsertRow": true,
"isEnableDeleteRow": true,
"isEnableInsertColumn": true,
"isEnableDeleteColumn": true,
"isEnableMergeCell": true
}
},
{
"options": {
"left": 30,
"top": 520.5,
"height": 12,
"width": 79.5,
"title": "医师",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "doctor"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 126,
"top": 520.5,
"height": 12,
"width": 79.5,
"title": "发药:高艳敏",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 228,
"top": 520.5,
"height": 12,
"width": 79.5,
"title": "划价:张思怡",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 324,
"top": 520.5,
"height": 12,
"width": 79.5,
"title": "调配:宋丹丹",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 30,
"top": 540,
"height": 9,
"width": 387,
"borderWidth": "1.5",
"coordinateSync": false,
"widthHeightSync": false
},
"printElementType": {
"title": "横线",
"type": "hline"
}
},
{
"options": {
"left": 30,
"top": 547.5,
"height": 9.75,
"width": 120,
"title": "注1.本处方当日作废"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 300,
"top": 553.5,
"height": 9.75,
"width": 120,
"title": "总金额",
"field": "medTotalAmount",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 48,
"top": 567,
"height": 9.75,
"width": 120,
"title": "2.延长处方用量时间原因"
},
"printElementType": {
"title": "文本",
"type": "text"
}
}
]
}
]
}

View File

@@ -0,0 +1,293 @@
{
"panels": [
{
"index": 1,
"name": 2,
"paperType": "自定义",
"height": 50,
"width": 70,
"paperHeader": 0,
"paperFooter": 141.73228346456693,
"printElements": [
{
"options": {
"left": 97.5,
"top": 9,
"height": 9.75,
"width": 33,
"title": "文本",
"field": "genderEnum_enumText",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"hideTitle": true
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 6,
"top": 9,
"height": 9.75,
"width": 51,
"title": "文本",
"field": "patientName",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"hideTitle": true
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 154.5,
"top": 9,
"height": 9.75,
"width": 45,
"title": "文本",
"field": "age",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"hideTitle": true
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 129,
"top": 25.5,
"height": 9.75,
"width": 70.5,
"title": "文本",
"field": "date",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"hideTitle": true
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 6,
"top": 25.5,
"height": 9.75,
"width": 81,
"title": "频次",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 4.5,
"top": 42,
"height": 18,
"width": 9,
"title": "undefined+beforeDragIn"
},
"printElementType": {
"title": "竖线",
"type": "vline"
}
},
{
"options": {
"left": 192,
"top": 42,
"height": 18,
"width": 9,
"title": "undefined+beforeDragIn"
},
"printElementType": {
"title": "竖线",
"type": "vline"
}
},
{
"options": {
"left": 4.5,
"top": 42,
"height": 9,
"width": 187.5,
"borderWidth": 0.75,
"title": "undefined+beforeDragIn"
},
"printElementType": {
"title": "横线",
"type": "hline"
}
},
{
"options": {
"left": 39,
"top": 46.5,
"height": 9.75,
"width": 46.5,
"title": "药名",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 132,
"top": 46.5,
"height": 9.75,
"width": 33,
"title": "规格",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 4.5,
"top": 60,
"height": 36,
"width": 189,
"title": "undefined+beforeDragIn",
"field": "infuseData",
"coordinateSync": false,
"widthHeightSync": false,
"tableHeaderBackground": "#ffffff",
"tableBodyCellBorder": "noBorder",
"rowsColumnsMerge": "function(data, col, colIndex, rowIndex, tableData, printData){ \n // 合并前三列 (columnIndex 0-2)\n if (colIndex >= 0 && colIndex <= 2) {\n // 第一列显示合并后的单元格\n if (colIndex === 0) {\n return [1, 3]; // rowspan=1, colspan=3\n } \n // 其他两列不显示(被合并)\n else {\n return [0, 0]; // rowspan=0, colspan=0\n }\n }\n // 其他列正常显示\n return [1, 1]; // rowspan=1, colspan=1\n}",
"tableBodyRowBorder": "topBottomBorder",
"columns": [
[
{
"title": "用法",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 45.48982644423766,
"field": "data",
"checked": true,
"columnId": "data",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "剂量",
"titleSync": false,
"align": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 47.79422504530706,
"checked": true,
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "速度",
"titleSync": false,
"align": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 48.74985321589121,
"checked": true,
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "数量",
"titleSync": false,
"align": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"formatter2": "function(value,row,index,options,rowIndex,column){ return value + ' ' + row.unitCode_dictText; }",
"width": 46.96609529456407,
"field": "quantity",
"checked": true,
"columnId": "quantity",
"fixed": false,
"rowspan": 1,
"colspan": 1
}
]
]
},
"printElementType": {
"title": "表格",
"type": "table",
"editable": true,
"columnDisplayEditable": true,
"columnDisplayIndexEditable": true,
"columnTitleEditable": true,
"columnResizable": true,
"columnAlignEditable": true,
"isEnableEditField": true,
"isEnableContextMenu": true,
"isEnableInsertRow": true,
"isEnableDeleteRow": true,
"isEnableInsertColumn": true,
"isEnableDeleteColumn": true,
"isEnableMergeCell": true
}
}
],
"paperNumberLeft": 151.5,
"paperNumberTop": 91,
"paperNumberDisabled": true,
"paperNumberContinue": true,
"overPrintOptions": {
"content": "",
"opacity": 0.7,
"type": 1
},
"watermarkOptions": {
"content": "",
"fillStyle": "rgba(184, 184, 184, 0.3)",
"fontSize": "14px",
"rotate": 25,
"width": 200,
"height": 200,
"timestamp": false,
"format": "YYYY-MM-DD HH:mm"
},
"panelLayoutOptions": {
"layoutType": "column",
"layoutRowGap": 0,
"layoutColumnGap": 0
}
}
]
}

View File

@@ -12,7 +12,27 @@
</div>
<div class="search-area">
<el-input v-model="patientSearch" placeholder="搜索患者" clearable class="search-input" />
<el-input
v-model="queryParams.searchKey"
style="width: 45%; margin-bottom: 10px"
placeholder="搜索患者"
clearable
class="search-input"
@keydown.enter="getPatientList"
>
<template #append>
<el-button icon="Search" @click="getPatientList" />
</template>
</el-input>
<el-date-picker
v-model="receptionTime"
@change="getPatientList"
type="daterange"
style="width: 55%; margin-bottom: 10px"
placeholder="挂号时间"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
/>
</div>
<el-table
:data="patientList"
@@ -46,11 +66,14 @@
<i class="el-icon-first-aid-kit"></i>
<h2>处置项目</h2>
<el-button type="primary" plain @click="printBottleLabel()">打印瓶签</el-button>
<el-button type="primary" plain @click="printBloodBarcode()">打印采血条码</el-button>
<el-button type="primary" plain @click="printPrescription()">打印处方</el-button>
<el-button type="primary" plain @click="printDisposal()">打印处置单</el-button>
</div>
</div>
<el-table
:data="activityList"
ref="activityListRef"
height="calc(100% - 60px)"
style="width: 100%"
border
@@ -76,6 +99,11 @@
}}
</template>
</el-table-column>
<el-table-column align="center" prop="size" label="数量" width="100">
<template #default="scope">
{{ scope.row.quantity + ' ' + scope.row.unitCode_dictText }}
</template>
</el-table-column>
<el-table-column align="center" prop="size" label="规格" width="100" />
<el-table-column align="center" prop="executeNum" label="执行次数" width="90" />
<el-table-column align="center" label="已执行次数" width="90">
@@ -114,7 +142,11 @@
<el-table-column align="center" prop="serviceStatus_enumText" label="状态" width="100">
<template #default="{ row }">
<el-tag type="primary" size="small">
{{ row.serviceStatus_enumText }}
{{
row.serviceStatus_enumText
? row.serviceStatus_enumText
: row.chargeStatus_enumText
}}
</el-tag>
</template>
</el-table-column>
@@ -185,15 +217,33 @@
<script setup>
import { getCurrentInstance } from 'vue';
import { getList, getDisposalList, execute, cancel, getPerformRecord } from './components/api';
import {
getList,
getDisposalList,
execute,
cancel,
getPerformRecord,
listWesternmedicine,
printBloodCode,
} from './components/api';
import PerformRecordDialog from './components/performRecordDialog';
import templateJson from './components/template.json';
import prescriptionTemplate from './components/prescriptionTemplate.json';
import bloodTemplate from './components/bloodTemplate.json';
import disposalTemplate from './components/disposalTemplate.json';
import { formatDateStr } from '@/utils';
import { hiprint } from 'vue-plugin-hiprint';
import { advicePrint } from '@/api/public';
import useUserStore from '@/store/modules/user';
// 患者搜索
const patientSearch = ref('');
const queryParams = ref({
pageNo: 1,
pageSize: 10,
});
const receptionTime = ref([
formatDateStr(new Date(), 'YYYY-MM-DD'),
formatDateStr(new Date(), 'YYYY-MM-DD'),
]);
const total = ref(0);
// 患者数据
const patientList = ref([]);
@@ -201,12 +251,16 @@ const patientList = ref([]);
const activityList = ref([]);
// 耗材列表
const deviceList = ref([]);
// 诊疗项目 + 耗材 打印处置单用
const deviceActivityList = ref([]);
const userStore = useUserStore();
// 当前选中的患者
const currentPatient = ref({});
const recordList = ref([]);
const openDialog = ref(false);
const loading = ref(false);
const activityListRef = ref(null);
const { proxy } = getCurrentInstance();
@@ -225,6 +279,8 @@ const totalCost = computed(() => {
});
getPatientList();
function getPatientList() {
queryParams.value.receptionTimeSTime = receptionTime.value[0] + ' 00:00:00';
queryParams.value.receptionTimeETime = receptionTime.value[1] + ' 23:59:59';
getList(queryParams.value).then((res) => {
patientList.value = res.data.records;
total.value = res.data.total;
@@ -234,6 +290,7 @@ function getPatientList() {
function handlePatientSelect(row) {
console.log(row, 3456789);
loading.value = true;
currentPatient.value = row;
getDisposalList(row.encounterId).then((res) => {
deviceList.value = res.data.records.filter((item) => {
return item.requestTable == 'wor_device_request';
@@ -243,6 +300,9 @@ function handlePatientSelect(row) {
item.requestTable == 'wor_service_request' || item.requestTable == 'med_medication_request'
);
});
deviceActivityList.value = res.data.records.filter((item) => {
return item.deviceCategory == '7' || item.serviceCategory == '21';
});
loading.value = false;
console.log(activityList.value, 345678);
});
@@ -317,6 +377,77 @@ function operationSpanMethod({ row, column, rowIndex, columnIndex }) {
return [1, 1];
}
function printPrescription() {
// 取出状态为已收费已发药的requestId
let requestIds = activityList.value
.filter((item) => {
return item.chargeStatus == 5 && item.dispenseStatus == 4;
})
.map((item) => {
return item.requestId;
})
.join(',');
advicePrint({ requestIds: requestIds, isPrescription: 1 }).then((res) => {
// 按 sortNumber 排序
const sortedList = res.data.adviceItemList.sort((a, b) => {
return (a.sortNumber || 0) - (b.sortNumber || 0);
});
// 为每个项目分配新的排序号,相同 groupId 的项目使用相同排序号
const groupIdToSortNumber = new Map();
let group = 1;
sortedList.forEach((item) => {
if (item.dispensePerDuration > 1) {
item.quantity = item.quantity / item.dispensePerDurations;
item.totalPrice = item.quantity * item.unitPrice;
}
item.contractName = res.data.contractName;
if (item.groupId) {
if (!groupIdToSortNumber.has(item.groupId)) {
groupIdToSortNumber.set(item.groupId, group++);
}
item.group = groupIdToSortNumber.get(item.groupId);
} else {
item.group = group++;
}
});
console.log('sortedList', sortedList);
const result = {
...res.data,
prescriptionList: sortedList,
};
// 将对象转换为 JSON 字符串
console.log(result, 'result');
// 模板对象获取
const printElements = prescriptionTemplate;
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
title: '打印标题',
height: 210,
width: 148,
}); //开始打印
});
}
function printDisposal() {
let requestIds = deviceActivityList.value
.map((item) => {
return item.requestId;
})
.join(',');
advicePrint({ requestIds: requestIds }).then((res) => {
const result = res.data;
const printElements = disposalTemplate;
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
height: 210,
width: 148,
});
});
}
// 判断是否为组内的第一行
function isFirstRowInGroup(rowIndex) {
const row = activityList.value[rowIndex];
@@ -338,6 +469,25 @@ function isFirstRowInGroup(rowIndex) {
return true;
}
function printBloodBarcode() {
const selectedRows = activityListRef.value.getSelectionRows();
if (selectedRows.length === 0) {
proxy.$modal.msgWarning('未选择要打印的项目');
} else if (selectedRows.length > 1) {
proxy.$modal.msgWarning('只能选择一个项目');
} else {
printBloodCode({ requestId: selectedRows[0].requestId }).then((res) => {
const result = res.data;
const printElements = bloodTemplate;
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
height: 210,
width: 148,
});
});
}
}
function handleCancel(row) {
let data = {
requestId: row.requestId,
@@ -364,6 +514,92 @@ function handleCancel(row) {
}
});
}
function printBottleLabel() {
let result = [];
// 过滤出全部输液药品
let printLiist = activityList.value.filter((item) => {
return item.medCategory == '2';
});
// 按照groupId分组但将多天的项目展开为独立项目
let expandedList = [];
printLiist.forEach((item) => {
// 如果用药天数大于1则创建多个项目
if (item.dispensePerDuration && item.dispensePerDuration > 1) {
// 为每一天创建一个项目
for (let i = 0; i < item.dispensePerDuration; i++) {
// 克隆项目并调整数量
const clonedItem = {
...item,
// 数量除以天数
quantity: item.quantity ? item.quantity / item.dispensePerDuration : item.quantity,
// 可以添加一个字段表示是第几天
dayIndex: i + 1,
totalDays: item.dispensePerDuration,
data: item.itemName + ' ' + item.size + ' ' + item.methodCode_dictText,
};
// 获取当前时间做执行日期如果用药天数大于1依次累加
const date = new Date();
date.setDate(date.getDate() + i);
clonedItem.performDateTime = formatDateStr(date, 'YYYY-MM-DD');
// 将克隆的项目添加到展开列表中不按groupId分组
expandedList.push(clonedItem);
}
} else {
// 天数为1或没有设置天数直接使用原项目
item.data = item.itemName + ' ' + item.size + ' ' + item.methodCode_dictText;
expandedList.push(item);
}
});
// 重新按groupId分组但每个展开的项目都是独立的
const groupedByGroupId = expandedList.reduce((acc, item) => {
// 为展开的项目生成新的唯一groupId
const groupId = item.dayIndex
? `${item.groupId || item.requestId}_day${item.dayIndex}`
: item.groupId || item.requestId;
if (!acc[groupId]) {
acc[groupId] = [];
}
acc[groupId].push(item);
return acc;
}, {});
const resultList = Object.values(groupedByGroupId);
console.log(resultList, '23456789');
result = resultList.map((item) => {
return {
patientName: currentPatient.value.patientName,
prepareName: userStore.nickName,
genderEnum_enumText: currentPatient.value.genderEnum_enumText,
age: currentPatient.value.age,
date: item[0].performDateTime,
infuseData: item,
};
});
const printElements = templateJson;
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
console.log(result, '打印机列表');
hiprintTemplate.print2(result, {
printer: 'Xprinter XP-365B',
height: 210,
width: 148,
});
// 直接打印回调
// 发送任务到打印机成功
hiprintTemplate.on('printSuccess', function (e) {
console.log('打印成功');
});
// 发送任务到打印机失败
hiprintTemplate.on('printError', function (e) {
console.log('打印失败');
});
}
function getRecord(row) {
getPerformRecord({ reqId: row.requestId }).then((res) => {
recordList.value = res.data;

View File

@@ -27,7 +27,7 @@
<span>CF0000000001</span>
</div>
<div style="text-align: center">
<h2>长春大学医院</h2>
<h2>医院</h2>
</div>
<div style="text-align: center">
<h3>处方单</h3>

View File

@@ -8,71 +8,32 @@
</div>
</template>
<div style="width: 100%">
<el-input
v-model="queryParams.searchKey"
placeholder="搜索患者"
style="width: 48%; margin-bottom: 10px; margin-right: 15px"
@keyup.enter="getEncounterList"
>
<el-input v-model="queryParams.searchKey" placeholder="搜索患者"
style="width: 48%; margin-bottom: 10px; margin-right: 15px" @keyup.enter="getEncounterList">
<template #append>
<el-button icon="Search" @click="getEncounterList" />
</template>
</el-input>
<el-select
v-model="queryParams.refundEnum"
style="width: 48%; margin-bottom: 10px"
placeholder="收费状态"
@change="getEncounterList"
>
<el-option
v-for="item in statusOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-select v-model="queryParams.refundEnum" style="width: 48%; margin-bottom: 10px" placeholder="收费状态"
@change="getEncounterList">
<el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
<el-date-picker
v-model="dateRange"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 85%; margin-bottom: 10px"
value-format="YYYY-MM-DD"
/>
<el-button
type="primary"
@click="getEncounterList"
style="margin-bottom: 10px; margin-left: 18px"
>
<el-date-picker v-model="dateRange" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
style="width: 85%; margin-bottom: 10px" value-format="YYYY-MM-DD" placement="bottom"
@change="getEncounterList" />
<el-button type="primary" @click="getEncounterList" style="margin-bottom: 10px; margin-left: 18px">
搜索
</el-button>
</div>
<el-table
:data="encounterList"
border
style="width: 100%"
height="calc(100vh - 300px)"
highlight-current-row
@cell-click="handleGetReturnDrugList"
>
<el-table-column
prop="patientName"
align="center"
label="姓名"
width="130"
show-overflow-tooltip
/>
<el-table-column
prop="genderEnum_enumText"
align="center"
label="性别"
show-overflow-tooltip
/>
<el-table :data="encounterList" border style="width: 100%" height="calc(100vh - 300px)" highlight-current-row
@cell-click="handleGetReturnDrugList">
<el-table-column prop="patientName" align="center" label="姓名" width="130" show-overflow-tooltip />
<el-table-column prop="genderEnum_enumText" align="center" label="性别" show-overflow-tooltip />
<el-table-column align="center" width="140" label="就诊日期" show-overflow-tooltip>
<template #default="scope">
{{
scope.row.receptionTime ? formatDateStr(scope.row.receptionTime, 'YYYY-MM-DD') : '-'
}}
scope.row.receptionTime ? formatDateStr(scope.row.receptionTime, 'YYYY-MM-DD') : '-'
}}
</template>
</el-table-column>
<!-- <el-table-column label="状态" align="center" prop="refundEnum_enumText" /> -->
@@ -91,32 +52,16 @@
</div>
</template>
<el-button
type="primary"
:disabled="!selectedMedicines.length"
@click="handleReturnDrug(undefined)"
style="margin-bottom: 10px"
>
<el-button type="primary" :disabled="!selectedMedicines.length" @click="handleReturnDrug(undefined)"
style="margin-bottom: 10px">
确认退药
</el-button>
<el-button type="primary" @click="handleScan()" style="margin-bottom: 10px"> 扫码 </el-button>
<el-table
ref="returnDrugRef"
:data="returDrugList"
style="width: 100%"
height="calc(100vh - 300px)"
border
@selection-change="handleSelectionChange"
>
<el-table ref="returnDrugRef" :data="returDrugList" style="width: 100%" height="calc(100vh - 300px)" border
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column prop="itemName" label="药品名称" show-overflow-tooltip align="center" />
<el-table-column
prop="totalPrice"
label="总价"
width="100"
align="right"
header-align="center"
>
<el-table-column prop="totalPrice" label="总价" width="100" align="right" header-align="center">
<template #default="scope">
{{ scope.row.totalPrice ? scope.row.totalPrice.toFixed(2) + ' 元' : '-' }}
</template>
@@ -130,31 +75,26 @@
<el-table-column prop="reqStatus_enumText" label="退药状态" width="100" align="center">
<template #default="scope">
{{
scope.row.reqStatus_enumText == null
? scope.row.refundEnum_enumText
: scope.row.reqStatus_enumText
}}
scope.row.reqStatus_enumText == null
? scope.row.refundEnum_enumText
: scope.row.reqStatus_enumText
}}
</template>
</el-table-column>
<el-table-column prop="waitingQuantity" label="退药数量" width="100" align="center">
<template #default="scope">
<span>{{
scope.row.quantity
? Math.abs(scope.row.quantity)
: '0' + ' ' + scope.row.unitCode_dictText
}}</span>
scope.row.quantity
? Math.abs(scope.row.quantity)
: '0' + ' ' + scope.row.unitCode_dictText
}}</span>
</template>
</el-table-column>
<el-table-column prop="doctorName" label="开单医生" align="center" width="180" />
<el-table-column label="操作" width="100" align="center" fixed="right">
<template #default="scope">
<el-popconfirm
width="150"
hide-after="10"
title="操作确认"
placement="top-start"
@confirm="handleReturnDrug(scope.row)"
>
<el-popconfirm width="150" hide-after="10" title="操作确认" placement="top-start"
@confirm="handleReturnDrug(scope.row)">
<template #reference>
<el-button type="primary" link :disabled="scope.row.reqStatus != 11">
退药
@@ -173,12 +113,8 @@
</div>
</div>
</el-card>
<TraceNoDialog
:ypName="ypName"
:openDialog="openTraceNoDialog"
@submit="submit"
@cancel="openTraceNoDialog = false"
/>
<TraceNoDialog :ypName="ypName" :openDialog="openTraceNoDialog" @submit="submit"
@cancel="openTraceNoDialog = false" />
</div>
</template>
@@ -192,7 +128,7 @@ import TraceNoDialog from '@/components/OpenHis/TraceNoDialog/index.vue';
const queryParams = ref({
pageSize: 50,
pageNum: 1,
refundEnum: 11,
refundEnum: 5,
});
const openTraceNo = ref(false);
const traceNoList = ref([]);
@@ -202,7 +138,8 @@ const encounterId = ref('');
const returDrugList = ref([]);
const selectedMedicines = ref([]);
const statusOptions = ref([]);
const dateRange = ref([]);
const dateRange = ref([formatDateStr(new Date(), 'YYYY-MM-DD'),
formatDateStr(new Date(), 'YYYY-MM-DD'),]);
const traceNoTemp = ref('');
const traceNoTempRef = ref();
const totalAmount = ref(0);

View File

@@ -13,6 +13,13 @@
<el-table-column label="类型" align="center" prop="activityType_enumText" />
<el-table-column label="包装单位" align="center" prop="unitCode_dictText" />
<el-table-column label="最小单位" align="center" prop="minUnitCode_dictText" />
<el-table-column label="单次剂量" align="center">
<template #default="scope">
<span>
{{ parseFloat(scope.row.dose).toFixed(2) + scope.row.doseUnitCode_dictText }}
</span>
</template>
</el-table-column>
<el-table-column label="规格" align="center" prop="volume" />
<el-table-column label="用法" align="center" prop="methodCode_dictText" />
<el-table-column label="库存数量" align="center">
@@ -64,7 +71,7 @@ const currentSelectRow = ref({});
const queryParams = ref({
pageSize: 100,
pageNum: 1,
adviceTypes: '1,2,3'
adviceTypes: '1,2,3',
});
const adviceBaseList = ref([]);
// 节流函数
@@ -80,8 +87,10 @@ watch(
(newValue) => {
queryParams.value.searchKey = newValue.searchKey;
// queryParams.value.adviceType = newValue.adviceType;
if(newValue.adviceTyp){
if (newValue.adviceType) {
queryParams.value.adviceTypes = [newValue.adviceType].join(',');
} else {
queryParams.value.adviceTypes = '1,2,3';
}
throttledGetList();
},

View File

@@ -607,6 +607,16 @@ export function getInit() {
})
}
/**
* 查询参与者下拉列表
*/
export function queryParticipantList(params) {
return request({
url: '/app-common/practitioner-list',
method: 'get',
params: params
})
}
/**
* 获取科室下拉列表
@@ -650,3 +660,14 @@ export function getEnPrescriptionInfo(data) {
params: data
})
}
/**
* 获取组套列表
*/
export function getOrderGroup(data) {
return request({
url: '/personalization/orders-group-package/group-package-for-order',
method: 'get',
params: data
})
}

View File

@@ -143,7 +143,7 @@
type="primary"
icon="Edit"
@click="handleEdit(scope.row)"
:disabled="scope.row.statusEnum == 2 || scope.row.statusEnum == 3"
:disabled="scope.row.statusEnum == 2 || scope.row.statusEnum == 3 || scope.row.statusEnum == 6"
>编辑</el-button
>
<el-button
@@ -342,7 +342,7 @@ function handleAddPrescription() {
function selectable(row, index) {
// 返回 true 表示该行可选,返回 false 表示该行不可选
// console.log(row, 'selectable', rowIndex.value);
return row.statusEnum !== 2;
return ![2, 3, 6].includes(row.statusEnum);
}
/**

View File

@@ -12,7 +12,7 @@
<el-button icon="Search" @click="getList" />
</template>
</el-input>
<el-radio-group v-model="queryParams.rangeCode" @change="getList">
<el-radio-group v-model="queryParams.rangeCode" @change="handelRadioChange">
<el-radio-button :label="1">个人</el-radio-button>
<el-radio-button :label="2">科室</el-radio-button>
<el-radio-button :label="3">全院</el-radio-button>
@@ -32,21 +32,26 @@
</template>
<script setup>
import { getOrderGroupList } from '../api';
import { getOrderGroup } from '../api';
const props = defineProps({
diagnosis: {
type: Object,
required: true,
},
organizationId: {
type: String,
required: true,
}
});
const drawer = ref(false);
const orderList = ref([]);
const result = ref([]);
const emit = defineEmits(['useOrderGroup']);
const queryParams = ref({
typeEnum: 1,
rangeCode: 3,
rangeCode: 2,
});
function handleOpen() {
@@ -54,24 +59,39 @@ function handleOpen() {
getList();
}
function handelRadioChange(value){
switch (value) {
case 1:
orderList.value = result.value.personalList;
break;
case 2:
orderList.value = result.value.organizationList;
break;
case 3:
orderList.value = result.value.hospitalList;
break;
}
}
function handleUseOrderGroup(row) {
let value = JSON.parse(row.groupJson);
value = value.map((item) => {
return {
...item,
conditionId: props.diagnosis.conditionId,
conditionDefinitionId: props.diagnosis.definitionId,
};
});
// let value = JSON.parse(row.groupJson);
// value = value.map((item) => {
// return {
// ...item,
// conditionId: props.diagnosis.conditionId,
// conditionDefinitionId: props.diagnosis.definitionId,
// };
// });
// value.conditionId = props.diagnosis.conditionId;
// value.conditionDefinitionId = props.diagnosis.definitionId;
emit('useOrderGroup', value);
emit('useOrderGroup', row.detailList);
drawer.value = false;
}
function getList() {
getOrderGroupList(queryParams.value).then((res) => {
orderList.value = res.data.records;
getOrderGroup({ organizationId: props.organizationId }).then((res) => {
result.value = res.data
orderList.value = res.data.organizationList;
});
}

View File

@@ -19,7 +19,7 @@
<span>{{ item.prescriptionNo }}</span>
</div>
<div style="text-align: center">
<h2>长春大学医院</h2>
<h2>医院</h2>
</div>
<div style="text-align: center">
<h3>处方单</h3>

View File

@@ -101,7 +101,7 @@
<el-form-item prop="lotNumber" label="药房:">
<el-select
v-model="scope.row.inventoryId"
style="width: 180px; margin-right: 20px"
style="width: 400px; margin-right: 20px"
placeholder="药房"
>
<el-option
@@ -348,6 +348,11 @@
v-if="item.type != unitMap['dose']"
:value="item.value"
:label="item.label"
@click="
() => {
scope.row.unitCode_dictText = item.label;
}
"
/>
</template>
</el-select>
@@ -539,7 +544,7 @@
<!-- <div v-if="groupMarkers[scope.$index] === 'all'">┗</div> -->
</template>
</el-table-column>
<el-table-column label="序号" align="center" width="60" prop="sortNumber"> </el-table-column>
<!-- <el-table-column label="序号" align="center" width="60" prop="sortNumber"> </el-table-column> -->
<el-table-column label="医嘱" align="center" prop="productName" width="400">
<template #default="scope">
<template v-if="getRowDisabled(scope.row)">
@@ -687,16 +692,17 @@
</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100" fixed="right">
<!-- <el-table-column label="操作" align="center" width="100" fixed="right">
<template #default="scope">
<el-icon @click="up(scope.row)"><Upload /></el-icon>
<el-icon @click="down(scope.row)"><Download /></el-icon>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<OrderGroupDrawer
ref="orderFroupRef"
:diagnosis="diagnosisInfo"
:organizationId="props.patientInfo.orgId"
@useOrderGroup="handleSaveGroup"
/>
<PrescriptionHistory
@@ -723,7 +729,7 @@ import {
getContract,
getAdviceBaseInfo,
} from '../api';
import adviceBaseList from '../adviceBaseList';
import adviceBaseList from '../advicebaselist';
import { computed, getCurrentInstance, nextTick, watch } from 'vue';
import { calculateQuantityByDays, formatNumber } from '@/utils/his';
import OrderGroupDrawer from './orderGroupDrawer';
@@ -919,7 +925,6 @@ function handleAddPrescription() {
proxy.$modal.msgWarning('请先保存当前医嘱');
return;
}
debugger;
isAdding.value = true;
// 在数组最前方添加一行,让新增行显示在最上边
prescriptionList.value.unshift({
@@ -1045,7 +1050,14 @@ function selectAdviceBase(key, row) {
})[0];
if (stock != {} && stock != undefined) {
if (stock.quantity <= 0) {
proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
stock = stockList.value.filter((item) => {
return item.quantity > 0 && item.locationId == row.positionId;
})[0];
if (stock == {} || stock == undefined) {
proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
return;
}
// proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
// return;
}
prescriptionList.value[rowIndex.value].lotNumber = stock.lotNumber;
@@ -1082,9 +1094,7 @@ function getOrgList() {
}
function handleDelete() {
let selectRow = prescriptionList.value.filter((item) => {
return item.check;
});
let selectRow = groupIndexList.value.map((index) => prescriptionList.value[index]);
if (selectRow.length == 0) {
proxy.$modal.msgWarning('请选择要删除的医嘱');
return;
@@ -1105,19 +1115,20 @@ function handleDelete() {
});
}
}
handleEmrTreatment();
expandOrder.value = [];
isAdding.value = false;
adviceQueryParams.value.adviceType = undefined;
if (sum == selectRow.length) {
proxy.$modal.msgSuccess('删除成功');
groupIndexList.value = [];
return;
}
if (deleteList.length > 0) {
savePrescription({ adviceSaveList: deleteList }).then((res) => {
if (res.code == 200) {
proxy.$modal.msgSuccess('删除成功');
groupIndexList.value = [];
getListInfo(false);
}
});
@@ -1299,18 +1310,20 @@ function handleSaveSign(row, index) {
row.minUnitQuantity = row.quantity;
}
row.conditionId = conditionId.value;
if (row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit') {
row.unitPrice = row.unitPrice;
} else {
row.unitCode_dictText = row.unitCodeList.find(
(item) => item.value == row.minUnitCode
).label;
row.unitPrice = row.minUnitPrice;
}
// if (row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit') {
// row.unitPrice = row.unitPrice;
// } else {
// row.unitCode_dictText = row.unitCodeList.find(
// (item) => item.value == row.minUnitCode
// ).label;
// row.unitPrice = row.minUnitPrice;
// }
row.conditionDefinitionId = conditionDefinitionId.value;
row.encounterDiagnosisId = encounterDiagnosisId.value;
row.diagnosisName = diagnosisName.value;
row.sortNumber = row.sortNumber ? row.sortNumber : prescriptionList.value.length;
if (row.injectFlag == 1) {
row.sortNumber = row.sortNumber ? row.sortNumber : prescriptionList.value.length;
}
// row.dose = row.doseQuantity;
// row.doseUnitCode = unitCodeList.value.find((item) => item.type == 'dose').value;
// row.doseUnitCode = JSON.parse(JSON.stringify(row.minUnitCode)); // 页面显示与赋值不符,此处先简单处理,后续修改
@@ -1334,6 +1347,10 @@ function handleSaveSign(row, index) {
}
function handleSaveBatch() {
if (expandOrder.value.length > 0) {
proxy.$modal.msgWarning('请先点击确定确认当前医嘱');
return;
}
if (prescriptionList.value[0].isEdit && !prescriptionList.value[0].adviceType) {
prescriptionList.value.shift();
isAdding.value = false;
@@ -1401,6 +1418,7 @@ function setValue(row) {
// prescriptionList.value[rowIndex.value].minUnitCode = JSON.parse(JSON.stringify(row.doseUnitCode));
prescriptionList.value[rowIndex.value].doseUnitCode = row.doseUnitCode;
prescriptionList.value[rowIndex.value].minUnitCode = row.minUnitCode;
prescriptionList.value[rowIndex.value].categoryEnum = row.categoryCode;
prescriptionList.value[rowIndex.value].unitCode =
row.partAttributeEnum == 1 ? row.minUnitCode : row.unitCode;
// prescriptionList.value[rowIndex.value].doseUnitCode_dictText = row.minUnitCode_dictText;
@@ -1425,7 +1443,13 @@ function setValue(row) {
})[0];
if (stock != {} && stock != undefined) {
if (stock.quantity <= 0) {
proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
stock = stockList.value.filter((item) => {
return item.quantity > 0 && item.locationId == row.positionId;
})[0];
if (stock == {} || stock == undefined) {
proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
}
// proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
// return;
}
prescriptionList.value[rowIndex.value].lotNumber = stock.lotNumber;
@@ -1454,39 +1478,47 @@ function handleSaveGroup(orderGroupList) {
// item.contentJson = JSON.stringify(item);
// prescriptionList.value.push(item);
// });
let paramList = orderGroupList.map((item) => {
return item.adviceDefinitionId;
});
getAdviceBaseInfo({
adviceDefinitionIdParamList: paramList.join(','),
organizationId: props.patientInfo.orgId,
}).then((res) => {
getOrgList();
res.data.records.forEach((item, index) => {
rowIndex.value = prescriptionList.value.length;
setValue(item);
let orderGroupValue = orderGroupList.find(
(k) => k.adviceDefinitionId == item.adviceDefinitionId
);
// let paramList = orderGroupList.map((item) => {
// return item.adviceDefinitionId;
// });
// getAdviceBaseInfo({
// adviceDefinitionIdParamList: paramList.join(','),
// organizationId: props.patientInfo.orgId,
// }).then((res) => {
// getOrgList();
orderGroupList.forEach((item, index) => {
rowIndex.value = prescriptionList.value.length;
setValue(item.orderDetailInfos);
// let orderGroupValue = orderGroupList.find(
// (k) => k.adviceDefinitionId == item.adviceDefinitionId
// );
prescriptionList.value[rowIndex.value] = {
...prescriptionList.value[rowIndex.value],
...orderGroupValue,
patientId: props.patientInfo.patientId,
encounterId: props.patientInfo.encounterId,
accountId: accountId.value,
dbOpType: orderGroupValue.requestId ? '2' : '1',
minUnitQuantity: orderGroupValue.quantity * orderGroupValue.partPercent,
conditionId: conditionId.value,
conditionDefinitionId: conditionDefinitionId.value,
encounterDiagnosisId: encounterDiagnosisId.value,
};
prescriptionList.value[rowIndex.value].contentJson = JSON.stringify(
prescriptionList.value[rowIndex.value]
);
});
console.log(prescriptionList.value);
prescriptionList.value[rowIndex.value] = {
...prescriptionList.value[rowIndex.value],
// ...orderGroupValue,
patientId: props.patientInfo.patientId,
encounterId: props.patientInfo.encounterId,
accountId: accountId.value,
quantity: item.quantity,
totalPrice: item.quantity * prescriptionList.value[rowIndex.value].unitPrice,
unitCode: item.unitCode,
unitCode_dictText: item.unitCodeName ? item.unitCodeName : '',
statusEnum: 1,
dbOpType: prescriptionList.value[rowIndex.value].requestId ? '2' : '1',
minUnitQuantity:
unitCodeList.value.find((k) => k.value == item.unitCode).type == 'minUnit'
? item.quantity
: item.quantity * item.orderDetailInfos.partPercent,
conditionId: conditionId.value,
conditionDefinitionId: conditionDefinitionId.value,
encounterDiagnosisId: encounterDiagnosisId.value,
};
prescriptionList.value[rowIndex.value].contentJson = JSON.stringify(
prescriptionList.value[rowIndex.value]
);
});
console.log(prescriptionList.value);
// });
// savePrescription({ adviceSaveList: saveList }).then((res) => {
// if (res.code === 200) {
// proxy.$modal.msgSuccess('保存成功');
@@ -1592,6 +1624,7 @@ function combination() {
proxy.$modal.msgWarning('至少选择两项');
return;
}
// 相同分组用法需要相同
let uniqueValues = new Set();
// 相同分组诊断需要相同
@@ -1824,10 +1857,13 @@ function convertDoseValues(row, index) {
// 总量计算,仅适用只有两种单位的情况
function calculateTotalAmount(row, index) {
nextTick(() => {
// 项目为耗材时
if (row.adviceType == 2) {
// 拆零比为1时 总价等于数量乘以单价
if (row.partPercent == 1) {
row.totalPrice = row.quantity * row.unitPrice;
} else {
// 拆零比不为1时 如果当前总量单位是大单位,总价等于数量乘以大单位价格 否则总价等于数量乘以小单位价格
if (row.unitCodeList.find((k) => k.value == row.unitCode).type == 'unit') {
row.totalPrice = row.quantity * row.unitPrice;
} else {

View File

@@ -30,10 +30,30 @@
<el-form-item label="联系方式">
<el-input v-model="appointmentForm.patientTel" />
</el-form-item>
<el-form-item label="牙位">
<el-input v-model="appointmentForm.toothPosition" />
</el-form-item>
<el-form-item label="预约医生" prop="practitionerId">
<el-select
v-model="appointmentForm.practitionerId"
placeholder="预约医生"
clearable
filterable
remote
:remote-method="getInit"
>
<el-option
v-for="item in participantListOptions"
:key="item.practitionerId"
:label="item.practitionerName"
:value="item.practitionerId"
/>
</el-select>
</el-form-item>
<el-form-item label="预约时间">
<el-time-select
v-model="appointmentForm.reservationTime"
start="08:30"
start="07:00"
step="00:30"
end="18:00"
placeholder="选择时间"
@@ -66,6 +86,7 @@
>
<div class="card-header">
<span class="time">{{ appointment.reservationTime }}</span>
<span>{{ appointment.practitionerName }}</span>
<!-- <el-tag :type="getTagType(appointment.type)" size="small">
{{ appointment.type }}
</el-tag> -->
@@ -73,15 +94,27 @@
<div class="card-body">
<div class="patient-info">
<el-icon><User /></el-icon>
<span style="margin-left: 0; font-size: 16px" class="descriptions-item-label">
患者姓名:
</span>
<span>{{ appointment.patientName }}</span>
</div>
<div class="patient-info">
<el-icon><Phone /></el-icon>
<span style="margin-left: 0; font-size: 16px" class="descriptions-item-label">
手机号:
</span>
<span>{{ appointment.patientTel }}</span>
</div>
<div class="patient-info">
<span style="margin-left: 0; font-size: 16px" class="descriptions-item-label">
牙位:
</span>
<span>{{ appointment.toothPosition }}</span>
</div>
<div v-if="appointment.remark" class="remark">
<el-icon><Comment /></el-icon>
<span style="margin-left: 0; font-size: 16px" class="descriptions-item-label">
备注:
</span>
<span>{{ appointment.remark }}</span>
</div>
</div>
@@ -107,6 +140,7 @@ import {
addReservationInfo,
editReservationInfo,
delReservationInfo,
queryParticipantList,
} from './api';
import { formatDateStr } from '@/utils/index';
@@ -117,6 +151,7 @@ const isEditing = ref(false);
const editingId = ref(null);
const queryParams = ref({});
const currentAppointments = ref([]);
const participantListOptions = ref([]);
const { proxy } = getCurrentInstance();
// 预约数据
const appointments = ref([]);
@@ -143,8 +178,8 @@ function getRecords(date) {
getReservationInfo({
pageNo: 1,
pageSize: 1000,
reservationTimeSTime: month + '01 00:00:00',
reservationTimeETime: month + '31 23:59:59',
reservationTimeSTime: month + '-01 00:00:00',
reservationTimeETime: month + '-31 23:59:59',
}).then((res) => {
appointments.value = res.data.records.map((item) => {
return formatDateStr(item.reservationTime, 'YYYY-MM-DD');
@@ -152,6 +187,12 @@ function getRecords(date) {
console.log(appointments.value);
});
}
getInit();
function getInit(value) {
queryParticipantList({ searchKey: value }).then((res) => {
participantListOptions.value = res.data;
});
}
// 格式化选中的日期
const selectedDateFormatted = computed(() => {

View File

@@ -26,8 +26,9 @@
<el-date-picker
v-model="registerTime"
@change="handleTimeChange"
type="date"
type="daterange"
style="width: 100%; margin-bottom: 10px"
:clearable="false"
placeholder="挂号时间"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
@@ -235,7 +236,7 @@ const userStore = useUserStore();
const bedfont = 'bed-font';
const queryParams = ref({
pageNo: 1,
pageSize: 50,
pageSize: 300,
registerTimeSTime: formatDateStr(new Date(), 'YYYY-MM-DD') + ' 00:00:00',
registerTimeETime: formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59',
});
@@ -250,7 +251,7 @@ const activeTab = ref('emr');
const patientList = ref([]);
const patientInfo = ref({});
const prescriptionInfo = ref([]);
const registerTime = ref(formatDate(new Date()));
const registerTime = ref([formatDate(new Date()), formatDate(new Date())]);
const patientDrawerRef = ref();
const prescriptionRef = ref();
const tcmRef = ref();
@@ -384,8 +385,8 @@ function handleFinish(encounterId) {
}
function handleTimeChange(value) {
queryParams.value.registerTimeSTime = value + ' 00:00:00';
queryParams.value.registerTimeETime = value + ' 23:59:59';
queryParams.value.registerTimeSTime = value[0] + ' 00:00:00';
queryParams.value.registerTimeETime = value[1] + ' 23:59:59';
getPatientList();
}

View File

View File

@@ -0,0 +1,59 @@
import request from '@/utils/request'
export function listPatient(query) {
return request({
url: '/pharmacy-manage/western-medicine-dispense/encounter-list',
method: 'get',
params: query
})
}
export function listInit(query) {
return request({
url: '/pharmacy-manage/western-medicine-dispense/init',
method: 'get',
params: query
})
}
export function listWesternmedicine(query) {
return request({
url: '/pharmacy-manage/western-medicine-dispense/prescription-list',
method: 'get',
params: query
})
}
export function updateMedicion(prescriptionList) {
return request({
url: '/pharmacy-manage/western-medicine-dispense/medicine-dispense',
method: 'put',
data: prescriptionList
})
}
export function prepareMedicion(data) {
return request({
url: '/pharmacy-manage/western-medicine-dispense/prepare',
method: 'put',
data: data
})
}
export function backMedicion(prescriptionNo,notPerformedReasonEnum) {
return request({
url: '/pharmacy-manage/western-medicine-dispense/medicine-cancel',
method: 'put',
params: {
prescriptionNo: prescriptionNo,
notPerformedReasonEnum:notPerformedReasonEnum
}
})
}
//扫码枪返回追溯码筛选
export function itemTraceNo(params) {
return request({
url: '/app-common/item-trace-no?traceNoList=' + params,
method: 'get',
})
}

View File

@@ -0,0 +1,617 @@
{
"panels": [
{
"index": 1,
"name": 2,
"paperType": "A5",
"height": 210,
"width": 148,
"paperHeader": 6,
"paperFooter": 595.2755905511812,
"printElements": [
{
"options": {
"left": 150,
"top": 16.5,
"height": 22.5,
"width": 120,
"title": "医院",
"coordinateSync": false,
"widthHeightSync": false,
"fontFamily": "Microsoft YaHei",
"fontSize": 18,
"textAlign": "center",
"textContentVerticalAlign": "middle",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 187.5,
"top": 54,
"height": 10.5,
"width": 43.5,
"title": "处方签",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 13.5,
"textAlign": "justify",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 34.5,
"top": 76.5,
"height": 12,
"width": 171,
"title": "医保编号:",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 252,
"top": 76.5,
"height": 10.5,
"width": 163.5,
"title": "就诊类型:",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 252,
"top": 93,
"height": 12,
"width": 163.5,
"title": "费用性质",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "contractName"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 34.5,
"top": 94.5,
"height": 12,
"width": 171,
"title": "处方编号",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "prescriptionNo"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 28.5,
"top": 112.5,
"height": 9,
"width": 387,
"borderWidth": "1.5",
"coordinateSync": false,
"widthHeightSync": false
},
"printElementType": {
"title": "横线",
"type": "hline"
}
},
{
"options": {
"left": 195,
"top": 121.5,
"height": 12,
"width": 63,
"title": "性别",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "genderEnum_enumText"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 294,
"top": 121.5,
"height": 12,
"width": 79.5,
"title": "年龄",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "age"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 36,
"top": 123,
"height": 12,
"width": 133.5,
"title": "姓名",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "patientName"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 36,
"top": 141,
"height": 12,
"width": 192,
"title": "门诊号",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "encounterId"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 295.5,
"top": 142.5,
"height": 12,
"width": 124.5,
"title": "科室",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "organizationName"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 36,
"top": 160.5,
"height": 12,
"width": 384,
"title": "临床诊断",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "conditionName"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 36,
"top": 178.5,
"height": 12,
"width": 124.5,
"title": "电话",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "phone"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 228,
"top": 178.5,
"height": 12,
"width": 189,
"title": "开具日期",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "reqAuthoredTime"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 30,
"top": 195,
"height": 9,
"width": 387,
"borderWidth": "1.5",
"coordinateSync": false,
"widthHeightSync": false
},
"printElementType": {
"title": "横线",
"type": "hline"
}
},
{
"options": {
"left": 30,
"top": 201,
"height": 13.5,
"width": 19.5,
"title": "Rp",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 9,
"fontWeight": "500",
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 25.5,
"top": 225,
"height": 229.5,
"width": 381,
"field": "prescriptionList",
"coordinateSync": false,
"widthHeightSync": false,
"tableBorder": "noBorder",
"tableHeaderBorder": "noBorder",
"tableHeaderCellBorder": "noBorder",
"tableHeaderBackground": "#ffffff",
"tableBodyRowBorder": "noBorder",
"tableBodyCellBorder": "noBorder",
"tableFooterBorder": "noBorder",
"tableFooterCellBorder": "noBorder",
"lHeight": 180,
"groupFieldsFormatter": "function(type,options,data){ return ['medicineName'] }",
"tableBodyRowHeight": 15,
"columns": [
[
{
"title": "名称",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>' + '用法用量'; }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 86.5148548770295,
"field": "medicineName",
"checked": true,
"columnId": "medicineName",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "规格",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>'+ '每次:' + row.dose + row.doseUnitCode_dictText + ' ' + row.methodCode_dictText; }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 87.49337048145199,
"field": "totalVolume",
"checked": true,
"columnId": "totalVolume",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "单价",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>' + '' }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 42.00221340893656,
"field": "unitPrice",
"checked": true,
"columnId": "unitPrice",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "数量",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + ' ' + row.unitCode_dictText + '<br/>' + '' }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 56.015045170547694,
"field": "quantity",
"checked": true,
"columnId": "quantity",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "金额",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>' + '' }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 52.006536852055035,
"field": "totalPrice",
"checked": true,
"columnId": "totalPrice",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "等级",
"titleSync": false,
"vAlign": "top",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"renderFormatter": "function(value,row,colIndex,options,rowIndex){ return value + '<br/>' + row.rateCode_dictText }",
"styler2": "function(value,row,index,options){ return {padding: '5px 5px' }; }",
"width": 56.96797920997919,
"field": "contractName",
"checked": true,
"columnId": "contractName",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "等级",
"width": 79.2099792099792,
"checked": false,
"fixed": false,
"rowspan": 1,
"colspan": 1
}
]
]
},
"printElementType": {
"title": "表格",
"type": "table",
"editable": true,
"columnDisplayEditable": true,
"columnDisplayIndexEditable": true,
"columnTitleEditable": true,
"columnResizable": true,
"columnAlignEditable": true,
"isEnableEditField": true,
"isEnableContextMenu": true,
"isEnableInsertRow": true,
"isEnableDeleteRow": true,
"isEnableInsertColumn": true,
"isEnableDeleteColumn": true,
"isEnableMergeCell": true
}
},
{
"options": {
"left": 30,
"top": 520.5,
"height": 12,
"width": 79.5,
"title": "医师",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9,
"field": "doctor"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 126,
"top": 520.5,
"height": 12,
"width": 79.5,
"title": "发药:高艳敏",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 228,
"top": 520.5,
"height": 12,
"width": 79.5,
"title": "划价:张思怡",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 324,
"top": 520.5,
"height": 12,
"width": 79.5,
"title": "调配:宋丹丹",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"fontSize": 9
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 30,
"top": 540,
"height": 9,
"width": 387,
"borderWidth": "1.5",
"coordinateSync": false,
"widthHeightSync": false
},
"printElementType": {
"title": "横线",
"type": "hline"
}
},
{
"options": {
"left": 30,
"top": 547.5,
"height": 9.75,
"width": 120,
"title": "注1.本处方当日作废"
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 300,
"top": 553.5,
"height": 9.75,
"width": 120,
"title": "总金额",
"field": "medTotalAmount",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 48,
"top": 567,
"height": 9.75,
"width": 120,
"title": "2.延长处方用量时间原因"
},
"printElementType": {
"title": "文本",
"type": "text"
}
}
],
"paperNumberDisabled": true,
"paperNumberContinue": true,
"overPrintOptions": {
"content": "",
"opacity": 0.7,
"type": 1
},
"watermarkOptions": {
"content": "",
"fillStyle": "rgba(184, 184, 184, 0.3)",
"fontSize": "14px",
"rotate": 25,
"width": 200,
"height": 200,
"timestamp": false,
"format": "YYYY-MM-DD HH:mm"
},
"panelLayoutOptions": {
"layoutType": "column",
"layoutRowGap": 0,
"layoutColumnGap": 0
}
}
]
}

View File

@@ -0,0 +1,275 @@
<template>
<div class="inHospitalDispensing-container">
<div class="inHospitalDispensing-container-top">
<el-space>
<el-radio-group v-model="searchForm.status" @change="search">
<el-radio-button label="待发药" value="1" />
<el-radio-button label="待退药" value="2" />
</el-radio-group>
<el-select v-model="searchForm.window" placeholder="窗口" style="width: 240px">
<el-option key="0" label="住院西药房" value="0"/>
<el-option key="1" label="住院东药房" value="1"/>
<el-option key="2" label="住院北药房" value="2"/>
<el-option key="3" label="住院南药房" value="3"/>
</el-select>
<el-select v-model="searchForm.type" placeholder="医嘱类型" style="width: 240px">
<el-option key="0" label="全部" value="0"/>
<el-option key="1" label="长期" value="1"/>
<el-option key="2" label="临时" value="2"/>
</el-select>
<el-date-picker
v-model="searchForm.dateRange"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
<el-button type="primary" @click="handleSearch">查询</el-button>
</el-space>
</div>
<div class="inHospitalDispensing-container-bottom">
<div class="inHospitalDispensing-container-bottom-left">
<el-tree
ref="treeRef"
style="max-width: 600px"
default-expand-all
:data="treedata"
show-checkbox
node-key="id"
@node-click="handleNodeClick"
/>
</div>
<div class="inHospitalDispensing-container-bottom-right">
<div class="inHospitalDispensing-container-bottom-right-top">
<el-radio-group v-model="isAll">
<el-radio-button label="汇总" value="1" />
<el-radio-button label="明细" value="2" />
</el-radio-group>
<el-button type="primary" @click="handleSearch">发药</el-button>
</div>
<div class="inHospitalDispensing-container-bottom-right-bottom">
<el-table :data="tableData" style="width: 100% " height="100%" v-if="isAll==1">
<el-table-column prop="drugGoodsName" label="名称" width="180" />
<el-table-column prop="drugSpec" label="规格" width="180" />
<el-table-column prop="drugSpec" label="总量" width="180" />
<el-table-column prop="stockPlaceName" label="位置" width="180" />
<el-table-column prop="manufactureName" label="厂家" width="180" />
<el-table-column prop="drugGoodsCode" label="编码" width="180" />
<el-table-column prop="drugFormName" label="剂型" width="180" />
<el-table-column prop="packageNum" label="包装数量" width="180" />
<el-table-column prop="maxUnit" label="包装单位" width="180" />
</el-table>
<el-table :data="tableDataDetails" style="width: 100%" height="100%" v-if="isAll==2">
<el-table-column prop="receiveOrgName" label="科室" width="180" />
<el-table-column prop="patBed" label="床号" width="180" />
<el-table-column prop="patName" label="姓名" width="180" />
<el-table-column prop="drugGoodsName" label="名称" width="180" />
<el-table-column prop="drugSpec" label="规格" width="180" />
<el-table-column prop="applyNumStr" label="数量" width="180" />
<el-table-column prop="manufactureName" label="厂家" width="180" />
<el-table-column prop="dosageAndUnit" label="每次剂量" width="180" />
<el-table-column prop="usageName" label="用法" width="180" />
<el-table-column prop="salePrice" label="单价" width="180" />
<el-table-column prop="salePriceAmount" label="金额" width="180" />
<el-table-column prop="stockPlaceName" label="位置" width="180" />
<el-table-column prop="drugGoodsCode" label="编码" width="180" />
<el-table-column prop="drugFormName" label="剂型" width="180" />
<el-table-column prop="packageNum" label="包装数量" width="180" />
<el-table-column prop="maxUnit" label="包装单位" width="180" />
<el-table-column prop="purchasePrice" label="购入价" width="180" />
</el-table>
</div>
</div>
</div>
</div>
</template>
<script setup lang='ts'>
import { is } from 'core-js/core/object'
import { getCurrentInstance, onBeforeMount, onMounted, reactive,ref } from 'vue'
// const { proxy } = getCurrentInstance();
const emits = defineEmits([])
const props = defineProps({
})
const state = reactive({
})
// 1111
const searchForm=reactive({
status:'1',
type: '0',
dateRange: [new Date(), new Date()],
window: '0',
})
const handleSearch = () => {
console.log(searchForm)
treedata.value = [{
label: '内科',
id: 1,
children: [
{
label: '唐僧',
id: 11
},
],
}]
tableDataDetails.value=[ {
patName: '唐僧',
patBed: '1-3',
receiveOrgName: '心内科',
drugGoodsName: '维生素E软胶囊',
drugSpec: '50mg*60粒/瓶',
applyNumStr: '1瓶',
manufactureName: '浙江医药股份有限公司新昌制药厂',
dosage: '50',
dosageUnitName: 'mg',
usageName: '口服',
salePrice: 19,
salePriceAmount: 19.0000,
stockPlaceName: null,
drugGoodsCode: '331408',
drugFormName: '软胶囊',
packageNum: 60,
maxUnit: '瓶',
purchasePrice: 19,
}
]
tableData.value=[ {
patName: '唐僧',
patBed: '1-3',
receiveOrgName: '心内科',
drugGoodsName: '维生素E软胶囊',
drugSpec: '50mg*60粒/瓶',
applyNumStr: '1瓶',
manufactureName: '浙江医药股份有限公司新昌制药厂',
dosage: '50',
dosageUnitName: 'mg',
usageName: '口服',
salePrice: 19,
salePriceAmount: 19.0000,
stockPlaceName: null,
drugGoodsCode: '331408',
drugFormName: '软胶囊',
packageNum: 60,
maxUnit: '瓶',
purchasePrice: 19,
}, {
patName: '唐僧',
patBed: '1-3',
receiveOrgName: '心内科',
drugGoodsName: '5%葡萄糖注射液(直立式聚丙烯)',
drugSpec: '5%*50ml/瓶',
applyNumStr: '2瓶',
manufactureName: '湖南科伦制药有限公司',
dosage: '50',
dosageUnitName: 'ml',
usageName: '静脉注射',
salePrice: 2,
salePriceAmount: 2.0000,
stockPlaceName: null,
drugGoodsCode: '331243',
drugFormName: '注射液',
packageNum: 1,
maxUnit: '瓶',
purchasePrice: 2,
}
]
}
// 2222
const treedata = ref([
{
label: '内科',
id:1,
children: [
{
label: '唐僧',
id: 11
},
],
},
])
const treeRef = ref()
const handleNodeClick=(data)=>{
console.log(data)
treeRef.value.setCheckedKeys([data.id])
}
// 3333
const isAll = ref('1')
const tableData = ref([
{
date: '2023-05-01',
name: '药品1',
age: 10,
gender: '男',
content: '维生素B12注射液【1ml0.5mg*1】 ',
},
])
const tableDataDetails = ref([
{
date: '2023-05-01',
name: '药品1',
age: 10,
gender: '男',
content: '维生素B12注射液【1ml0.5mg*1】 ',
},
])
onBeforeMount(() => {
})
onMounted(() => {
})
defineExpose({ state })
</script>
<style lang="scss" scoped>
.inHospitalDispensing-container{
height: 100%;
width: 100%;
padding: 20px;
display: flex;
flex-direction: column;
.inHospitalDispensing-container-top{
height: 44px;
width: 100%;
padding: 0px 16px;
flex:none;
align-items: center;
display: flex;
}
.inHospitalDispensing-container-bottom{
width: 100%;
height: 300px;
flex:auto;
display: flex;
.inHospitalDispensing-container-bottom-left{
width: 300px;
flex:none
}
.inHospitalDispensing-container-bottom-right{
flex:auto;
width: calc(100% - 300px);
padding: 0px 16px;
.inHospitalDispensing-container-bottom-right-top{
height: 44px;
width: calc(100% - 32px);
padding: 0px 16px;
align-items: center;
flex:none;
display: flex;
justify-content: space-between;
}
.inHospitalDispensing-container-bottom-right-bottom{
flex:auto;
height: 100%;
width: 100%;
background-color: #fff;
}
}
}
}
</style>

View File

@@ -1,2 +1,261 @@
<template>
</template>
<div class="container">
<el-form :model="state.form">
<div class="record-container">
<div class="title">演示医院</div>
<div class="subtitle">入院记录</div>
<div class="header">
<span>姓名: [<el-input v-model="state.form.name" class="inline-input" />]</span>
<span>性别: [<el-input v-model="state.form.gender" class="inline-input" />]</span>
<span>年龄: [<el-input v-model="state.form.age" class="inline-input" />]</span>
<span>床号: [<el-input v-model="state.form.bedNumber" class="inline-input" />]</span>
<span>科室: [<el-input v-model="state.form.department" class="inline-input" />]</span>
<span>住院号: [<el-input v-model="state.form.inpatientNumber" class="inline-input" />]</span>
</div>
<table class="info-table">
<tr>
<td> <div class="info-td">姓名: [<el-input v-model="state.form.name" />] </div></td>
<td>户口地址: [<el-input v-model="state.form.domicile" />]</td>
</tr>
<tr>
<td>性别: [<el-input v-model="state.form.gender" />]</td>
<td>家庭地址: [<el-input v-model="state.form.homeAddress" />]</td>
</tr>
<tr>
<td>年龄: [<el-input v-model="state.form.age" />]</td>
<td>工作单位: [<el-input v-model="state.form.workUnit" />]</td>
</tr>
<tr>
<td>身份证号: [<el-input v-model="state.form.idCard" />]</td>
<td>入院日期: [<el-input v-model="state.form.admissionDate" />]</td>
</tr>
<tr>
<td>婚姻: [<el-input v-model="state.form.maritalStatus" />]</td>
<td>病历书写时间: [<el-input v-model="state.form.medicalHistoryWritingTime" />]</td>
</tr>
<tr>
<td>民族: [<el-input v-model="state.form.nation" />]</td>
<td>病史陈述者: [<el-input v-model="state.form.medicalHistoryNarrator" />]</td>
</tr>
<tr>
<td>职业: [<el-input v-model="state.form.occupation" />]</td>
<td colspan="2">联系人: [<el-input style="width: 40%;" v-model="state.form.contactPerson" class="inline-input-table" />] 关系: [<el-input style="width: 40%;" v-model="state.form.relationship" class="inline-input-table" />]</td>
</tr>
<tr>
<td>电话: [<el-input v-model="state.form.phone" />]</td>
<td>可靠程度: [<el-input v-model="state.form.reliability" />]</td>
</tr>
</table>
<div class="section">
<div class="section-title">主诉:</div>
<div class="section-content"><el-input v-model="state.form.chiefComplaint" type="textarea"/></div>
</div>
<div class="section">
<div class="section-title">现病史:</div>
<div class="section-content"><el-input v-model="state.form.presentIllness" type="textarea" /></div>
</div>
<div class="section">
<div class="section-title">既往史:</div>
<div class="section-content"><el-input v-model="state.form.pastHistory" type="textarea" /></div>
</div>
<div class="section">
<div class="section-title">个人史:</div>
<div class="section-content"><el-input v-model="state.form.personalHistory" type="textarea" /></div>
</div>
<div class="section">
<div class="section-title">婚育史:</div>
<div class="section-content"><el-input v-model="state.form.maritalHistory" type="textarea" /></div>
</div>
<div class="section">
<div class="section-title">家族史:</div>
<div class="section-content"><el-input v-model="state.form.familyHistory" type="textarea" /></div>
</div>
<div class="section">
<div class="section-title">体格检查</div>
<div class="section-content">
体温: , 脉搏: /, 呼吸: /, 血压: mmHg <br>
神志清,精神尚可,发育正常营养中等,自主体位,步入病区,查体合作,全身皮肤粘膜无黄染及出血点,全身浅表淋巴结未触及肿大头颅发育正常,五官端正,颜面无浮肿,眼睑无苍白,巩膜无黄染,双瞳孔等大等圆,直径约3mm,对光反应灵敏耳廓对称无畸形,外耳道无分泌物鼻通气畅,各鼻窦区无压痛口唇无紫绀,咽无充血,扁桃体不大颈对称,未见颈静脉怒张,颈软,气管居中,甲状腺稍大胸廓对称无畸形,两侧胸廓呼吸动度一致,语颤一致 <br>
两肺叩呈清音,双肺呼吸音清,未闻及干湿性啰音心前区无隆起,心尖搏动不明显,心界正常,心率80次/,律齐,心音正常,各瓣膜听诊区未闻及病理性杂音腹平坦,未见腹型及蠕动波,无腹壁静脉曲张,腹软,全腹无压痛,肝脾肋下未触及,未扪及包块,移动性浊音未叩出,双肾区无隆起,双侧肾脏未触及,双肾区无叩击痛,双侧输尿管走行区无压痛,肠鸣音正常肛门外生殖器未查脊柱四肢无畸形, 活动自如,双下肢无水肿生理反射存在,病理反射未引出
</div>
</div>
<div class="section">
<div class="section-title">专科检查:</div>
<div class="section-content"><el-input v-model="state.form.specialtyCheck" type="textarea" /></div>
</div>
<div class="section">
<div class="section-title">辅助检查:</div>
<div class="section-content"><el-input v-model="state.form.auxiliaryCheck" /></div>
</div>
<div class="footer">
<div> <span style="">初步诊断: [</span><el-input v-model="state.form.preliminaryDiagnosis" />]</div>
<div> <span style="">医师签名: [</span><el-input v-model="state.form.doctorSignature" />]</div>
<div> <span style="">书写时间: [</span><el-input v-model="state.form.writingTime" />]</div>
</div>
</div>
</el-form>
</div>
</template>
<script setup >
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue'
const { proxy } = getCurrentInstance();
const emits = defineEmits([]);
const props = defineProps({})
const state = reactive({
form: {
name: '郭森',
gender: '男',
age: '40岁',
bedNumber: '入院床号',
department: '入院科室',
inpatientNumber: '0010000637',
domicile: '户口地址',
homeAddress: '家庭地址',
workUnit: '工作单位',
idCard: '61010319841004241X',
admissionDate: '2025-02-14 11:05',
maritalStatus: '婚姻状况',
medicalHistoryWritingTime: '病历书写时间',
nation: '民族',
medicalHistoryNarrator: '病史陈述者',
occupation: '职业',
contactPerson: '联系人',
relationship: '关系',
phone: '18691558856',
reliability: '可靠程度',
chiefComplaint: '主诉',
presentIllness: '现病史',
pastHistory: '既往史',
personalHistory: '个人史',
maritalHistory: '婚育史',
familyHistory: '家族史',
specialtyCheck: '请输入',
auxiliaryCheck: '待查',
preliminaryDiagnosis: '请输入',
doctorSignature: '请输入',
writingTime: '请选择时间',
// 增加体温、脉搏、呼吸、血压
temperature: '体温',
pulse: '脉搏',
respiration: '呼吸',
bloodPressure: '血压'
}
})
onBeforeMount(() => {})
onMounted(() => {})
defineExpose({ state })
</script>
<style lang="scss" scoped>
.container {
background-color: #f5f5f5;
padding: 20px;
}
.record-container {
width: 1200px;
margin: 0 auto;
border: 2px solid #000;
padding: 20px;
background-color: #fff;
}
.title {
font-size: 28px;
font-weight: bold;
text-align: center;
}
.subtitle {
font-size: 22px;
font-weight: bold;
text-align: center;
margin-bottom: 15px;
}
.header {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
border-bottom: 1px solid #000;
padding-bottom: 5px;
}
.info-table {
width: 100%;
border-collapse: collapse;
margin-bottom: 15px;
td {
border: 1px solid #000;
padding: 8px;
font-size: 14px;
:deep(.el-input) {
width: 80% ;
}
}
}
.content {
margin-bottom: 15px;
}
.content-title {
font-weight: bold;
font-size: 16px;
margin-bottom: 5px;
}
.content-text {
font-size: 14px;
line-height: 1.6;
}
.signature {
margin-top: 30px;
text-align: right;
}
.section {
margin-bottom: 15px;
}
.section-title {
font-weight: bold;
font-size: 16px;
margin-bottom: 5px;
}
.section-content {
font-size: 14px;
line-height: 1.6;
}
.footer {
margin-top: 30px;
display: flex;
flex-direction: column;
align-items: flex-end;
>div {
width:260px;
margin-bottom: 10px;
font-size: 14px;
display: flex;
align-items: center;
>span{
display: inline-block;
width: 100px;
flex:none;
}
}
}
.inline-input {
width: 100px;
display: inline-block;
}
.inline-input-table {
width: 150px;
display: inline-block;
}
:deep(.el-input__wrapper) {
box-shadow: none !important;
border: none;
background-color: transparent;
}
:deep(.el-textarea__inner) {
box-shadow: none !important;
border: 1px solid #dcdfe6;
background-color: transparent;
}
</style>

View File

@@ -1,5 +0,0 @@
<template>
</template>
<script>
</script>

View File

@@ -1,5 +0,0 @@
<template>
</template>
<script>
</script>

View File

@@ -1,5 +0,0 @@
<template>
</template>
<script>
</script>

View File

@@ -1,5 +0,0 @@
<template>
</template>
<script>
</script>

View File

@@ -0,0 +1,53 @@
/*
* @Author: sjjh
* @Date: 2025-09-07 12:09:26
* @Description:
*/
import request from '@/utils/request'
// 申请单相关接口
/**
* 查询检查申请单
*/
export function getCheck(queryParams) {
return request({
url: '/reg-doctorstation/request-form/get-check',
method: 'get',
params: queryParams
})
}
/**
* 查询检验申请单
*/
export function getInspection(queryParams) {
return request({
url: '/reg-doctorstation/request-form/get-inspection',
method: 'get',
params: queryParams
})
}
/**
* 查询输血申请单
*/
export function getBloodTransfusion(queryParams) {
return request({
url: '/reg-doctorstation/request-form/get-blood-transfusion',
method: 'get',
params: queryParams
})
}
/**
* 查询手术申请单
*/
export function getSurgery(queryParams) {
return request({
url: '/reg-doctorstation/request-form/get-surgery',
method: 'get',
params: queryParams
})
}

View File

@@ -0,0 +1,87 @@
<template>
<div class="applicationShow-container">
<div class="applicationShow-container-header">
<el-button @click="getInfo">刷新</el-button>
</div>
<div class="applicationShow-container-content">
<el-descriptions title="输血申请详情" :column="2">
<el-descriptions-item label="Username">kooriookami</el-descriptions-item>
<el-descriptions-item label="患者姓名">{{ patientInfoValue?.patientName || '-' }}</el-descriptions-item>
<el-descriptions-item label="患者性别">{{ patientInfoValue?.patientSex || '-' }}</el-descriptions-item>
<el-descriptions-item label="患者年龄">{{ patientInfoValue?.patientAge || '-' }}</el-descriptions-item>
<el-descriptions-item label="患者手机号">{{ patientInfoValue?.patientPhone || '-' }}</el-descriptions-item>
<el-descriptions-item label="患者身份证号">{{ patientInfoValue?.patientIdCard || '-' }}</el-descriptions-item>
<el-descriptions-item label="患者地址">{{ patientInfoValue?.patientAddress || '-' }}</el-descriptions-item>
</el-descriptions>
</div>
<div class="applicationShow-container-table">
<el-table :data="dataList">
<el-table-column label="医嘱名称" prop="adviceName" />
<el-table-column label="输血数量" prop="adviceDefinitionId" />
</el-table>
</div>
</div>
</template>
<script setup>
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref, computed } from 'vue'
import { getBloodTransfusion } from './api';
import { patientInfo } from '../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits([])
const props = defineProps({
})
const state = reactive({
})
// 使用计算属性确保安全访问
const patientInfoValue = computed(() => {
return patientInfo.value || {};
});
const dataList = ref([])
const getInfo = () => {
if (patientInfo.value?.inHospitalOrgId) {
getBloodTransfusion({
encounterId: patientInfo.value.encounterId,
}).then((res) => {
if (res.code === 200) {
dataList.value = res.data
} else {
}
});
}
};
onBeforeMount(() => {
})
onMounted(() => {
getInfo()
})
defineExpose({ state })
</script>
<style lang="scss" scoped>
.applicationShow-container {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
.applicationShow-container-header{
height: 44px;
display: flex;
align-items: center;
gap:8px;
padding: 0 16px;
}
.applicationShow-container-content{
flex: 1;
}
.applicationShow-container-table{
height: 400px;
flex:auto
}
}
</style>

View File

@@ -0,0 +1,45 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 21:16:06
* @Description: 检查申请详情
-->
<template>
<div class="container">
<el-button @click="getInfo">查询</el-button>
</div>
</template>
<script setup >
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue'
import { getCheck } from './api';
import { patientInfo } from '../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits([])
const props = defineProps({
})
const state = reactive({
})
const getInfo = () => {
if (patientInfo.value?.inHospitalOrgId) {
getCheck({
encounterId: patientInfo.value.encounterId,
}).then((res) => {
if (res.code === 200) {
} else {
}
});
}
};
onBeforeMount(() => {
})
onMounted(() => {
getInfo()
})
defineExpose({ state })
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,36 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 21:16:06
* @Description: 手术申请详情
-->
<template>
<div class="container">
<el-button @click="getInfo">查询</el-button>
</div>
</template>
<script setup>
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue';
import { getSurgery } from './api';
import { patientInfo } from '../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits([]);
const props = defineProps({});
const state = reactive({});
const getInfo = () => {
if (patientInfo.value?.inHospitalOrgId) {
getSurgery({
encounterId: patientInfo.value.encounterId,
}).then((res) => {
if (res.code === 200) {
} else {
}
});
}
};
onBeforeMount(() => {});
onMounted(() => {
getInfo();
});
defineExpose({ state });
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,37 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 21:16:06
* @Description: 检验申请
-->
<template>
<div class="container">
<el-button @click="getInfo">查询</el-button>
</div>
</template>
<script setup>
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue';
import { getInspection } from './api';
import { patientInfo } from '../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits([]);
const props = defineProps({});
const state = reactive({});
const getInfo = () => {
if (patientInfo.value?.inHospitalOrgId) {
getInspection({
encounterId: patientInfo.value.encounterId,
}).then((res) => {
if (res.code === 200) {
} else {
}
});
}
};
onBeforeMount(() => {});
onMounted(() => {
getInfo();
});
defineExpose({ state });
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,99 @@
import request from '@/utils/request'
// 申请单相关接口
//医嘱大下拉
export function getApplicationList(queryParams) {
return request({
url: '/doctor-station/advice/advice-base-info',
method: 'get',
params: queryParams
})
}
/**
* 保存检查申请单
*/
export function saveCheckd(data) {
return request({
url: '/reg-doctorstation/request-form/save-check',
method: 'post',
data: data
})
}
/**
* 保存检验申请单
*/
export function saveInspection(data) {
return request({
url: '/reg-doctorstation/request-form/save-inspection',
method: 'post',
data: data
})
}
/**
* 保存输血申请单
*/
export function saveBloodTransfusio(data) {
return request({
url: '/reg-doctorstation/request-form/save-blood-transfusio',
method: 'post',
data: data
})
}
/**
* 保存手术申请单
*/
export function saveSurgery(data) {
return request({
url: '/reg-doctorstation/request-form/save-surgery',
method: 'post',
data: data
})
}
// =====
/**
* 查询检查申请单
*/
export function getCheck(data) {
return request({
url: '/reg-doctorstation/request-form/get-check',
method: 'get',
params: data
})
}
/**
* 查询检验申请单
*/
export function getInspection(data) {
return request({
url: '/reg-doctorstation/request-form/get-inspection',
method: 'get',
params: data
})
}
/**
* 查询输血申请单
*/
export function getBloodTransfusion(data) {
return request({
url: '/reg-doctorstation/request-form/get-blood-transfusion',
method: 'get',
params: data
})
}
/**
* 查询手术申请单
*/
export function geturger(data) {
return request({
url: '/reg-doctorstation/request-form/get-surgery',
method: 'get',
params: data
})
}

View File

@@ -0,0 +1,143 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 22:32:17
* @Description: 申请单 检验检查输血手术
-->
<template>
<div class="applicationForm-bottom-btn">
<el-button-group>
<el-button
type="primary"
@click="showApplicationFormDialog('LaboratoryTests')"
:disabled="!patientInfo?.inHospitalOrgId"
>检验</el-button
>
<el-button
type="primary"
@click="showApplicationFormDialog('MedicalExaminations')"
:disabled="!patientInfo?.inHospitalOrgId"
>检查</el-button
>
<el-button
type="primary"
@click="showApplicationFormDialog('BloodTransfusion')"
:disabled="!patientInfo?.inHospitalOrgId"
>输血</el-button
>
<el-button
type="primary"
@click="showApplicationFormDialog('Surgery')"
:disabled="!patientInfo?.inHospitalOrgId"
>手术</el-button
>
</el-button-group>
</div>
<el-dialog
v-model="applicationFormDialogVisible"
destroy-on-close
width="1000px"
:close-on-click-modal="false"
:title="applicationFormTitle"
@close="closeDialog"
>
<component
:is="applicationFormName"
@submitOk="submitOk"
ref="applicationFormNameRef"
></component>
<template #footer>
<div class="dialog-footer">
<el-button @click="applicationFormDialogVisible = false">取消</el-button>
<el-button type="primary" @click="submitApplicationForm"> 确认 </el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref, computed } from 'vue';
import BloodTransfusion from './bloodTransfusion.vue';
import { patientInfo } from '../../../store/patient.js';
import Surgery from './surgery.vue';
import LaboratoryTests from './LaboratoryTests.vue';
import MedicalExaminations from './medicalExaminations.vue';
const { proxy } = getCurrentInstance();
const emits = defineEmits([]);
const props = defineProps({});
const state = reactive({});
const components = ref({
BloodTransfusion,
Surgery,
LaboratoryTests,
MedicalExaminations,
});
const applicationFormName = ref(null);
const applicationFormDialogVisible = ref(false);
const applicationFormTitle = computed(() => {
const titleMap = {
BloodTransfusion: '输血申请单',
Surgery: '手术申请单',
LaboratoryTests: '检验申请单',
MedicalExaminations: '检查申请单',
};
return titleMap[applicationFormName.value?.name] || '申请单';
});
const closeDialog = () => {
applicationFormName.value = null;
applicationFormDialogVisible.value = false;
}
const showApplicationFormDialog = (name) => {
if (!components.value[name]) {
console.warn(`未找到组件: ${name}`);
return;
}
// 如果点击的是当前已打开的组件,则关闭
if (applicationFormName.value === components.value[name]) {
applicationFormDialogVisible.value = false;
applicationFormName.value = null;
return;
}
// 如果当前弹窗已打开,先关闭当前弹窗,延迟后打开新的弹窗
if (applicationFormDialogVisible.value) {
applicationFormDialogVisible.value = false;
setTimeout(() => {
applicationFormName.value = components.value[name];
applicationFormDialogVisible.value = true;
}, 150);
} else {
applicationFormName.value = components.value[name];
applicationFormDialogVisible.value = true;
}
};
onBeforeMount(() => {});
onMounted(() => {});
const applicationFormNameRef = ref();
const submitApplicationForm = () => {
console.log(applicationFormNameRef.value);
if (applicationFormNameRef.value?.submit) {
applicationFormNameRef.value.submit();
}
};
const submitOk = () => {
debugger;
applicationFormDialogVisible.value = false;
applicationFormName.value = null;
};
defineExpose({ state });
</script>
<style lang="scss" scoped>
.applicationForm-bottom-btn {
display: flex;
justify-content: center;
align-items: center;
padding: 8px 0;
.el-button-group {
.el-button {
margin: 0 2px;
}
}
}
</style>

View File

@@ -0,0 +1,170 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 22:37:10
* @Description: 输血申请
-->
<template>
<div class="bloodTransfusion-container">
<el-transfer v-model="transferValue" :data="applicationList" filter-placeholder="项目代码/名称" filterable
:titles="['未选择', '已选择']" />
<div class="bloodTransfusion-form">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px" class="demo-ruleForm">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="项目类别" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发往科室" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="症状" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="体征" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="临床诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="其他诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="相关结果" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="注意事项" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template>
<script setup name="BloodTransfusion">
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref } from 'vue';
import { patientInfo } from '../../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits(['submitOk']);
const props = defineProps({});
import { getApplicationList, saveBloodTransfusio } from './api';
const state = reactive({});
const applicationListAll = ref();
const applicationList = ref();
const getList = () => {
if (patientInfo.value?.inHospitalOrgId) {
getApplicationList({
pageSize: 10000,
pageNum: 1,
categoryCode: '28',
organizationId: patientInfo.value.inHospitalOrgId,
adviceTypes: '3', //1 药品 2耗材 3诊疗
}).then((res) => {
if (res.code === 200) {
applicationListAll.value = res.data.records;
applicationList.value = res.data.records.map((item) => {
return {
label: item.adviceName + item.adviceDefinitionId,
key: item.adviceDefinitionId,
};
});
} else {
proxy.$message.error(res.message);
applicationList.value = [];
}
});
}
};
const transferValue = ref([]);
const form = reactive({
patientName: '',
patientSex: '',
patientAge: '',
patientPhone: '',
patientAddress: '',
});
const rules = reactive({});
onBeforeMount(() => { });
onMounted(() => {
getList();
});
const submit = () => {
if (transferValue.value.length == 0) {
return proxy.$message.error('请选择申请单');
}
let applicationListAllFilter = applicationListAll.value.filter((item) => {
return transferValue.value.includes(item.adviceDefinitionId);
});
applicationListAllFilter = applicationListAllFilter.map((item) => {
return {
adviceDefinitionId: item.adviceDefinitionId, /** 诊疗定义id */
quantity: 1,// /** 请求数量 */
unitCode: item.priceList[0].unitCode, /** 请求单位编码 */
unitPrice: item.priceList[0].price, /** 单价 */
totalPrice: item.priceList[0].price, /** 总价 */
positionId: item.positionId,//执行科室id
ybClassEnum: item.ybClassEnum,//类别医保编码
conditionId: item.conditionId,//诊断ID
encounterDiagnosisId: item.encounterDiagnosisId,//就诊诊断id
adviceType: item.adviceType,///** 医嘱类型 */
definitionId: item.priceList[0].definitionId,//费用定价主表ID */
definitionDetailId: item.definitionDetailId,//费用定价子表ID */
accountId: patientInfo.value.accountId,// // 账户id
};
});
saveBloodTransfusio({
activityList: applicationListAllFilter,
patientId: patientInfo.value.patientId, //患者ID
encounterId: patientInfo.value.encounterId, // 就诊ID
organizationId: patientInfo.value.inHospitalOrgId, // 医疗机构ID
requestFormId: '', // 申请单ID
name: '输血申请单',
descJson: JSON.stringify(form),
categoryEnum: '1', // 1 检验 2 检查 3 输血 4 手术
}).then((res) => {
if (res.code === 200) {
proxy.$message.success(res.msg);
applicationList.value = [];
emits('submitOk');
} else {
proxy.$message.error(res.message);
}
});
};
defineExpose({ state, submit });
</script>
<style lang="scss" scoped>
.bloodTransfusion-container {
.el-transfer {
--el-transfer-panel-width: 400px !important;
}
height: 100%;
width: 100%;
.bloodTransfusion-form {
padding: 8px 8px 0 8px;
height: 100%;
width: 100%;
display: flex;
}
}
</style>

View File

@@ -0,0 +1,169 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 22:31:58
* @Description: 检验
-->
<template>
<div class="LaboratoryTests-container">
<el-transfer
v-model="transferValue"
:data="applicationList"
filter-placeholder="项目代码/名称"
filterable
:titles="['未选择', '已选择']"
/>
<div class="bloodTransfusion-form">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px" class="demo-ruleForm">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="项目类别" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发往科室" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="症状" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="体征" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="临床诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="其他诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="相关结果" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="注意事项" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template>
<script setup name="LaboratoryTests">
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue';
import { patientInfo } from '../../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits(['submitOk']);
const props = defineProps({});
import { getApplicationList, saveCheckd } from './api';
const state = reactive({});
const applicationListAll = ref();
const applicationList = ref();
const getList = () => {
if (patientInfo.value?.inHospitalOrgId) {
getApplicationList({
pageSize: 10000,
pageNum: 1,
categoryCode: '23',
organizationId: patientInfo.value.inHospitalOrgId,
adviceTypes: '3', //1 药品 2耗材 3诊疗
}).then((res) => {
if (res.code === 200) {
applicationListAll.value = res.data.records;
applicationList.value = res.data.records.map((item) => {
return {
label: item.adviceName + item.adviceDefinitionId,
key: item.adviceDefinitionId,
};
});
} else {
proxy.$message.error(res.message);
applicationList.value = [];
}
});
}
};
const transferValue = ref([]);
const form = reactive({
patientName: '',
patientSex: '',
patientAge: '',
patientPhone: '',
patientAddress: '',
});
const rules = reactive({});
onBeforeMount(() => {});
onMounted(() => {
getList();
});
const submit = () => {
if (transferValue.value.length == 0) {
return proxy.$message.error('请选择申请单');
}
let applicationListAllFilter = applicationListAll.value.filter((item) => {
return transferValue.value.includes(item.adviceDefinitionId);
});
applicationListAllFilter = applicationListAllFilter.map((item) => {
return {
adviceDefinitionId: item.adviceDefinitionId, /** 诊疗定义id */
quantity: 1,// /** 请求数量 */
unitCode: item.priceList[0].unitCode, /** 请求单位编码 */
unitPrice: item.priceList[0].price, /** 单价 */
totalPrice: item.priceList[0].price, /** 总价 */
positionId: item.positionId,//执行科室id
ybClassEnum: item.ybClassEnum,//类别医保编码
conditionId: item.conditionId,//诊断ID
encounterDiagnosisId: item.encounterDiagnosisId,//就诊诊断id
adviceType: item.adviceType,///** 医嘱类型 */
definitionId: item.priceList[0].definitionId,//费用定价主表ID */
definitionDetailId: item.definitionDetailId,//费用定价子表ID */
accountId: patientInfo.value.accountId,// // 账户id
};
});
saveCheckd({
activityList: applicationListAllFilter,
patientId: patientInfo.value.patientId, //患者ID
encounterId: patientInfo.value.encounterId, // 就诊ID
organizationId: patientInfo.value.inHospitalOrgId, // 医疗机构ID
requestFormId: '', // 申请单ID
name: '检查申请单',
descJson: JSON.stringify(form),
categoryEnum: '1', // 1 检验 2 检查 3 输血 4 手术
}).then((res) => {
if (res.code === 200) {
proxy.$message.success(res.msg);
applicationList.value = [];
emits('submitOk');
} else {
proxy.$message.error(res.message);
}
});
};
defineExpose({ state, submit });
</script>
<style lang="scss" scoped>
.LaboratoryTests-container {
.el-transfer {
--el-transfer-panel-width: 400px !important;
}
height: 100%;
width: 100%;
.bloodTransfusion-form {
padding: 8px 8px 0 8px;
height: 100%;
width: 100%;
display: flex;
}
}
</style>

View File

@@ -0,0 +1,180 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 22:35:29
* @Description: 检查
-->
<template>
<div class="medicalExaminations-container">
<el-transfer
v-model="transferValue"
:data="applicationList"
style="width: 100%"
filter-placeholder="项目代码/名称"
filterable
:titles="['未选择', '已选择']"
/>
<div class="bloodTransfusion-form">
<el-form
:model="form"
:rules="rules"
ref="formRef"
label-width="120px"
class="demo-ruleForm"
inline
>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="项目类别" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发往科室" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="症状" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="体征" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="临床诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="其他诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="相关结果" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="注意事项" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template>
<script setup name="MedicalExaminations">
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue';
import { patientInfo } from '../../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits(['submitOk']);
const props = defineProps({});
import { getApplicationList, saveInspection } from './api';
const state = reactive({});
const applicationListAll = ref();
const applicationList = ref();
const getList = () => {
// console.log(patientInfo.value);
if (patientInfo.value?.inHospitalOrgId) {
getApplicationList({
pageSize: 10000,
pageNum: 1,
categoryCode: '23',
organizationId: patientInfo.value.inHospitalOrgId,
adviceTypes: '3', //1 药品 2耗材 3诊疗
}).then((res) => {
if (res.code === 200) {
applicationListAll.value = res.data.records;
applicationList.value = res.data.records.map((item) => {
return {
label: item.adviceName + item.adviceDefinitionId,
key: item.adviceDefinitionId,
};
});
} else {
proxy.$message.error(res.message);
applicationList.value = [];
}
});
}
};
const transferValue = ref([]);
const form = reactive({
patientName: '',
patientSex: '',
patientAge: '',
patientPhone: '',
patientAddress: '',
});
const rules = reactive({});
onBeforeMount(() => {});
onMounted(() => {
getList();
});
const submit = () => {
if (transferValue.value.length == 0) {
return proxy.$message.error('请选择申请单');
}
let applicationListAllFilter = applicationListAll.value.filter((item) => {
return transferValue.value.includes(item.adviceDefinitionId);
});
applicationListAllFilter = applicationListAllFilter.map((item) => {
return {
adviceDefinitionId: item.adviceDefinitionId, /** 诊疗定义id */
quantity: 1,// /** 请求数量 */
unitCode: item.priceList[0].unitCode, /** 请求单位编码 */
unitPrice: item.priceList[0].price, /** 单价 */
totalPrice: item.priceList[0].price, /** 总价 */
positionId: item.positionId,//执行科室id
ybClassEnum: item.ybClassEnum,//类别医保编码
conditionId: item.conditionId,//诊断ID
encounterDiagnosisId: item.encounterDiagnosisId,//就诊诊断id
adviceType: item.adviceType,///** 医嘱类型 */
definitionId: item.priceList[0].definitionId,//费用定价主表ID */
definitionDetailId: item.definitionDetailId,//费用定价子表ID */
accountId: patientInfo.value.accountId,// // 账户id
};
});
saveInspection({
activityList: applicationListAllFilter,
patientId: patientInfo.value.patientId, //患者ID
encounterId: patientInfo.value.encounterId, // 就诊ID
organizationId: patientInfo.value.inHospitalOrgId, // 医疗机构ID
requestFormId: '', // 申请单ID
name: '检验申请单',
descJson: JSON.stringify(form),
categoryEnum: '1', // 1 检验 2 检查 3 输血 4 手术
}).then((res) => {
if (res.code === 200) {
proxy.$message.success(res.msg);
applicationList.value = [];
emits('submitOk');
} else {
proxy.$message.error(res.message);
}
});
};
defineExpose({ state, submit });
</script>
<style lang="scss" scoped>
.medicalExaminations-container {
.el-transfer {
--el-transfer-panel-width: 400px !important;
}
height: 100%;
width: 100%;
.bloodTransfusion-form {
padding: 8px 8px 0 8px;
height: 100%;
width: 100%;
display: flex;
}
}
</style>

View File

@@ -0,0 +1,175 @@
<!--
* @Author: sjjh
* @Date: 2025-09-05 22:38:55
* @Description: 手术
-->
<template>
<div class="surgery-container">
<el-transfer v-model="value" :data="applicationList" filter-placeholder="项目代码/名称" filterable :titles="['未选择', '已选择']" />
<div class="bloodTransfusion-form">
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px" class="demo-ruleForm">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="项目类别" prop="patientName" style="width:100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发往科室" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="症状" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="体征" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="临床诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="其他诊断" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="相关结果" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="注意事项" prop="patientName" style="width: 100%">
<el-input v-model="form.patientName" autocomplete="off" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template>
<script setup name="Surgery">
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue'
import { patientInfo } from '../../../store/patient.js';
const { proxy } = getCurrentInstance();
const emits = defineEmits(['submitOk'])
const props = defineProps({
})
import { getApplicationList,saveSurgery } from './api'
const state = reactive({
})
const applicationListAll = ref();
const applicationList=ref()
const getList= ()=> {
if (patientInfo.value?.inHospitalOrgId) {
getApplicationList({
pageSize: 10000,
pageNum: 1,
categoryCode: '24',
organizationId: patientInfo.value.inHospitalOrgId,
adviceTypes:'3'//1 药品 2耗材 3诊疗
}
).then((res) => {
if (res.code === 200) {
applicationListAll.value = res.data.records;
applicationList.value = res.data.records.map((item) => {
return {
label: item.adviceName + item.adviceDefinitionId,
key: item.adviceDefinitionId,
};
});
} else {
proxy.$message.error(res.message);
applicationList.value = []
}
})
}
}
const transferValue = ref([]);
const form = reactive({
patientName: '',
patientSex: '',
patientAge: '',
patientPhone: '',
patientAddress: '',
})
const rules = reactive({
})
onBeforeMount(() => {
})
onMounted(() => {
getList()
})
const submit = () => {
if (transferValue.value.length == 0) {
return proxy.$message.error('请选择申请单');
}
let applicationListAllFilter = applicationListAll.value.filter((item) => {
return transferValue.value.includes(item.adviceDefinitionId);
});
applicationListAllFilter = applicationListAllFilter.map((item) => {
return {
adviceDefinitionId: item.adviceDefinitionId, /** 诊疗定义id */
quantity: 1,// /** 请求数量 */
unitCode: item.priceList[0].unitCode, /** 请求单位编码 */
unitPrice: item.priceList[0].price, /** 单价 */
totalPrice: item.priceList[0].price, /** 总价 */
positionId: item.positionId,//执行科室id
ybClassEnum: item.ybClassEnum,//类别医保编码
conditionId: item.conditionId,//诊断ID
encounterDiagnosisId: item.encounterDiagnosisId,//就诊诊断id
adviceType: item.adviceType,///** 医嘱类型 */
definitionId: item.priceList[0].definitionId,//费用定价主表ID */
definitionDetailId: item.definitionDetailId,//费用定价子表ID */
accountId: patientInfo.value.accountId,// // 账户id
};
});
saveSurgery({
activityList: applicationListAllFilter,
patientId: patientInfo.value.patientId, //患者ID
encounterId: patientInfo.value.encounterId, // 就诊ID
organizationId: patientInfo.value.inHospitalOrgId, // 医疗机构ID
requestFormId: '', // 申请单ID
name: '检验申请单',
descJson: JSON.stringify(form),
categoryEnum: '1', // 1 检验 2 检查 3 输血 4 手术
}).then((res) => {
if (res.code === 200) {
proxy.$message.success(res.msg);
applicationList.value = [];
emits('submitOk');
} else {
proxy.$message.error(res.message);
}
});
};
defineExpose({ state, submit });
</script>
<style lang="scss" scoped>
.surgery-container {
height: 100%;
padding: 8px;
.el-transfer {
--el-transfer-panel-width: 400px !important;
}
height: 100%;
width: 100%;
.bloodTransfusion-form {
padding: 8px 8px 0 8px;
height: 100%;
width: 100%;
display: flex;
}
}
</style>

View File

@@ -100,30 +100,30 @@ const searchData = reactive({
const cardId = ref('')
// 所有卡片数据
const cardAllData = ref([
{
id: '1',
name: '张三',
sexName: '女',
bedName: '1-1床',
deptNurseName: '护士甲',
crossDeptFlag: false,
criticalCarePatientName: '危',
inpatientCode: '1212121212',
age: '30',
admittedDoctorName: '医生乙',
},
{
id: '2',
name: '李四',
sexName: '男',
bedName: '1-2床',
deptNurseName: '护士甲',
crossDeptFlag: false,
criticalCarePatientName: '重',
inpatientCode: '1212121212',
age: '30',
admittedDoctorName: '医生乙',
},
// {
// id: '1',
// name: '张三',
// sexName: '女',
// bedName: '1-1床',
// deptNurseName: '护士甲',
// crossDeptFlag: false,
// criticalCarePatientName: '危',
// inpatientCode: '1212121212',
// age: '30',
// admittedDoctorName: '医生乙',
// },
// {
// id: '2',
// name: '李四',
// sexName: '男',
// bedName: '1-2床',
// deptNurseName: '护士甲',
// crossDeptFlag: false,
// criticalCarePatientName: '重',
// inpatientCode: '1212121212',
// age: '30',
// admittedDoctorName: '医生乙',
// },
])
// 过滤后的卡片数据
const filteredCardData = computed(() => {

View File

@@ -0,0 +1,24 @@
/*
* @Author: sjjh
* @Date: 2025-09-20 17:02:37
* @Description:
*/
import request from '@/utils/request'
// 新增记录
export function addRecord(data) {
return request({
url: '/document/record/addRecord',
method: 'post',
data
})
}
// 根据患者ID或就诊ID获取文书记录列表,只针对不需返回患者具体信息的列表,体温单除外,单独处理
export function getRecordByEncounterIdList(params) {
return request({
url: '/document/record/getRecordByEncounterIdList',
method: 'get',
params
})
}

View File

@@ -0,0 +1,104 @@
<template>
<div class="emr-history-container">
<div class="search-box">
<el-input placeholder="病历名称搜索..." v-model="queryParams.searchKey">
<template #append>
<el-button @click="queryList">查询</el-button>
</template>
</el-input>
</div>
<el-scrollbar class="emr-history-scrollbar-container" style="width: 100%">
<div v-for="item in historyData" :key="item.id" class="scrollbar-item">
<el-tooltip
effect="dark"
:content="`${item.definitionId}(${item.recordTime})`"
placement="bottom"
>
<el-text class="w-150px mb-2" truncated @click="handleNodeClick(item)">
{{ item.name }}({{ item.recordTime }})
</el-text>
</el-tooltip>
</div>
</el-scrollbar>
</div>
</template>
<script setup>
import { ref, reactive, defineEmits, unref } from 'vue';
import { getRecordByEncounterIdList } from '../api';
import { ElTree } from 'element-plus';
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
import { patientInfo } from '../../store/patient.js';
const emits = defineEmits(['historyClick']);
const props = defineProps({
definitionId: {
type: String,
default: '',
},
});
const definitionId = defineModel('definitionId', {
type: String,
default: '',
});
const defaultProps = {
children: 'children',
label: 'name',
};
const queryParams = ref({
searchKey: '',
isPage: 0,
});
const historyData = ref([]);
const queryList = async () => {
try {
if (patientInfo.value.encounterId && unref(definitionId)&&unref(definitionId) !== '') {
const res = await getRecordByEncounterIdList({
...queryParams.value,
encounterId: patientInfo.value.encounterId,
patientId: patientInfo.value.patientId,
definitionId: unref(definitionId),
});
historyData.value = res.data || [];
}else{
historyData.value = [];
}
} catch (error) {
ElMessage.error('获取模板树失败');
historyData.value = [];
}
};
const handleNodeClick = (data) => {
emits('historyClick', data);
};
const currentSelectTemplate = ref({});
defineExpose({ queryList });
</script>
<style lang="scss" scoped>
.emr-history-container {
height: 100%;
// padding: 8px;
.search-box {
height: 40px;
line-height: 40px;
}
.emr-history-scrollbar-container{
padding: 8px;
height: calc(100% - 40px);
.scrollbar-item {
height: 40px;
line-height: 40px;
border-radius: 4px;
cursor: pointer;
background: var(--el-color-primary-light-9);
& + .scrollbar-item {
margin-top: 8px;
}
}
}
}
</style>

View File

@@ -0,0 +1,265 @@
<!--
* @Author: sjjh
* @Date: 2025-09-18 15:41:10
* @Description: 病历使用首页
-->
<template>
<div class="emr-use-container">
<div class="template-tree-container">
<div class="search-box">
<el-input placeholder="病历名称搜索..." v-model="queryParams.name">
<template #append>
<el-button @click="queryTemplateTree">查询</el-button>
</template>
</el-input>
</div>
<el-scrollbar class="template-tree-scrollbar">
<el-tree
ref="templateTree"
:data="templateData"
:props="defaultProps"
auto-expand-parent
node-key="id"
@node-click="handleNodeClick"
class="template-tree"
></el-tree>
</el-scrollbar>
</div>
<div class="operate-container">
<div class="operate-btns">
<el-space>
<el-button type="primary" @click="newEmr">新建</el-button>
<el-button type="primary" @click="saveAsModel">存为模版</el-button>
<el-button @click="refresh">刷新</el-button>
<el-button type="danger" @click="deleteEmr">删除</el-button>
<el-button type="primary" @click="save">保存</el-button>
</el-space>
</div>
<div class="operate-main">
<el-scrollbar class="template-tree-scrollbar">
<component :is="currentComponent" ref="emrComponentRef" @submitOk="handleSubmitOk" />
</el-scrollbar>
</div>
</div>
<div class="quickly-container">
<el-tabs v-model="quicklyactiveName" type="card">
<el-tab-pane label="历史" name="history">
<History @historyClick="handleHistoryClick" ref="historyRef" v-model:definitionId="currentSelectTemplate.id" />
</el-tab-pane>
<el-tab-pane label="模版" name="model">模版</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script setup>
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref } from 'vue';
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus';
import { getTreeList } from '@/views/basicmanage/caseTemplates/api';
import { addRecord } from './api';
import { patientInfo } from '../store/patient.js';
import dayjs from 'dayjs';
// 移除未使用的变量
// const { proxy } = getCurrentInstance();
const emits = defineEmits([]);
const props = defineProps({});
const state = reactive({});
import History from './components/history';
// 定义响应式变量
const templateData = ref([]);
const queryParams = ref({
name: '',
});
const currentSelectTemplate = ref({
id:''
});
const currentComponent = ref('');
const emrComponentRef = ref(null);
const quicklyactiveName = ref('history');
// 树配置(模板树)
const defaultProps = {
children: 'children',
label: 'name',
value: 'id',
};
/** 初始化病历模板树(按科室筛选) */
const queryTemplateTree = async () => {
try {
const res = await getTreeList(queryParams.value);
templateData.value = res.data || [];
} catch (error) {
ElMessage.error('获取模板树失败');
templateData.value = [];
}
};
// 处理节点点击,根据后台返回的路径加载组件
const handleNodeClick = (data, node) => {
if (node.isLeaf) {
// 存储当前节点数据
currentSelectTemplate.value = data.document;
// currentComponent.value = data.document.vueRouter || '';
} else {
currentSelectTemplate.value = {
id:''
};
// currentComponent.value = null;
}
historyRef.value?.queryList();
};
const newEmr = () => {
if (currentSelectTemplate.value) {
currentComponent.value = currentSelectTemplate.value.vueRouter || '';
return;
}
ElMessage.error('请选择模版!');
};
const saveAsModel = async () => {
try {
await emrComponentRef.value?.submit();
ElMessage.success('成功!');
} catch (error) {
ElMessage.error('存为模版失败');
}
};
const editForm = ref({
id: '',
definitionId: '',
definitionBusNo: '',
contentJson: '',
statusEnum: 1, // 0草稿/暂存 1提交 2归档 3修改
organizationId: 0,
encounterId: '',
patientId:'',
recordTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
createBy: '',
source: '',
});
const handleSubmitOk = async (data) => {
try {
// debugger;
if (!patientInfo.value?.encounterId || !patientInfo.value?.patientId) {
ElMessage.error('请先选择患者!');
return;
}
editForm.value.definitionId = currentSelectTemplate.value.id;
editForm.value.definitionBusNo = currentSelectTemplate.value.busNo;
editForm.value.contentJson = JSON.stringify(data);
editForm.value.encounterId = patientInfo.value.encounterId;
editForm.value.patientId = patientInfo.value.patientId;
editForm.value.recordTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
await addRecord(editForm.value);
ElMessage.success('提交成功');
historyRef.value?.queryList();
} catch (error) {
ElMessage.error('提交失败');
console.log(error);
}
};
const refresh = () => {
queryTemplateTree();
historyRef.value?.queryList();
};
const deleteEmr = async () => {
try {
// 这里应该添加实际的删除逻辑
ElMessage.success('删除成功!');
} catch (error) {
ElMessage.error('删除失败');
}
};
const save = async () => {
// try {
await emrComponentRef.value?.submit();
// } catch (error) {
// ElMessage.error('保存失败');
// }
};
const historyRef = ref(null);
const handleHistoryClick= (data) => {
console.log(data);
newEmr();
editForm.value= data;
nextTick(() => {
emrComponentRef.value?.setFormData(JSON.parse(editForm.value.contentJson));
})
}
// 移除空的生命周期钩子
// onBeforeMount(() => {});
onMounted(() => {
queryTemplateTree();
});
defineExpose({ state });
</script>
<style lang="scss" scoped>
.emr-use-container {
display: flex;
height: 100%;
.template-tree-container {
border-right: 1px solid #ebeef5;
width: 300px;
flex: none;
height: 100%;
padding: 0 8px 8px 0;
display: flex;
flex-direction: column;
.search-box {
height: 40px;
display: flex;
align-items: center;
flex: none;
border-bottom: 1px solid #ebeef5;
}
.template-tree-scrollbar {
height: calc(100% - 48px);
flex: auto;
}
}
.operate-container {
width: 300px;
flex: auto;
display: flex;
flex-direction: column;
padding: 0 8px 8px 8px;
.operate-btns {
height: 40px;
flex: none;
display: flex;
align-items: center;
border-bottom: 1px solid #ebeef5;
}
.operate-main {
height: calc(100% - 40px);
flex: auto;
}
}
.quickly-container {
border-left: 1px solid #ebeef5;
width: 300px;
padding: 0 8px 8px 8px;
flex: none;
.el-tabs{
height: 100%;
}
}
}
</style>

View File

@@ -7,8 +7,8 @@ import PatientList from './components/patientList.vue'
import PatientCard from './components/patientCard/index.vue'
import Advice from './components/order/index.vue'
import Diagnose from './components/diagnosis/diagnosis.vue'
import BloodTtransfusionAapplication from './components/applicationForm/bloodTtransfusionAapplication.vue'
import ExamineApplication from './components/applicationForm/examineApplication.vue'
import SurgeryApplication from './components/applicationForm/surgeryApplication.vue'
import TestApplication from './components/applicationForm/testApplication.vue'
import BloodTtransfusionAapplication from './components/applicationShow/bloodTtransfusionAapplication.vue'
import ExamineApplication from './components/applicationShow/examineApplication.vue'
import SurgeryApplication from './components/applicationShow/surgeryApplication.vue'
import TestApplication from './components/applicationShow/testApplication.vue'
export { PatientList, PatientCard, Advice,Diagnose, BloodTtransfusionAapplication, ExamineApplication, SurgeryApplication, TestApplication }

View File

@@ -21,7 +21,9 @@
<el-tab-pane label="诊断录入" name="diagnosis">
<Diagnose ref="diagnosisRef" :patientInfo="patientInfo" />
</el-tab-pane>
<el-tab-pane label="住院病历" name="emr">Role</el-tab-pane>
<el-tab-pane label="住院病历" name="emr">
<emr />
</el-tab-pane>
<el-tab-pane label="医技报告" name="fourth">Task</el-tab-pane>
<el-tab-pane label="检验申请" name="test">
<TestApplication />
@@ -46,6 +48,7 @@ import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref } from 'vue
// const { proxy } = getCurrentInstance()
// const emits = defineEmits([])
// const props = defineProps({})
import Emr from "./emr/index.vue";
import inPatientBarDoctorFold from '@/components/patientBar/inPatientBarDoctorFold.vue';
import {
PatientList,

View File

@@ -40,6 +40,7 @@
</div>
<div class="medicalOrderList-table">
<el-table :data="drugDistributionDetailData" v-if="searchForm.isDetails == '1'" row-key="id"
default-expand-all
style="width: 100%; height: 100%" border :span-method="arraySpanMethod" show-overflow-tooltip>
<el-table-column type="selection" />
<el-table-column label="类型" prop="name" min-width=" 60px">
@@ -129,8 +130,9 @@
</div>
</div>
</template>
<script setup lang="ts">
<script setup >
import { ref } from 'vue';
const searchForm = ref({
drugType: '1',
isDetails: '1',
@@ -155,7 +157,7 @@ const drugDistributionDetailData = ref([
gender: '男',
content: '维生素B12注射液【1ml0.5mg*1】 ',
dates: [{
date: '05/04',
date: '09/04',
times: [{
time: '08:00',
nurse: '刘护士',
@@ -166,7 +168,7 @@ const drugDistributionDetailData = ref([
checked: false
}]
}, {
date: '05/05',
date: '09/05',
times: [{
time: '08:00',
nurse: '刘护士',
@@ -278,7 +280,7 @@ const arraySpanMethod = ({
column,
rowIndex,
columnIndex,
}: any) => {
}) => {
// console.log(row, column, rowIndex, columnIndex);
// 如果是父级行
if (row.children && row.children.length > 0) {

View File

@@ -85,3 +85,11 @@ export function childLocationList(queryParams) {
params: queryParams
})
}
export function getPractitionerWard(queryParams) {
return request({
url: '/app-common/practitioner-ward',
method: 'get',
params: queryParams
})
}

View File

@@ -7,9 +7,9 @@
<el-select v-model="queryParams.wardId" @change="changeWardLocationId">
<el-option
v-for="item in initInfoOptions.wardListOptions"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
@@ -180,7 +180,7 @@
<script setup lang="ts">
import { getCurrentInstance, onBeforeMount, onMounted, reactive, ref, computed } from 'vue'
import { TransferInDialog, SignEntryDialog } from './index'
import { getPendingInfo, getBedInfo, getInit, childLocationList } from './api'
import { getPendingInfo, getBedInfo, getInit, childLocationList, getPractitionerWard } from './api'
import { formatDate } from '@/utils/index';
import { init } from '../../../basicmanage/consumablesBinding/components/api';
import { ElMessage, ElMessageBox } from 'element-plus'
@@ -242,10 +242,13 @@ onMounted(() => {
getInit().then(res => {
initInfoOptions.value = res.data
priorityOptions.value = res.data.priorityOptions || []
queryParams.value.wardId = res.data.wardListOptions[0].value
changeWardLocationId(res.data.wardListOptions[0].value)
getList()
})
getPractitionerWard().then(res => {
queryParams.value.wardId = res[0].id
initInfoOptions.value.wardListOptions = res
changeWardLocationId(res[0].id)
})
})
defineExpose({ state })

View File

@@ -154,6 +154,7 @@
import { getPrescriptionList } from './api';
import { patientInfoList } from '../store/patient.js';
import { formatDate, formatDateStr } from '@/utils/index';
import { ref, getCurrentInstance } from 'vue';
const activeNames = ref([]);
const prescriptionList = ref([]);

View File

@@ -0,0 +1,344 @@
<!--
* @Author: sjjh
* @Date: 2025-09-09 13:49:40
* @Description: 药品发送
-->
<template>
<div class="medicineCollect-container">
<div class="patientList-container">
<el-input v-model="searchValue" style="width: 240px" placeholder="床号/姓名" />
<el-tree
ref="treeRef"
style="max-width: 600px"
default-expand-all
:data="data"
show-checkbox
node-key="id"
@node-click="handleNodeClick"
/></div>
<div class="medicineList-container">
<div class="filter-container">
<el-space>
<el-select v-model="tableFilterForm.type" placeholder="药品类型" style="width: 240px">
<el-option key="1" label="西药" value="1"/>
<el-option key="2" label="中药" value="2"/>
</el-select>
<el-select v-model="tableFilterForm.type" placeholder="医嘱类型" style="width: 240px">
<el-option key="0" label="全部" value="0"/>
<el-option key="1" label="长期" value="1"/>
<el-option key="2" label="临时" value="2"/>
</el-select>
<span>截止时间</span>
<el-date-picker
v-model="tableFilterForm.endTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
/>
<el-select v-model="tableFilterForm.dept" placeholder="领药科室" style="width: 240px">
<el-option key="0" label="住院西药房" value="0"/>
<el-option key="1" label="住院东药房" value="1"/>
<el-option key="2" label="住院北药房" value="2"/>
<el-option key="3" label="住院南药房" value="3"/>
</el-select>
<el-button type="primary" @click="handleSearch">查询</el-button>
<el-button type="primary" @click="collectDrug">领药申请</el-button>
</el-space>
<el-space>
</el-space>
</div>
<el-table :data="collectTsableData" row-key="id" style="width: 100%; height: 100%" border
:span-method="arraySpanMethod">
<el-table-column type="selection" />
<el-table-column label="类型" prop="name" width="140">
<template #default="{ row }">
<span v-if="!row.children">长期/西药</span>
<template v-else>
{{ row.name }} 11 000000001 &nbsp; 林俊杰 /24 &nbsp;1级 自费 主诊断 医生医生甲&nbsp; 预交金1990.3
</template>
</template>
</el-table-column>
<el-table-column label="医嘱内容" prop="content" min-width="300px">
<template #default="{ row }">
<span v-if="row.children">{{ row.content }}</span>
</template>
</el-table-column>
<el-table-column label="用法" prop="gender">
</el-table-column>
<el-table-column label="数量" prop="gender">
</el-table-column>
<el-table-column label="金额" prop="gender">
</el-table-column>
<el-table-column label="领取科室" prop="gender">
</el-table-column>
<el-table-column label="执行时间" prop="gender" min-width="300">
<template #default="{ row }">
<template v-if="!row.children">
<div v-for="item in row.dates" :key="item.id">
<el-space :size="10">
<span>{{ item.date }}</span>
<span v-for="time in item.times" :key="time.id">
<el-checkbox v-model="time.checked" :label="`${time.time}`" border />
</span>
</el-space>
</div>
</template>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script setup >
import { id } from 'element-plus/es/locale/index.mjs';
import { getCurrentInstance, onBeforeMount, onMounted, reactive,ref } from 'vue'
// const { proxy } = getCurrentInstance();
import { ElMessage, ElMessageBox } from 'element-plus'
const emits = defineEmits([])
const props = defineProps({
})
const state = reactive({
})
const data = ref([
{
label: '内科',
id:1,
children: [
{
label: '唐僧',
id:11
},
],
},
])
const searchValue = ref('')
const handleNodeClick=(data)=>{
console.log(data)
treeRef.value.setCheckedKeys([data.id])
}
const treeRef = ref()
// ====表格
const tableFilterForm = ref({
type: '',
name: '',
})
const arraySpanMethod = ({
row,
column,
rowIndex,
columnIndex
}) => {
console.log(row, column, rowIndex, columnIndex);
// 如果是父级行
if (row.children && row.children.length > 0) {
if (columnIndex === 0) {
return [1, 1]
}
// 如果是患者列
if (columnIndex === 1) {
return [1, 7]
} else {
return [1, 0]
}
}
// 如果是子级行,显示其他列
if (!row.children || row.children.length == 0) {
return [1, 1]
}
// 如果是父级行,隐藏其他列
return [1, 1]
}
const collectTsableData = ref([
// {
// id: 1,
// name: '唐僧',
// age: 20,
// gender: '男',
// children: [
// {
// name: '',
// age: 10,
// gender: '男',
// content: '维生素B12注射液【1ml0.5mg*1】 ',
// dates: [{
// date: '05/04',
// times: [{
// time: '08:00',
// nurse: '刘护士',
// checked: false
// }, {
// time: '12:00',
// nurse: '刘护士',
// checked: false
// }]
// }, {
// date: '05/05',
// times: [{
// time: '08:00',
// nurse: '刘护士',
// checked: false
// }, {
// time: '12:00',
// nurse: '刘护士',
// checked: false
// }]
// }]
// }, {
// name: '',
// age: 10,
// gender: '男',
// content: '维生素B12注射液【1ml0.5mg*1】 ',
// dates: [{
// date: '05/04',
// times: [{
// time: '08:00',
// nurse: '刘护士',
// checked: false
// }, {
// time: '12:00',
// nurse: '刘护士',
// checked: false
// }]
// }, {
// date: '05/05',
// times: [{
// time: '08:00',
// nurse: '刘护士',
// checked: false
// }, {
// time: '12:00',
// nurse: '刘护士',
// checked: false
// }]
// }]
// }]
// },
])
const handleSearch = () => {
collectTsableData.value=[{
id: 1,
name: '唐僧',
age: 20,
gender: '男',
children: [
{
name: '',
age: 10,
gender: '男',
content: '维生素B12注射液【1ml0.5mg*1】 ',
dates: [{
date: '05/04',
times: [{
time: '08:00',
nurse: '刘护士',
checked: false
}, {
time: '12:00',
nurse: '刘护士',
checked: false
}]
}, {
date: '05/05',
times: [{
time: '08:00',
nurse: '刘护士',
checked: false
}, {
time: '12:00',
nurse: '刘护士',
checked: false
}]
}]
}, {
name: '',
age: 10,
gender: '男',
content: '维生素B12注射液【1ml0.5mg*1】 ',
dates: [{
date: '05/04',
times: [{
time: '08:00',
nurse: '刘护士',
checked: false
}, {
time: '12:00',
nurse: '刘护士',
checked: false
}]
}, {
date: '05/05',
times: [{
time: '08:00',
nurse: '刘护士',
checked: false
}, {
time: '12:00',
nurse: '刘护士',
checked: false
}]
}]
}]
},
]
}
// ====collectDrug
const collectDrug=()=>{
ElMessageBox.confirm(
'是否确认领药申请?',
'提醒',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
ElMessage({
type: 'success',
message: '申请成功!',
})
collectTsableData.value=[]
})
.catch(() => {
})
}
onBeforeMount(() => {
})
onMounted(() => {
})
defineExpose({ state })
</script>
<style lang="scss" scoped>
.medicineCollect-container{
display: flex;
height: 100%;
padding: 8px;
.patientList-container{
width: 300px;
height: 100%;
}
.medicineList-container{
flex: auto;
.filter-container{
height: 44px;
}
}
}
</style>

View File

@@ -0,0 +1,32 @@
<!--
* @Author: sjjh
* @Date: 2025-09-09 13:49:40
* @Description:
-->
<template>
<div class="container">
</div>
</template>
<script setup >
import { getCurrentInstance, onBeforeMount, onMounted, reactive } from 'vue'
const { proxy } = getCurrentInstance();
const emits = defineEmits([])
const props = defineProps({
})
const state = reactive({
})
onBeforeMount(() => {
})
onMounted(() => {
})
defineExpose({ state })
</script>
<style lang="scss" scoped>
</style>

View File

@@ -51,6 +51,10 @@
/>
</el-select>
</el-form-item>
<el-form-item prop="tenantId">
<span class="descriptions-item-label" style="margin: 0 10px 0 0">连接医保</span>
<el-switch v-model="loginForm.invokeYb" @change="topNavChange" size="large"/>
</el-form-item>
<!--<el-form-item prop="code" v-if="captchaEnabled">
<el-input
v-model="loginForm.code"
@@ -98,7 +102,7 @@
<span><el-link :underline="false">Cookies</el-link></span>
</div>
<span>
<el-link :underline="false">Copyright © 2018-2024 his.vip All Rights Reserved. </el-link>
<el-link :underline="false">Copyright © 2018-2025 his.vip All Rights Reserved. </el-link>
</span>
</div>
</div>
@@ -151,6 +155,17 @@ watch(
{ immediate: true }
);
// 页面加载时从 localStorage 获取 invokeYb 的值
onMounted(() => {
const storedInvokeYb = localStorage.getItem('invokeYb');
if (storedInvokeYb !== null) {
loginForm.value.invokeYb = storedInvokeYb === 'true';
} else {
// 如果 localStorage 中没有值,则设置默认值并保存
localStorage.setItem('invokeYb', 'false');
}
});
function handleLogin() {
proxy.$refs.loginRef.validate((valid) => {
if (valid) {
@@ -179,10 +194,12 @@ function handleLogin() {
}
return acc;
}, {});
if (env === 'development') {
if (env === 'development' || !loginForm.value.invokeYb) {
router.push({ path: redirect.value || '/', query: otherQueryParams });
} else {
router.push({ path: redirect.value || '/', query: otherQueryParams });
signIng.value = true;
userStore.getInfo();
GetMacString();
}
})
.catch(() => {
@@ -262,6 +279,11 @@ function getCode() {
});
}
// 切换医保连接开关时更新 localStorage
function topNavChange(value) {
localStorage.setItem('invokeYb', value.toString());
}
//账号变化时
function handleUsernameChange(newVal) {
getTenantList(newVal);

View File

@@ -979,7 +979,12 @@ function addNewRow() {
}
function submit(value){
form.purchaseinventoryList[currentIndex.value].traceNo = value;
if (form.purchaseinventoryList[currentIndex.value].traceNo) {
form.purchaseinventoryList[currentIndex.value].traceNo =
form.purchaseinventoryList[currentIndex.value].traceNo + ',' + value;
} else {
form.purchaseinventoryList[currentIndex.value].traceNo = value;
}
openTraceNoDialog.value = false;
}
@@ -2139,6 +2144,7 @@ function getbusNo() {
getstocktakingDetail(queryParams.value).then((res) => {
console.log(res.data.records?res.data.records:res.data,1212121)
form.purchaseinventoryList = res.data.records?res.data.records:res.data
receiptHeaderForm.occurrenceTime = formatDate(res.data.records[0].occurrenceTime)
total.value = res.data.total
getDetail(1)
getAllBatchList(2)

View File

@@ -837,7 +837,12 @@ function handleScan(row,index){
}
function submit(value){
form.purchaseinventoryList[currentIndex.value].traceNo = value;
if (form.purchaseinventoryList[currentIndex.value].traceNo) {
form.purchaseinventoryList[currentIndex.value].traceNo =
form.purchaseinventoryList[currentIndex.value].traceNo + ',' + value;
} else {
form.purchaseinventoryList[currentIndex.value].traceNo = value;
}
openTraceNoDialog .value = false;
}
function formatContent(value){
@@ -988,6 +993,7 @@ function getTransferProductDetails(type){
queryParams.value.busNo = receiptHeaderForm.busNo
getstocktakingDetail(queryParams.value).then((res) => {
form.purchaseinventoryList = res.data.records?res.data.records:res.data
receiptHeaderForm.occurrenceTime = formatDate(res.data.records[0].occurrenceTime)
total.value = res.data.total;
form.purchaseinventoryList.map((e,index)=>{
e.isSave = true
@@ -1277,6 +1283,8 @@ function handleLocationClick(purposeLocationId,itemId, index,lotNumber) {
form.purchaseinventoryList[index].unitCode = form.purchaseinventoryList[index].unitList.minUnitCode
form.purchaseinventoryList[index].unitCode_dictText = form.purchaseinventoryList[index].unitList.minUnitCode_dictText
// 这里临时存一下大单位价格 切换到大单位直接取这个值,切换单位会有除不尽的情况,临时处理一下
form.purchaseinventoryList[index].unitPrice = res.data[0].price
// 单价 大单位单价
if(form.purchaseinventoryList[index].unitCode==form.purchaseinventoryList[index].unitList.minUnitCode){
form.purchaseinventoryList[index].price = res.data[0].price / form.purchaseinventoryList[index].partPercent|| "";
@@ -1443,7 +1451,7 @@ function getMaxCounts(row,index,counts){
// form.purchaseinventoryList[index].unitList.minUnitCode_dictText
// }
form.purchaseinventoryList[index].price =
form.purchaseinventoryList[index].price * row.partPercent;
form.purchaseinventoryList[index].unitPrice;
form.purchaseinventoryList[index].price = form.purchaseinventoryList[index].price.toFixed(4);
}
}

View File

@@ -871,6 +871,7 @@ function getTransferProductDetails() {
// 编辑
getTransferProductDetail(receiptHeaderForm.busNo).then((res) => {
form.purchaseinventoryList = res.data;
receiptHeaderForm.occurrenceTime = res.data[0].occurrenceTime ? formatDate(res.data[0].occurrenceTime) : new Date()
form.purchaseinventoryList.map((e, index) => {
e.isSave = true;
form.purchaseinventoryList[index].statusMaxvalue = false;
@@ -1132,7 +1133,8 @@ function selectRow(rowValue, index) {
form.purchaseinventoryList[index].unitList.minUnitCode;
form.purchaseinventoryList[index].unitCode_dictText =
form.purchaseinventoryList[index].unitList.minUnitCode_dictText;
// 存一下大单位价格 切换单位会有除不尽的情况 临时处理一下
form.purchaseinventoryList[index].unitPrice = res.data[0].price
// 单价 大单位单价
if (
form.purchaseinventoryList[index].unitCode ==
@@ -1338,7 +1340,7 @@ function getMaxCounts(row, index, counts) {
}
} else {
form.purchaseinventoryList[index].price =
form.purchaseinventoryList[index].price * row.partPercent;
form.purchaseinventoryList[index].unitPrice;
form.purchaseinventoryList[index].price = form.purchaseinventoryList[index].price.toFixed(4);
}
console.log(form.purchaseinventoryList[index].price, '121212121');

View File

@@ -37,82 +37,82 @@
style="width: 100%"
border
>
<el-table-column prop="locationId_dictText" label="库房" width="180" />
<el-table-column prop="initialAmount" label="期初金额" width="120" align="right" />
<el-table-column prop="finalAmount" label="期末金额" width="120" align="right">
<el-table-column prop="locationId_dictText" label="库房" min-width="150" show-overflow-tooltip />
<el-table-column prop="initialAmount" label="期初金额" min-width="160" align="right" />
<el-table-column prop="finalAmount" label="期末金额" min-width="160" align="right">
<template #default="scope">
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 1)">
{{ scope.row.finalAmount }}
</div>
</template>
</el-table-column>
<el-table-column prop="expectFinalAmount" label="预期期末金额" width="140" align="right" />
<el-table-column prop="offsetAmount" label="偏移量" width="100" align="right" />
<el-table-column prop="purchaseInAmount" label="采购入库金额" width="140" align="right">
<el-table-column prop="expectFinalAmount" label="预期期末金额" min-width="160" align="right" />
<el-table-column prop="offsetAmount" label="偏移量" min-width="100" align="right" />
<el-table-column prop="purchaseInAmount" label="采购入库金额" min-width="120" align="right">
<template #default="scope">
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 2)">
{{ scope.row.purchaseInAmount }}
</div>
</template>
</el-table-column>
<el-table-column prop="purchaseInNumber" label="采购入库单据数" width="140" align="right" />
<el-table-column prop="purchaseReturnAmount" label="采购出库金额" width="140" align="right">
<el-table-column prop="purchaseInNumber" label="采购入库单据数" min-width="120" align="right" />
<el-table-column prop="purchaseReturnAmount" label="采购出库金额" min-width="120" align="right">
<template #default="scope">
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 3)">
{{ scope.row.purchaseReturnAmount }}
</div>
</template>
</el-table-column>
<el-table-column prop="purchaseReturnNumber" label="采购出库单据数" width="140" align="right" />
<el-table-column prop="applyOutAmount" label="领用出库金额" width="140" align="right">
<el-table-column prop="purchaseReturnNumber" label="采购出库单据数" min-width="120" align="right" />
<el-table-column prop="applyOutAmount" label="领用出库金额" min-width="120" align="right">
<template #default="scope">
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 4)">
{{ scope.row.applyOutAmount }}
</div>
</template>
</el-table-column>
<el-table-column prop="applyOutNumber" label="领用出库单据数" width="140" align="right" />
<el-table-column prop="applyReturnAmount" label="领用退货金额" width="140" align="right">
<el-table-column prop="applyOutNumber" label="领用出库单据数" min-width="120" align="right" />
<el-table-column prop="applyReturnAmount" label="领用退货金额" min-width="120" align="right">
<template #default="scope">
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 5)">
{{ scope.row.applyReturnAmount }}
</div>
</template>
</el-table-column>
<el-table-column prop="applyReturnNumber" label="领用退货单据数" width="140" align="right" />
<el-table-column prop="transferInAmount" label="调拨入库金额" width="140" align="right" />
<el-table-column prop="transferInNumber" label="调拨入库单据数" width="140" align="right">
<el-table-column prop="applyReturnNumber" label="领用退货单据数" min-width="120" align="right" />
<el-table-column prop="transferInAmount" label="调拨入库金额" min-width="120" align="right">
<template #default="scope">
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 6)">
{{ scope.row.transferInNumber }}
{{ scope.row.transferInAmount }}
</div>
</template>
</el-table-column>
<el-table-column prop="transferOutAmount" label="调拨出库金额" width="140" align="right">
<el-table-column prop="transferInNumber" label="调拨入库单据数" min-width="120" align="right" />
<el-table-column prop="transferOutAmount" label="调拨出库金额" min-width="120" align="right">
<template #default="scope">
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 6)">
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 10)">
{{ scope.row.transferOutAmount }}
</div>
</template>
</el-table-column>
<el-table-column prop="transferOutNumber" label="调拨出库单据数" width="140" align="right" />
<el-table-column prop="checkProfitLossAmount" label="盘点盈亏金额" width="140" align="right">
<el-table-column prop="transferOutNumber" label="调拨出库单据数" min-width="120" align="right" />
<el-table-column prop="checkProfitLossAmount" label="盘点盈亏金额" min-width="120" align="right">
<template #default="scope">
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 7)">
{{ scope.row.checkProfitLossAmount }}
</div>
</template>
</el-table-column>
<el-table-column prop="checkProfitLossNumber" label="盘点盈亏单据数" width="140" align="right" />
<el-table-column prop="lossAmount" label="报损金额" width="120" align="right">
<el-table-column prop="checkProfitLossNumber" label="盘点盈亏单据数" min-width="120" align="right" />
<el-table-column prop="lossAmount" label="报损金额" min-width="100" align="right">
<template #default="scope">
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 8)">
{{ scope.row.lossAmount }}
</div>
</template>
</el-table-column>
<el-table-column prop="lossNumber" label="报损单据数" width="120" align="right" />
<el-table-column prop="drugIssueAmount" label="药品发放金额" width="140" align="right">
<el-table-column prop="lossNumber" label="报损单据数" min-width="100" align="right" />
<el-table-column prop="drugIssueAmount" label="药品发放金额" min-width="120" align="right">
<template #default="scope">
<div style="color: dodgerblue;cursor: pointer;" @click="skipToPage(scope, 9)">
{{ scope.row.drugIssueAmount }}
@@ -198,15 +198,26 @@ const setDefaultDateRange = () => {
const handleSearch = async () => {
try {
loading.value = true;
// 构建查询参数
// 构建查询参数并拼接时间
const params = {
...searchParams
locationId: searchParams.locationId
};
// 处理开始时间,拼接 00:00:00
if (searchParams.startTime) {
params.startTime = searchParams.startTime + ' 00:00:00';
}
// 处理结束时间,拼接 00:00:00
if (searchParams.endTime) {
params.endTime = searchParams.endTime + ' 00:00:00';
}
// 调用API获取数据实际项目中替换为真实API调用
const response = await getList(params);
loading.value = false;
console.log('查询结果:', response)
reconciliationData.value = [];
reconciliationData.value.push(response.data.data)
} catch (error) {
@@ -252,31 +263,32 @@ const skipToPage = (records, index) => {
let path = '';
switch (index) {
case 1:
path = '/medicationmanagement/chkstock/chkstockPart'; // 盘点
path = '/aa/4/chkstockPartDetails'; // 库存
break;
case 2:
path = '/medicationmanagement/medicationmanagement/purchaseDocument'; // 采购入库页
path = '/aa/4/purchaseDocumentDetsils'; // 采购入库页
break;
case 3:
path = '/medicationmanagement/medicationmanagement/returnedPurchase'; // 采购退货页
path = '/aa/4/purchaseReturnDetsils'; // 采购退货页
break;
case 4:
path = '/medicationmanagement/requisitionManagement/requisitionManagement'; // 领用出库页
path = '/aa/4/requisitionDetails'; // 领用出库页
break;
case 5:
path = '/medicationmanagement/requisitionManagement/returningInventory'; // 领用退库页
path = '/aa/4/returnOrutboundDetails'; // 领用退库页
break;
case 6:
path = '/medicationmanagement/transferManagement/transferManagent'; // 调拨页
case 10:
path = '/aa/4/transferManagentDetails'; // 调拨页
break;
case 7:
path = '/medicationmanagement/chkstock/chkstockPart'; // 盘点页
path = '/aa/4/chkstockPartDetails'; // 盘点页
break;
case 8:
path = '/medicationmanagement/lossReportingManagement/lossReportingManagement'; // 报损页
path = '/aa/4/lossReportingDetails'; // 报损页
break;
case 9:
path = '/giveGrug/pharmacymanagement'; // 药品发放
path = '/aa/3/medicationDetails'; // 药品发放
break;
default:
ElMessage.warning('无效的页面索引');
@@ -284,15 +296,35 @@ const skipToPage = (records, index) => {
}
// 跳转到对应页面并传递参数
router.push({
path: path,
query: {
locationId: locationId,
startTime: startTime,
endTime: endTime,
fromReconciliation: 'true' // 添加标志参数
}
});
if(index === 10) {
router.push({
path: path,
query: {
sourceLocationId: locationId,
occurrenceTimeSTime: startTime,
occurrenceTimeETime: endTime,
}
});
}else if(index ===1) {
router.push({
path: path,
query: {
sourceLocationId: locationId,
time: endTime,
type: '1'
}
});
}else {
router.push({
path: path,
query: {
purposeLocationId: locationId,
occurrenceTimeSTime: startTime,
occurrenceTimeETime: endTime
}
});
}
}

View File

@@ -23,6 +23,11 @@
align="center"
prop="itemType_enumText"
/>
<el-table-column
label="价格"
align="center"
prop="purchaseAmount"
/>
<el-table-column
label="包装单位"
align="center"

View File

@@ -0,0 +1,339 @@
{
"panels": [
{
"index": 0,
"name": 1,
"paperType": "自定义",
"height": 130,
"width": 210,
"paperNumberDisabled": true,
"paperNumberContinue": true,
"overPrintOptions": {
"content": "",
"opacity": 0.7,
"type": 1
},
"watermarkOptions": {
"content": "",
"fillStyle": "rgba(184, 184, 184, 0.3)",
"fontSize": "14px",
"rotate": 25,
"width": 200,
"height": 200,
"timestamp": false,
"format": "YYYY-MM-DD HH:mm"
},
"panelLayoutOptions": {},
"paperHeader": 0,
"paperFooter": 841.8897637795277,
"printElements": [
{
"options": {
"left": 252,
"top": 13.5,
"height": 12,
"width": 75,
"title": "医院",
"coordinateSync": false,
"widthHeightSync": false,
"fontSize": 12,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 19.5,
"top": 33,
"height": 9.75,
"width": 120,
"title": "日期",
"field": "occurrenceTime",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 222,
"top": 33,
"height": 9.75,
"width": 120,
"title": "单据号",
"field": "busNo",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 465,
"top": 33,
"height": 9.75,
"width": 120,
"title": "机构:医院",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 19.5,
"top": 57,
"height": 9.75,
"width": 322.5,
"title": "供应商",
"field": "supplierName",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0
},
"printElementType": {
"title": "文本",
"type": "text"
}
},
{
"options": {
"left": 19.5,
"top": 84,
"height": 36,
"width": 570,
"title": "undefined+beforeDragIn",
"field": "purchaseinventoryList",
"coordinateSync": false,
"widthHeightSync": false,
"columns": [
[
{
"title": "项目名",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 53.52877835374887,
"field": "name",
"checked": true,
"columnId": "name",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "规格",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 50.3056193642802,
"field": "volume",
"checked": true,
"columnId": "volume",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "厂家/产地",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 84.09807741407441,
"field": "manufacturer",
"checked": true,
"columnId": "manufacturer",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "数量",
"titleSync": false,
"align": "right",
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"formatter2": "function(value,row,index,options,rowIndex,column){ return value + ' ' + row.unitCode_dictText; }",
"width": 37.02194283284556,
"field": "itemQuantity",
"checked": true,
"columnId": "itemQuantity",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "采购单价",
"titleSync": false,
"align": "right",
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"formatter2": "function(value,row,index,options,rowIndex,column){ return value + ' 元'; }",
"width": 45.05495152300426,
"field": "price",
"checked": true,
"columnId": "price",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "金额",
"titleSync": false,
"align": "right",
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"formatter2": "function(value,row,index,options,rowIndex,column){ return value + ' 元'; }",
"width": 39.04544357631049,
"field": "totalPrice",
"checked": true,
"columnId": "totalPrice",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "仓库",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 40.041954542099724,
"field": "purposeLocationName",
"checked": true,
"columnId": "purposeLocationName",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "产品批号",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 47.05067091842349,
"field": "lotNumber",
"checked": true,
"columnId": "lotNumber",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "生产日期",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 63.089377997062755,
"field": "startTime",
"checked": true,
"columnId": "startTime",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "有效期至",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 59.05673483929025,
"field": "endTime",
"checked": true,
"columnId": "endTime",
"fixed": false,
"rowspan": 1,
"colspan": 1
},
{
"title": "发票号",
"titleSync": false,
"halign": "center",
"tableQRCodeLevel": 0,
"tableSummaryTitle": true,
"tableSummary": "",
"width": 51.706448638859854,
"field": "invoiceNo",
"checked": true,
"columnId": "invoiceNo",
"fixed": false,
"rowspan": 1,
"colspan": 1
}
]
]
},
"printElementType": {
"title": "表格",
"type": "table",
"editable": true,
"columnDisplayEditable": true,
"columnDisplayIndexEditable": true,
"columnTitleEditable": true,
"columnResizable": true,
"columnAlignEditable": true,
"isEnableEditField": true,
"isEnableContextMenu": true,
"isEnableInsertRow": true,
"isEnableDeleteRow": true,
"isEnableInsertColumn": true,
"isEnableDeleteColumn": true,
"isEnableMergeCell": true
}
},
{
"options": {
"left": 480,
"top": 130.5,
"height": 12,
"width": 109.5,
"title": "合计",
"field": "totalAmount",
"coordinateSync": false,
"widthHeightSync": false,
"qrCodeLevel": 0,
"formatter": "function(title,value,options,templateData,target,paperNo){\n return value + ' 元'\n}"
},
"printElementType": {
"title": "文本",
"type": "text"
}
}
]
}
]
}

View File

@@ -2,12 +2,7 @@
<div class="app-container">
<el-row :gutter="10" class="mb8" v-if="viewStatus">
<el-col :span="1.5">
<el-button
v-if="viewStatus != 'view'"
plain
type="primary"
icon="Edit"
@click="handelApply"
<el-button v-if="viewStatus != 'view'" plain type="primary" icon="Edit" @click="handelApply"
>审批通过</el-button
>
</el-col>
@@ -26,11 +21,6 @@
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="submitAudit">提交审核</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="Printer" :disabled="multiple" @click="handleDelete">
打印
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="EditPen" @click="handleTotalAmount">
计算金额
@@ -40,7 +30,7 @@
<el-button type="primary" plain icon="Plus" @click="handleSave">批量保存</el-button>
</el-col>
</el-row>
<el-button type="primary" plain icon="Printer" @click="handlePrint"> 打印单据 </el-button>
<el-form
:model="receiptHeaderForm"
ref="receiptHeaderRef"
@@ -63,7 +53,7 @@
placeholder=""
clearable
filterable
:disabled ="viewStatus=='view'"
:disabled="viewStatus == 'view'"
style="width: 150px"
>
<el-option
@@ -79,7 +69,7 @@
v-model="receiptHeaderForm.occurrenceTime"
value-format="YYYY-MM-DD HH:mm:ss"
type="datetime"
:disabled ="viewStatus=='view'"
:disabled="viewStatus == 'view'"
/>
</el-form-item>
<el-form-item label="供应商:" prop="supplierId">
@@ -89,7 +79,7 @@
clearable
filterable
style="width: 150px"
:disabled ="viewStatus=='view'"
:disabled="viewStatus == 'view'"
>
<el-option
v-for="supplier in supplierListOptions"
@@ -161,7 +151,7 @@
<!-- @cell-mouse-enter="handleMouseEnter" -->
<!-- v-click-outside-row="handleClickOutside" @row-click="handleRowClick" 点击行以外的部分自动保存 -->
<el-table
row-key="id"
row-key="rowKey"
v-loading="loading"
:data="form.purchaseinventoryList"
@selection-change="handleSelectionChange"
@@ -174,9 +164,19 @@
<el-form-item
:prop="`purchaseinventoryList.${scope.$index}.name`"
:rules="tableRules.name"
>
<el-input v-if="viewStatus=='view'" v-model="scope.row.name" placeholder="" disabled />
<PopoverList v-else @search="handleSearch" :width="1000" :modelValue="scope.row.name">
>
<el-input
v-if="viewStatus == 'view'"
v-model="scope.row.name"
placeholder=""
disabled
/>
<PopoverList
v-else
@search="handleSearch"
:width="1000"
:modelValue="scope.row.name"
>
<template #popover-content="{}">
<MedicineList
@selectRow="(row) => selectRow(row, scope.$index)"
@@ -240,7 +240,7 @@
placeholder="请选择仓库"
:class="{ 'error-border': scope.row.error }"
clearable
:disabled ="viewStatus=='view'"
:disabled="viewStatus == 'view'"
>
<el-option
v-for="(item, index) in locationList"
@@ -268,7 +268,7 @@
>
<div class="select_wrapper_div">
<el-input
:disabled ="viewStatus=='view'"
:disabled="viewStatus == 'view'"
v-model="scope.row.itemQuantity"
placeholder=""
@blur="handleTotalPrice(scope.$index)"
@@ -298,7 +298,7 @@
placeholder=" "
:class="{ 'error-border': scope.row.error }"
:clearable="false"
:disabled ="viewStatus=='view'"
:disabled="viewStatus == 'view'"
@change="(value) => handleUnitCodeChange(scope.row, scope.$index, value)"
>
<template v-if="scope.row.unitList && scope.row.partPercent > 1">
@@ -336,22 +336,24 @@
width="130"
>
<template #default="scope">
<el-tooltip :content="formatContent(scope.row.traceNo)" placement="top"
popper-class="custom-tooltip">
<el-tooltip
:content="formatContent(scope.row.traceNo)"
placement="top"
popper-class="custom-tooltip"
>
<el-form-item
:prop="`purchaseinventoryList.${scope.$index}.traceNo`"
:rules="tableRules.traceNo"
>
<el-input
:disabled ="viewStatus=='view'"
:disabled="viewStatus == 'view'"
v-model="scope.row.traceNo"
@change="(value) => handleTraceNoInput(value, scope.row)"
placeholder=""
:id="'traceNo' + `${scope.$index}`"
/>
</el-form-item>
</el-tooltip>
</el-tooltip>
</template>
</el-table-column>
<el-table-column
@@ -366,7 +368,11 @@
:prop="`purchaseinventoryList.${scope.$index}.packagingLevels`"
:rules="tableRules.packagingLevels"
>
<el-input v-model="scope.row.packagingLevels" placeholder="" :disabled ="viewStatus=='view'"/>
<el-input
v-model="scope.row.packagingLevels"
placeholder=""
:disabled="viewStatus == 'view'"
/>
</el-form-item>
</template>
</el-table-column>
@@ -388,7 +394,7 @@
placeholder=""
@blur="handleTotalPrice(scope.$index)"
:class="{ 'error-border': scope.row.error }"
:disabled ="viewStatus=='view'"
:disabled="viewStatus == 'view'"
>
<template #suffix></template>
</el-input>
@@ -423,7 +429,12 @@
:prop="`purchaseinventoryList.${scope.$index}.lotNumber`"
:rules="tableRules.lotNumber"
>
<el-input v-model="scope.row.lotNumber" placeholder="" maxlength="100" :disabled ="viewStatus=='view'" />
<el-input
v-model="scope.row.lotNumber"
placeholder=""
maxlength="100"
:disabled="viewStatus == 'view'"
/>
</el-form-item>
</template>
</el-table-column>
@@ -445,7 +456,7 @@
placeholder="选择日期"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
:disabled ="viewStatus=='view'"
:disabled="viewStatus == 'view'"
@change="changeValStart($event, scope.$index)"
/>
</el-form-item>
@@ -464,7 +475,7 @@
:rules="tableRules.endTime"
>
<el-date-picker
:disabled ="viewStatus=='view'"
:disabled="viewStatus == 'view'"
v-model="scope.row.endTime"
type="date"
placeholder="选择日期"
@@ -487,7 +498,11 @@
:prop="`purchaseinventoryList.${scope.$index}.invoiceNo`"
:rules="tableRules.invoiceNo"
>
<el-input v-model="scope.row.invoiceNo" placeholder="" :disabled ="viewStatus=='view'"/>
<el-input
v-model="scope.row.invoiceNo"
placeholder=""
:disabled="viewStatus == 'view'"
/>
</el-form-item>
</template>
</el-table-column>
@@ -498,7 +513,11 @@
:prop="`purchaseinventoryList.${scope.$index}.remake`"
:rules="tableRules.remake"
>
<el-input v-model="scope.row.remake" placeholder="" :disabled ="viewStatus=='view'" />
<el-input
v-model="scope.row.remake"
placeholder=""
:disabled="viewStatus == 'view'"
/>
</el-form-item>
</template>
</el-table-column>
@@ -520,7 +539,7 @@
placeholder="请选择货位"
:class="{ 'error-border': scope.row.error }"
clearable
:disabled ="viewStatus=='view'"
:disabled="viewStatus == 'view'"
>
</el-select>
</div>
@@ -591,7 +610,13 @@
</el-col>
</el-row>
<!-- </el-dialog> -->
<TraceNoDialog :ypName="ypName" :rowData="rowData" :openDialog="openTraceNoDialog" @submit="submit" @cancel="openTraceNoDialog = false"/>
<TraceNoDialog
:ypName="ypName"
:rowData="rowData"
:openDialog="openTraceNoDialog"
@submit="submit"
@cancel="openTraceNoDialog = false"
/>
</div>
</template>
@@ -612,7 +637,7 @@ import {
const route = useRoute();
import PopoverList from '@/components/OpenHis/popoverList/index.vue';
import MedicineList from './components/medicineList.vue';
import TraceNoDialog from '@/components/OpenHis/TraceNoDialog/index.vue'
import TraceNoDialog from '@/components/OpenHis/TraceNoDialog/index.vue';
import { formatDate, formatDateymd } from '@/utils/index';
import { useStore } from '@/store/store';
import useUserStore from '@/store/modules/user';
@@ -620,11 +645,14 @@ import { nextTick, ref, watch } from 'vue';
import useTagsViewStore from '@/store/modules/tagsView';
import _, { isEqual } from 'lodash';
import { debounce } from 'lodash-es';
import templateJson from './components/templateJson.json';
import { hiprint } from 'vue-plugin-hiprint';
const router = useRouter();
const tagsViewStore = useTagsViewStore();
const userUserStore = useUserStore();
const store = useStore();
const rowData = ref({})
const rowData = ref({});
const { proxy } = getCurrentInstance();
const { warehous_type, category_code, service_type_code, specialty_code, purchase_type } =
@@ -649,8 +677,8 @@ const total = ref(0);
const title = ref('');
const visible = ref(false);
const row = ref({});
const openTraceNoDialog = ref(false)
const ypName = ref("");
const openTraceNoDialog = ref(false);
const ypName = ref('');
const rowIndex = ref(-1);
const totalAmount = ref(0);
const editData = ref({});
@@ -781,6 +809,7 @@ function addNewRow() {
// return;
// }
const newRow = {
rowKey: Date.now(),
id: '',
itemTable: '',
itemQuantity: '',
@@ -940,30 +969,35 @@ function saveRow(row, index) {
});
}
function handleScan(row,index){
if(row.purposeLocationId && row.lotNumber) {
rowData.value = row
rowData.value.locationId = row.purposeLocationId
rowData.value.itemType = receiptHeaderForm.medicationType
ypName.value = row.name
function handleScan(row, index) {
if (row.purposeLocationId && row.lotNumber) {
rowData.value = row;
rowData.value.locationId = row.purposeLocationId;
rowData.value.itemType = receiptHeaderForm.medicationType;
ypName.value = row.name;
openTraceNoDialog.value = true;
currentIndex.value = index
}else {
proxy.$message.warning('请先选择仓库和产品批号!')
currentIndex.value = index;
} else {
proxy.$message.warning('请先选择仓库和产品批号!');
}
}
function submit(value){
form.purchaseinventoryList[currentIndex.value].traceNo = value;
function submit(value) {
if (form.purchaseinventoryList[currentIndex.value].traceNo) {
form.purchaseinventoryList[currentIndex.value].traceNo =
form.purchaseinventoryList[currentIndex.value].traceNo + ',' + value;
} else {
form.purchaseinventoryList[currentIndex.value].traceNo = value;
}
openTraceNoDialog.value = false;
}
function formatContent(value){
let content = ''
if(value){
function formatContent(value) {
let content = '';
if (value) {
value.split(',').forEach((item, index) => {
content += `[${(index + 1)}] ${item}\n`
})
return content
content += `[${index + 1}] ${item}\n`;
});
return content;
}
}
// 药品列表搜索
@@ -977,6 +1011,7 @@ function selectRow(rowValue, index) {
form.purchaseinventoryList[index] = { id: form.purchaseinventoryList[index].id };
price.value = 0;
rowIndex.value = index;
form.purchaseinventoryList[index].rowKey = Date.now();
form.purchaseinventoryList[index].itemId = rowValue.definitionId;
form.purchaseinventoryList[index].name = rowValue.name;
form.purchaseinventoryList[index].volume = rowValue.volume;
@@ -1265,6 +1300,29 @@ function handleSelectionChange(selection) {
multiple.value = !selection.length;
}
function handlePrint() {
const result = [];
let supplierName = supplierListOptions.value.filter((item) => {
return item.value == receiptHeaderForm.supplierId;
})[0].label;
const totalAmount = form.purchaseinventoryList.reduce((accumulator, currentRow) => {
return accumulator + (Number(currentRow.totalPrice) || 0);
}, 0);
result.push({
supplierName: supplierName,
totalAmount: totalAmount,
...receiptHeaderForm,
purchaseinventoryList: form.purchaseinventoryList,
});
console.log(result, '345678987654');
const printElements = templateJson;
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
printer: 'EPSON LQ-80KFII',
title: '打印标题',
}); //开始打印
}
function deleteSelectedRows() {
let length = selectedRows.value.length;
let ids = [];
@@ -1372,9 +1430,10 @@ function edit() {
receiptHeaderForm.supplierId = editData.value.editRow.supplierId;
receiptHeaderForm.practitionerId = editData.value.editRow.practitionerId;
console.log(editData.value.editRow, editData.value, 'editData.value.editRow');
receiptHeaderForm.occurrenceTime = editData.value.editRow.occurrenceTime
? formatDate(editData.value.editRow.occurrenceTime)
receiptHeaderForm.occurrenceTime = editData.value.item[0].occurrenceTime
? formatDate(editData.value.item[0].occurrenceTime)
: formatDate(new Date());
console.log(editData.value.item[0].occurrenceTime);
console.log(
editData.value.editRow.purposeTypeEnum,
editData.value,

View File

@@ -790,6 +790,7 @@ function getTransferProductDetails() {
data.isEdit = true;
getTransferProductDetail(receiptHeaderForm.busNo).then((res) => {
form.purchaseinventoryList = res.data;
receiptHeaderForm.occurrenceTime = formatDate(res.data[0].occurrenceTime)
form.purchaseinventoryList.map((e, index) => {
form.purchaseinventoryList[index].statusMaxvalue = false;
e.volume = e.totalVolume;

View File

@@ -826,6 +826,7 @@ function getTransferProductDetails() {
if (route.query.supplyBusNo) {
getTHTransferProductDetail(receiptHeaderForm.busNo).then((res) => {
form.purchaseinventoryList = res.data;
receiptHeaderForm.occurrenceTime = formatDate(res.data[0].occurrenceTime)
form.purchaseinventoryList.map((e, index) => {
e.isSave = true;
form.purchaseinventoryList[index].statusMaxvalue = false;

View File

@@ -83,6 +83,14 @@
>重置</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
>导出</el-button>
</el-col>
</el-row>
<el-table
@@ -107,6 +115,14 @@
:show-overflow-tooltip="true"
/>
<el-table-column
label="单据号"
align="center"
key="supplyBusno"
prop="supplyBusno"
width="200"
:show-overflow-tooltip="true"
/>
<el-table-column
label="项目名称"
align="center"
@@ -155,6 +171,20 @@
:show-overflow-tooltip="true"
/>
<el-table-column
label="货位"
align="center"
key="locationStoreName"
prop="locationStoreName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="采购单价"
align="center"
key="price"
prop="price"
:show-overflow-tooltip="true"
/>
<el-table-column
label="单位"
align="center"
@@ -171,6 +201,34 @@
:show-overflow-tooltip="true"
/>
<el-table-column
label="盈亏金额"
align="center"
key="totalPrice"
prop="totalPrice"
:show-overflow-tooltip="true"
/>
<el-table-column
label="供应商"
align="center"
key="supplier"
prop="supplier"
:show-overflow-tooltip="true"
/>
<el-table-column
label="审核人"
align="center"
key="approverId_dictText"
prop="approverId_dictText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="制单日期"
align="center"
key="occurrenceTime"
prop="occurrenceTime"
:show-overflow-tooltip="true"
/>
<el-table-column
label="盘点日期"
align="center"
@@ -199,12 +257,13 @@ import {
getReportStocktakingPage,
getInit,
getPharmacyCabinetList,
getReportStocktakingPageAuto,
cancelSupply,
stopSupply,
} from "./statisticalManagent";
const { proxy } = getCurrentInstance();
const route = useRoute();
const purchaseinventoryList = ref([]);
const loading = ref(true);
@@ -234,6 +293,38 @@ const data = reactive({
const { queryParams, form, rules } = toRefs(data);
// 监听路由变化
watch(
() => route.query,
(newQuery) => {
// 如果路由中包含指定参数,则使用这些参数进行查询
if (newQuery.purposeLocationId || newQuery.occurrenceTimeSTime || newQuery.occurrenceTimeETime) {
// 设置查询参数
if (newQuery.purposeLocationId) {
queryParams.value.purposeLocationId = newQuery.purposeLocationId;
}
if (newQuery.occurrenceTimeSTime) {
queryParams.value.occurrenceTimeSTime = newQuery.occurrenceTimeSTime + ' 00:00:00';
}
if (newQuery.occurrenceTimeETime) {
queryParams.value.occurrenceTimeETime = newQuery.occurrenceTimeETime + ' 23:59:59';
}
// 执行查询
getList();
}else {
queryParams.value.purposeLocationId = newQuery.sourceLocationId;
queryParams.value.time = newQuery.time + ' 00:00:00';
getReportStocktakingPageAuto(queryParams.value).then((res) => {
loading.value = false;
purchaseinventoryList.value = res.data.records
total.value = res.data.total;
});
}
},
{ immediate: true }
);
function getPharmacyCabinetLists() {
getPharmacyCabinetList().then((response) => {
locationIdList.value = response.data
@@ -245,11 +336,13 @@ function getPharmacyCabinetLists() {
/** 查询调拨管理项目列表 */
function getList() {
loading.value = true;
getReportStocktakingPage(queryParams.value).then((res) => {
loading.value = false;
purchaseinventoryList.value = res.data.records
total.value = res.data.total;
});
if(!route.query.sourceLocationId) {
getReportStocktakingPage(queryParams.value).then((res) => {
loading.value = false;
purchaseinventoryList.value = res.data.records
total.value = res.data.total;
});
}
}
/** 搜索按钮操作 */
@@ -283,6 +376,12 @@ function handleSelectionChange(selection) {
multiple.value = !selection.length;
}
/** 导出按钮操作 */
function handleExport() {
proxy.$download.downloadGet("report-manage/stocktaking/excel-out", {
...queryParams.value
}, `dict_${new Date().getTime()}.xlsx`);
}
getList();
getPharmacyCabinetLists()

View File

@@ -44,6 +44,17 @@
/>
</el-select>
</el-form-item>
<el-form-item label="停供状态:" prop="categoryCode">
<el-select
v-model="queryParams.inventoryStatusEnum"
placeholder="请选择药品类别"
clearable
style="width: 150px"
>
<el-option label="未停供" :value="2" />
<el-option label="已停供" :value="3" />
</el-select>
</el-form-item>
<el-form-item label="医保等级:" prop="chrgitmLv">
<el-select
v-model="queryParams.chrgitmLv"
@@ -440,17 +451,17 @@
:style="'margin-top: 35px;'"
@pagination="getList"
/>
<el-dialog
title="药品追溯码"
v-model="visible"
width="1400"
append-to-body
destroy-on-close
:draggable="true"
>
<traceabilityCodeManagement :recordInfo="recordInfo"></traceabilityCodeManagement>
</el-dialog>
</div>
<el-dialog
title="药品追溯码"
v-model="visible"
width="1400"
append-to-body
destroy-on-close
:draggable="true"
>
<traceabilityCodeManagement :recordInfo="recordInfo"></traceabilityCodeManagement>
</el-dialog>
</template>
<script setup name="StatisticalManagement">

View File

@@ -137,6 +137,14 @@
>重置</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
>导出</el-button>
</el-col>
</el-row>
<el-table
@@ -323,8 +331,10 @@ import {
cancelSupply,
stopSupply,
} from "./statisticalManagent";
import { watch } from "vue";
const { proxy } = getCurrentInstance();
const route = useRoute();
const {
item_type,
inventory_range,
@@ -364,6 +374,27 @@ const data = reactive({
const { queryParams, form, rules } = toRefs(data);
// 监听路由变化
watch(
() => route.query,
(newQuery) => {
// 如果路由中包含指定参数,则使用这些参数进行查询
if (newQuery.purposeLocationId || newQuery.occurrenceTimeSTime || newQuery.occurrenceTimeETime) {
// 设置查询参数
if (newQuery.purposeLocationId) {
queryParams.value.purposeLocationId = newQuery.purposeLocationId;
}
if (newQuery.occurrenceTimeETime) {
queryParams.value.time = newQuery.occurrenceTimeETime + ' 00:00:00';
}
// 执行查询
getList();
}
},
{ immediate: true }
);
function getPharmacyCabinetLists() {
getPharmacyCabinetList().then((response) => {
locationIdList.value = response.data
@@ -424,6 +455,12 @@ function handleSelectionChange(selection) {
multiple.value = !selection.length;
}
/** 导出按钮操作 */
function handleExport() {
proxy.$download.downloadGet("report-manage/inventory-product/excel-out", {
...queryParams.value
}, `dict_${new Date().getTime()}.xlsx`);
}
getList();
getPharmacyCabinetLists()

View File

@@ -1,278 +1,203 @@
<template>
<div class="app-container">
<!-- <el-row :gutter="10" class="mb8">
<el-form
:model="queryParams"
ref="queryRef"
:inline="true"
label-width="85px"
>
<el-form-item label="结算经办机构:" prop="setlOptins" label-width="110px">
<el-input
v-model="queryParams.setlOptins"
placeholder="请输入结算经办机构"
clearable
style="width: 150px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="结算日期:">
<el-date-picker
v-model="occurrenceTime"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 300px"
></el-date-picker>
</el-form-item>
<el-form-item label="清算类型:" prop="clrType">
<el-select
v-model="queryParams.clrType"
placeholder="请选择清算类型"
clearable
style="width: 150px"
>
<el-option
v-for="categoryCode in clrTypeOptions"
:key="categoryCode.value"
:label="categoryCode.label"
:value="categoryCode.value"
/>
</el-select>
</el-form-item>
</el-form> -->
<!-- <el-button
type="primary"
plain
icon="Edit"
@click="handleQuery"
>统计</el-button
> -->
<!-- <el-button
type="primary"
plain
icon="Edit"
@click="handleApplyForLiquidation"
>申请清算</el-button
> -->
<!-- </el-col> -->
<!-- </el-row> -->
<!-- <div style="margin-bottom:5px"> -->
<el-row :guutter="15">
<el-tabs v-model="activeTabName" type="card" class="inOut-tabs" @tab-click="hendleTabChange">
<el-tab-pane label="对账" name="first">
<el-row :guutter="15">
<el-form
:model="totalPrice"
ref="priceRef"
:inline="true"
>
<el-row :guutter="15">
<el-form-item label="结算经办机构" prop="setlOptins" label-width="160px">
<el-input
v-model="totalPrice.setlOptins"
placeholder="请输入结算经办机构"
clearable
style="width: 150px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="结算日期:" label-width="130px">
<el-date-picker
v-model="occurrenceTime"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 300px"
></el-date-picker>
</el-form-item>
<el-form-item label="清算类型:" prop="clrType" label-width="160px">
<el-select
v-model="totalPrice.clrType"
placeholder="请选择清算类型"
clearable
style="width: 150px"
>
<el-option
v-for="categoryCode in clrTypeOptions"
:key="categoryCode.value"
:label="categoryCode.label"
:value="categoryCode.value"
/>
</el-select>
</el-form-item>
</el-row>
<el-row :guutter="15">
<el-form-item label="医疗费总额:" prop="medfeeSumamt" label-width="160px">
<el-input
v-model="totalPrice.medfeeSumamt"
placeholder="请输入医疗费总额"
clearable
style="width: 150px"
/>
</el-form-item>
<el-form-item label="基金支付总额:" prop="fundAppySum" label-width="160px">
<el-input
v-model="totalPrice.fundAppySum"
placeholder="请输入基金支付总额"
clearable
style="width: 150px"
/>
</el-form-item>
<el-form-item label="个人账户支付金额:" prop="acctPay" label-width="160px">
<el-input
v-model="totalPrice.acctPay"
placeholder="请输入个人账户支付金额"
clearable
style="width: 150px"
/>
</el-form-item>
<el-form-item label="现金支付金额:" prop="cashPayamt" label-width="160px">
<el-input
v-model="totalPrice.cashPayamt"
placeholder="请输入现金支付金额"
clearable
style="width: 150px"
/>
</el-form-item>
<el-button
type="primary"
plain
icon="Edit"
@click="handOperatedApply"
>手动清算</el-button
>
</el-row>
<el-form :model="totalPrice" ref="priceRef" :inline="true">
<el-row :guutter="15">
<el-form-item label="结算经办机构:" prop="setlOptins" label-width="160px">
<el-input v-model="totalPrice.setlOptins" placeholder="请输入结算经办机构" clearable style="width: 150px"
@keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="结算日期" label-width="130px">
<el-date-picker v-model="occurrenceTime" value-format="YYYY-MM-DD" type="daterange" range-separator="-"
start-placeholder="开始日期" end-placeholder="结束日期" style="width: 300px"></el-date-picker>
</el-form-item>
<el-form-item label="清算类型:" prop="clrType" label-width="160px">
<el-select v-model="queryParams.clrType" placeholder="请选择清算类型" clearable style="width: 150px">
<el-option v-for="categoryCode in clrTypeOptions" :key="categoryCode.value" :label="categoryCode.label"
:value="categoryCode.value" />
</el-select>
</el-form-item>
<el-form-item label="险种类型:" prop="insutype" label-width="160px">
<el-select v-model="queryParams.insutype" placeholder="请选择险种类型" clearable style="width: 150px">
<el-option v-for="categoryCode in insutypeOptions" :key="categoryCode.value" :label="categoryCode.label"
:value="categoryCode.value" />
</el-select>
</el-form-item>
</el-row>
<el-row :guutter="15">
<el-form-item label="医疗费总额:" prop="medfeeSumamt" label-width="160px">
<el-input v-model="totalPrice.medfeeSumamt" placeholder="请输入医疗费总额" clearable style="width: 150px" />
</el-form-item>
<el-form-item label="基金支付总额:" prop="fundAppySum" label-width="160px">
<el-input v-model="totalPrice.fundAppySum" placeholder="请输入基金支付总额" clearable style="width: 150px" />
</el-form-item>
<el-form-item label="个人账户支付金额:" prop="acctPay" label-width="160px">
<el-input v-model="totalPrice.acctPay" placeholder="请输入个人账户支付金额" clearable style="width: 150px" />
</el-form-item>
<el-form-item label="现金支付金额:" prop="cashPayamt" label-width="160px">
<el-input v-model="totalPrice.cashPayamt" placeholder="请输入现金支付金额" clearable style="width: 150px" />
</el-form-item>
<el-form-item label="结算笔数:" prop="setlCnt" label-width="160px">
<el-input v-model="totalPrice.setlCnt" placeholder="请输入结算笔数" clearable style="width: 150px" />
</el-form-item>
<!-- <el-button type="primary" plain icon="Edit" @click="handOperatedApply">手动清算</el-button> -->
<el-button type="primary" plain icon="Edit" @click="handOperatedReconcileAccounts">手动对账</el-button>
</el-form>
</el-row>
</el-row>
<!-- </div> -->
<el-table
v-loading="loading"
:data="purchaseinventoryList"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
>
<el-table-column type="selection" width="50" align="center" />
<el-table-column
label="申请清算ID"
align="center"
key="outResult"
prop="outResult"
width="270"
:show-overflow-tooltip="true"
/>
<el-table-column
label="开始时间"
align="center"
key="begndate"
prop="begndate"
width="150"
:show-overflow-tooltip="true"
/>
<el-table-column
label="结束时间"
align="center"
key="enddate"
prop="enddate"
width="150"
:show-overflow-tooltip="true"
/>
<el-table-column
label="清算类别"
align="center"
key="clrType"
prop="clrType"
width="100"
:show-overflow-tooltip="true"
/>
<el-table-column
label="总费用"
align="center"
key="medfeeSumamt"
prop="medfeeSumamt"
width="170"
:show-overflow-tooltip="true"
/>
<el-table-column
label="医保认可总费用"
align="center"
key="medSumfee"
prop="medSumfee"
width="170"
:show-overflow-tooltip="true"
/>
<el-table-column
label="基金申报金额"
align="center"
key="fundAppySum"
prop="fundAppySum"
width="170"
:show-overflow-tooltip="true"
/>
<el-table-column
label="现金支付总额"
align="center"
key="cashPayamt"
prop="cashPayamt"
width="170"
:show-overflow-tooltip="true"
/>
<el-table-column
label="个人账户金额"
align="center"
key="acctPay"
prop="acctPay"
width="170"
:show-overflow-tooltip="true"
/>
<el-table-column
label="状态"
align="center"
key="status"
prop="status"
width="170"
:show-overflow-tooltip="true"
>
<template #default="scope">
<span>{{ parseTime(scope.row.setlTime) }}</span>
</template>
</el-table-column>
<!-- <el-table-column
label="是否退费"
align="center"
key="refdSetlFlag"
prop="refdSetlFlag"
:show-overflow-tooltip="true"
>
<template #default="scope">
<span>{{ scope.row.refdSetlFlag==1?'退费':'' }}</span>
</template>
</el-table-column> -->
<el-table-column
label="操作"
align="center"
width="300"
class-name="small-padding fixed-width"
fixed="right"
>
<template #default="scope">
<el-button
type="danger"
link
icon="revoked-filled"
:disabled="scope.row.id == ''"
@click="revokedSelectedRows(scope.row)"
>
撤销
</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
</el-row>
<!-- </div> -->
<el-table v-loading="loading" :data="purchaseinventoryList" @selection-change="handleSelectionChange"
@row-click="handleRowClick">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="申请清算ID" align="center" key="outResult" prop="outResult" width="270"
:show-overflow-tooltip="true" />
<el-table-column label="开始时间" align="center" key="begndate" prop="begndate" width="150"
:show-overflow-tooltip="true" />
<el-table-column label="结束时间" align="center" key="enddate" prop="enddate" width="150"
:show-overflow-tooltip="true" />
<el-table-column label="清算类别" align="center" key="clrType" prop="clrType" width="100"
:show-overflow-tooltip="true" />
<el-table-column label="总费用" align="center" key="medfeeSumamt" prop="medfeeSumamt" width="170"
:show-overflow-tooltip="true" />
<el-table-column label="医保认可总费用" align="center" key="medSumfee" prop="medSumfee" width="170"
:show-overflow-tooltip="true" />
<el-table-column label="基金申报金额" align="center" key="fundAppySum" prop="fundAppySum" width="170"
:show-overflow-tooltip="true" />
<el-table-column label="现金支付总额" align="center" key="cashPayamt" prop="cashPayamt" width="170"
:show-overflow-tooltip="true" />
<el-table-column label="个人账户金额" align="center" key="acctPay" prop="acctPay" width="170"
:show-overflow-tooltip="true" />
<el-table-column label="状态" align="center" key="status" prop="status" width="170" :show-overflow-tooltip="true">
<template #default="scope">
<span>{{ parseTime(scope.row.setlTime) }}</span>
</template>
</el-table-column>
<!-- <el-table-column
label="是否退费"
align="center"
key="refdSetlFlag"
prop="refdSetlFlag"
:show-overflow-tooltip="true"
>
<template #default="scope">
<span>{{ scope.row.refdSetlFlag==1?'退费':'' }}</span>
</template>
</el-table-column> -->
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width" fixed="right">
<template #default="scope">
<el-button type="danger" link icon="revoked-filled" :disabled="scope.row.id == ''"
@click="revokedSelectedRows(scope.row)">
撤销
</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="清算" name="second">
<el-row :guutter="15">
<el-form :model="totalPrice" ref="priceRef" :inline="true">
<el-row :guutter="15">
<el-form-item label="结算经办机构:" prop="setlOptins" label-width="160px">
<el-input v-model="totalPrice.setlOptins" placeholder="请输入结算经办机构" clearable style="width: 150px"
@keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="结算日期:" label-width="130px">
<el-date-picker v-model="occurrenceTime" value-format="YYYY-MM-DD" type="daterange" range-separator="-"
start-placeholder="开始日期" end-placeholder="结束日期" style="width: 300px"></el-date-picker>
</el-form-item>
<el-form-item label="清算类型:" prop="clrType" label-width="160px">
<el-select v-model="queryParams.clrType" placeholder="请选择清算类型" clearable style="width: 150px">
<el-option v-for="categoryCode in clrTypeOptions" :key="categoryCode.value" :label="categoryCode.label"
:value="categoryCode.value" />
</el-select>
</el-form-item>
<!-- <el-form-item label="险种类型:" prop="insutype" label-width="160px">
<el-select v-model="queryParams.insutype" placeholder="请选择险种类型" clearable style="width: 150px">
<el-option v-for="categoryCode in insutypeOptions" :key="categoryCode.value" :label="categoryCode.label"
:value="categoryCode.value" />
</el-select>
</el-form-item> -->
</el-row>
<el-row :guutter="15">
<el-form-item label="医疗费总额:" prop="medfeeSumamt" label-width="160px">
<el-input v-model="totalPrice.medfeeSumamt" placeholder="请输入医疗费总额" clearable style="width: 150px" />
</el-form-item>
<el-form-item label="基金支付总额:" prop="fundAppySum" label-width="160px">
<el-input v-model="totalPrice.fundAppySum" placeholder="请输入基金支付总额" clearable style="width: 150px" />
</el-form-item>
<el-form-item label="个人账户支付金额:" prop="acctPay" label-width="160px">
<el-input v-model="totalPrice.acctPay" placeholder="请输入个人账户支付金额" clearable style="width: 150px" />
</el-form-item>
<el-form-item label="现金支付金额:" prop="cashPayamt" label-width="160px">
<el-input v-model="totalPrice.cashPayamt" placeholder="请输入现金支付金额" clearable style="width: 150px" />
</el-form-item>
<!-- <el-form-item label="结算笔数:" prop="setlCnt" label-width="160px">
<el-input v-model="totalPrice.setlCnt" placeholder="请输入结算笔数" clearable style="width: 150px" />
</el-form-item> -->
<el-button type="primary" plain icon="Edit" @click="handOperatedApply">手动清算</el-button>
<!-- <el-button type="primary" plain icon="Edit" @click="handOperatedReconcileAccounts">手动对账</el-button> -->
</el-row>
</el-form>
</el-row>
<!-- </div> -->
<el-table v-loading="loading" :data="purchaseinventoryList" @selection-change="handleSelectionChange"
@row-click="handleRowClick">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="申请清算ID" align="center" key="outResult" prop="outResult" width="270"
:show-overflow-tooltip="true" />
<el-table-column label="开始时间" align="center" key="begndate" prop="begndate" width="150"
:show-overflow-tooltip="true" />
<el-table-column label="结束时间" align="center" key="enddate" prop="enddate" width="150"
:show-overflow-tooltip="true" />
<el-table-column label="清算类别" align="center" key="clrType" prop="clrType" width="100"
:show-overflow-tooltip="true" />
<el-table-column label="总费用" align="center" key="medfeeSumamt" prop="medfeeSumamt" width="170"
:show-overflow-tooltip="true" />
<el-table-column label="医保认可总费用" align="center" key="medSumfee" prop="medSumfee" width="170"
:show-overflow-tooltip="true" />
<el-table-column label="基金申报金额" align="center" key="fundAppySum" prop="fundAppySum" width="170"
:show-overflow-tooltip="true" />
<el-table-column label="现金支付总额" align="center" key="cashPayamt" prop="cashPayamt" width="170"
:show-overflow-tooltip="true" />
<el-table-column label="个人账户金额" align="center" key="acctPay" prop="acctPay" width="170"
:show-overflow-tooltip="true" />
<el-table-column label="状态" align="center" key="status" prop="status" width="170" :show-overflow-tooltip="true">
<template #default="scope">
<span>{{ parseTime(scope.row.setlTime) }}</span>
</template>
</el-table-column>
<!-- <el-table-column
label="是否退费"
align="center"
key="refdSetlFlag"
prop="refdSetlFlag"
:show-overflow-tooltip="true"
>
<template #default="scope">
<span>{{ scope.row.refdSetlFlag==1?'退费':'' }}</span>
</template>
</el-table-column> -->
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width" fixed="right">
<template #default="scope">
<el-button type="danger" link icon="revoked-filled" :disabled="scope.row.id == ''"
@click="revokedSelectedRows(scope.row)">
撤销
</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</div>
</template>
@@ -282,10 +207,12 @@ import {
applyUnClearing,
autoApplyFinancialClearing,
reconcileDetailList,
handOperatedApplyFinancialClearing
handOperatedApplyFinancialClearing,
handOperatedApplyReconcileAccounts
} from "./statisticalManagent";
import { getToken } from "@/utils/auth";
import { formatDateStr } from '@/utils/index';
import { ref } from "vue";
const { proxy } = getCurrentInstance();
const purchaseinventoryList = ref([]);
const loading = ref(false);
@@ -297,7 +224,9 @@ const occurrenceTime = ref([
formatDateStr(getFirstDayOfMonth(new Date()), 'YYYY-MM-DD'), // 当前月份的第一天
formatDateStr(new Date(), 'YYYY-MM-DD') // 当天
])
const activeTabName = ref("first");
const clrTypeOptions = ref([]);
const insutypeOptions = ref([]);
const filePath = ref("")
const purchaseinventoryReturnList = ref([])
const loadingReturn = ref(false)
@@ -306,19 +235,19 @@ const selectedRow = ref([])
const fileSize = ref(10)
const uploadList = ref([]);
const baseUrl = import.meta.env.VITE_APP_BASE_API;
const fileType = ref(["zip","txt"]);
const fileType = ref(["zip", "txt"]);
const data = reactive({
form: {},
queryParams: {
// pageNo: 1,
// pageSize: 10,
setlOptins: '229900',
filePath: undefined,
orgId:undefined,
setlOptins: '229900',
filePath: undefined,
orgId: undefined,
clrType: undefined,
fileQuryNo: undefined,
stmtBegnDate:undefined,
stmtEndDate:undefined,
fileQuryNo: undefined,
stmtBegnDate: undefined,
stmtEndDate: undefined,
},
rules: {},
});
@@ -329,6 +258,7 @@ const totalPrice = reactive({
acctPay: 0,
cashPayamt: 0,
counts: 0,
setlCnt: 0,
medSumfee: 0.00
});
@@ -337,7 +267,7 @@ const { queryParams, form, rules } = toRefs(data);
watch(
() => purchaseinventoryList.value,
(newVlaue) => {
if(newVlaue&&newVlaue.length>0){
if (newVlaue && newVlaue.length > 0) {
handleTotalAmount()
}
},
@@ -346,20 +276,20 @@ watch(
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.stmtBegnDate =
occurrenceTime.value && occurrenceTime.value.length == 2
? occurrenceTime.value[0] + " 00:00:00"
: "";
queryParams.value.stmtEndDate =
occurrenceTime.value && occurrenceTime.value.length == 2
? occurrenceTime.value[1] + " 23:59:59"
: "";
// queryParams.value.pageNo = 1;
getList();
queryParams.value.stmtBegnDate =
occurrenceTime.value && occurrenceTime.value.length == 2
? occurrenceTime.value[0] + " 00:00:00"
: "";
queryParams.value.stmtEndDate =
occurrenceTime.value && occurrenceTime.value.length == 2
? occurrenceTime.value[1] + " 23:59:59"
: "";
// queryParams.value.pageNo = 1;
getList();
}
function getFirstDayOfMonth(date) {
return new Date(date.getFullYear(), date.getMonth(), 1);
return new Date(date.getFullYear(), date.getMonth(), 1);
}
// 对象转成指定字符串分隔
@@ -377,26 +307,26 @@ function listToString(list, separator) {
function handleTotalAmount() {
totalPrice.counts = purchaseinventoryList.value.length
totalPrice.medfeeSumamt = purchaseinventoryList.value.reduce(
(accumulator, currentRow) => {
return Number(
(accumulator + Number(currentRow.medfeeSumamt || 0)).toFixed(2)
);
},
0
);
(accumulator, currentRow) => {
return Number(
(accumulator + Number(currentRow.medfeeSumamt || 0)).toFixed(2)
);
},
0
);
totalPrice.fundAppySum = purchaseinventoryList.value.reduce(
(accumulator, currentRow) => {
return Number(
(accumulator + Number(currentRow.fundPaySumamt || 0)).toFixed(2)
);
(accumulator + Number(currentRow.fundPaySumamt || 0)).toFixed(2)
);
},
0
);
totalPrice.acctPay = purchaseinventoryList.value.reduce(
(accumulator, currentRow) => {
return Number(
(accumulator + Number(currentRow.acctPay || 0)).toFixed(2)
);
(accumulator + Number(currentRow.acctPay || 0)).toFixed(2)
);
},
0
);
@@ -413,7 +343,22 @@ function getPharmacyCabinetLists() {
{ value: 11, label: '门诊' },
{ value: 21, label: '住院' },
];
insutypeOptions.value = [
{ value: 310, label: '职工基本医疗保险' },
{ value: 390, label: '城乡居民基本医疗保险' },
{ value: 320, label: '公务员医疗补助' },
{ value: 330, label: '大额医疗费用补助' },
{ value: 340, label: '离休人员医疗保障' },
{ value: 350, label: '一至六级残废军人医疗补助' },
{ value: 360, label: '老红军医疗保障' },
{ value: 370, label: '企业补充医疗保险' },
{ value: 380, label: '新型农村合作医疗' },
{ value: 391, label: '城镇居民基本医疗保险' },
{ value: 392, label: '城乡居民大病医疗保险' },
];
}
function handleSelectionChangeReturn(selection) {
idsReturn.value = selection.map((item) => item.id);
singleReturn.value = selection.length != 1;
@@ -425,20 +370,20 @@ function getList() {
// console.log(res,"res----------------")
// loading.value = false;
// purchaseinventoryList.value = [{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"4.72",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"7.43",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"1",insutype:"410",clrType: 11,contractNo:"229900"},{psnNo:"123",mdtrtId:"121",setlId:"1213",medfeeSumamt:"122",fundPaySumamt:"12",acctPay:"-1",insutype:"410",clrType: 11,contractNo:"229900"}]
purchaseinventoryList.value = res.data.records ? res.data.records : res.data;
purchaseinventoryList.value = res.data.records ? res.data.records : res.data;
total.value = res.data.total;
});
}
function handleApplyForLiquidation () {
function handleApplyForLiquidation() {
let params = {}
params.clrType = queryParams.value.clrType?queryParams.value.clrType:""
params.setlOptins = queryParams.value.setlOptins?queryParams.value.setlOptins:""
params.stmtBegnDate = queryParams.value.stmtBegnDate?queryParams.value.stmtBegnDate:""
params.stmtEndDate = queryParams.value.stmtEndDate?queryParams.value.stmtEndDate:""
params.clrType = queryParams.value.clrType ? queryParams.value.clrType : ""
params.setlOptins = queryParams.value.setlOptins ? queryParams.value.setlOptins : ""
params.stmtBegnDate = queryParams.value.stmtBegnDate ? queryParams.value.stmtBegnDate : ""
params.stmtEndDate = queryParams.value.stmtEndDate ? queryParams.value.stmtEndDate : ""
autoApplyFinancialClearing(params).then((res) => {
console.log(res.data,'res----------------');
loading.value = false;
console.log(res.data, 'res----------------');
loading.value = false;
});
}
function isAllSelected() {
@@ -447,40 +392,77 @@ function isAllSelected() {
function revokedSelectedRows(row) {
let queryParamsss = {
clrAppyEvtId:row.outResult,
clroptins:queryParams.value.setlOptins?queryParams.value.setlOptins:"",
clrAppyEvtId: row.outResult,
clroptins: queryParams.value.setlOptins ? queryParams.value.setlOptins : "",
}
applyUnClearing(queryParamsss).then(res => {
proxy.$message.success('撤销成功')
getList()
proxy.$message.success('撤销成功')
getList()
}).catch(err => {
proxy.$message.error('撤销失败')
proxy.$message.error('撤销失败')
})
}
/** 选择条数 */
function handleSelectionChange(selection) {
selectedRow.value = selection
console.log(selectedRow.value,"selectedRow.value")
console.log(selectedRow.value, "selectedRow.value")
ids.value = selection.map((item) => item.setlId);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
function handOperatedApply () {
const params = {...totalPrice}
params.clrOptins = queryParams.value.setlOptins?queryParams.value.setlOptins:""
params.begndate = queryParams.value.stmtBegnDate?queryParams.value.stmtBegnDate:""
params.enddate = queryParams.value.stmtEndDate?queryParams.value.stmtEndDate:""
params.clrType = queryParams.value.clrType?queryParams.value.clrType:""
handOperatedApplyFinancialClearing(params).then(res => {
function handOperatedApply() {
const params = { ...totalPrice }
params.clrOptins = queryParams.value.setlOptins ? queryParams.value.setlOptins : ""
params.begndate = occurrenceTime.value[0] ? occurrenceTime.value[0] + ' 00:00:00' : ""
params.enddate = occurrenceTime.value[1] ? occurrenceTime.value[1] + ' 23:59:59' : ""
params.clrType = queryParams.value.clrType ? queryParams.value.clrType : ""
handOperatedApplyFinancialClearing(params).then(res => {
}).catch(err => {
proxy.$message.error('申请失败')
proxy.$message.error('申请失败')
})
}
function hendleTabChange() {
totalPrice.medfeeSumamt = 0;
totalPrice.fundAppySum = 0;
totalPrice.acctPay = 0;
totalPrice.cashPayamt = 0;
totalPrice.counts = 0;
totalPrice.setlCnt = 0;
totalPrice.medSumfee = 0.00;
occurrenceTime.value = [
formatDateStr(getFirstDayOfMonth(new Date()), 'YYYY-MM-DD'), // 当前月份的第一天
formatDateStr(new Date(), 'YYYY-MM-DD') // 当天
]
purchaseinventoryList.value = []
queryParams.value = {
setlOptins: '229900',
filePath: undefined,
orgId: undefined,
clrType: undefined,
fileQuryNo: undefined,
stmtBegnDate: undefined,
stmtEndDate: undefined,
}
}
function handOperatedReconcileAccounts() {
const params = { ...totalPrice }
params.clrOptins = queryParams.value.setlOptins ? queryParams.value.setlOptins : ""
params.begndate = occurrenceTime.value[0] ? occurrenceTime.value[0] + ' 00:00:00' : ""
params.enddate = occurrenceTime.value[1] ? occurrenceTime.value[1] + ' 23:59:59' : ""
params.clrType = queryParams.value.clrType ? queryParams.value.clrType : ""
params.insutype = queryParams.value.insutype ? queryParams.value.insutype : ""
handOperatedApplyReconcileAccounts(params).then(res => {
}).catch(err => {
proxy.$message.error('对账失败')
})
}
//点击列表当前行
function handleRowClick(row) {
// editRowTK.value = row
console.log(row,"row")
console.log(row, "row")
// if(row.returnStatus==1){
// loadingReturn.value = true
// generatedReturnDetail(row.supplyBusNo).then((response) => {
@@ -489,7 +471,7 @@ function handleRowClick(row) {
// // k.returnStatus_text = k.returnStatus==1?'已退库':''
// k.originalSupplyBusNo = k.originalSupplyBusNo?k.originalSupplyBusNo:row.supplyBusNo
// })
// })
// loadingReturn.value = false
// }

View File

@@ -83,6 +83,14 @@
>重置</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
>导出</el-button>
</el-col>
</el-row>
<el-table
@@ -107,6 +115,14 @@
width="140"
:show-overflow-tooltip="true"
/>
<el-table-column
label="单据号"
align="center"
key="supplyBusno"
prop="supplyBusno"
width="200"
:show-overflow-tooltip="true"
/>
<el-table-column
label="项目名称"
align="center"
@@ -149,6 +165,13 @@
prop="locationName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="货位"
align="center"
key="locationStoreName"
prop="locationStoreName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="单位"
align="center"
@@ -156,15 +179,50 @@
prop="unitCode_dictText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="采购单价"
align="center"
key="price"
prop="price"
:show-overflow-tooltip="true"
/>
<el-table-column
label="报损数量"
align="center"
key="itemQuantity"
prop="itemQuantity"
:show-overflow-tooltip="true"
/>
<el-table-column
label="报损金额"
align="center"
key="totalPrice"
prop="totalPrice"
:show-overflow-tooltip="true"
/>
<el-table-column
label="供应商"
align="center"
key="supplier"
prop="supplier"
:show-overflow-tooltip="true"
/>
<el-table-column
label="审核人"
align="center"
key="approverId_dictText"
prop="approverId_dictText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="制单日期"
align="center"
key="occurrenceTime"
prop="occurrenceTime"
:show-overflow-tooltip="true"
/>
<el-table-column
label="报损日期"
label="审批日期"
align="center"
key="approvalTime"
prop="approvalTime"
@@ -194,6 +252,7 @@ import {
} from "./statisticalManagent";
const { proxy } = getCurrentInstance();
const route = useRoute();
const purchaseinventoryList = ref([]);
const loading = ref(true);
@@ -219,6 +278,30 @@ const data = reactive({
const { queryParams, form, rules } = toRefs(data);
// 监听路由变化
watch(
() => route.query,
(newQuery) => {
// 如果路由中包含指定参数,则使用这些参数进行查询
if (newQuery.purposeLocationId || newQuery.occurrenceTimeSTime || newQuery.occurrenceTimeETime) {
// 设置查询参数
if (newQuery.purposeLocationId) {
queryParams.value.purposeLocationId = newQuery.purposeLocationId;
}
if (newQuery.occurrenceTimeSTime) {
queryParams.value.occurrenceTimeSTime = newQuery.occurrenceTimeSTime + ' 00:00:00';
}
if (newQuery.occurrenceTimeETime) {
queryParams.value.occurrenceTimeETime = newQuery.occurrenceTimeETime + ' 23:59:59';
}
// 执行查询
getList();
}
},
{ immediate: true }
);
function getPharmacyCabinetLists() {
getPharmacyCabinetList().then((response) => {
locationIdList.value = response.data
@@ -268,6 +351,13 @@ function handleSelectionChange(selection) {
multiple.value = !selection.length;
}
/** 导出按钮操作 */
function handleExport() {
proxy.$download.downloadGet("report-manage/loss/excel-out", {
...queryParams.value
}, `dict_${new Date().getTime()}.xlsx`);
}
getList();
getPharmacyCabinetLists()
</script>

View File

@@ -466,7 +466,7 @@ import { watch } from "vue";
import { endsWith } from "lodash";
const userStore = useUserStore();
const router = useRouter();
const route = useRoute();
const { proxy } = getCurrentInstance();
const totalAmount = ref(0);
const {
@@ -526,6 +526,29 @@ watch(
},
{ immediate: true }
);
// 监听路由变化
watch(
() => route.query,
(newQuery) => {
// 如果路由中包含指定参数,则使用这些参数进行查询
if (newQuery.purposeLocationId || newQuery.occurrenceTimeSTime || newQuery.occurrenceTimeETime) {
// 设置查询参数
if (newQuery.purposeLocationId) {
queryParams.value.locationId = newQuery.purposeLocationId;
}
if (newQuery.occurrenceTimeSTime) {
queryParams.value.dispenseTimeSTime = newQuery.occurrenceTimeSTime + ' 00:00:00';
}
if (newQuery.occurrenceTimeETime) {
queryParams.value.dispenseTimeETime = newQuery.occurrenceTimeETime + ' 23:59:59';
}
queryParams.value.flag = 1
// 执行查询
getList();
}
},
{ immediate: true }
);
/**计算合计金额 */
function handleTotalAmount() {
totalAmount.value = purchaseinventoryList.value.reduce(
@@ -668,6 +691,7 @@ function getList(type) {
getAmbPractitionerDetail(queryParams.value).then((res) => {
purchaseinventoryList.value = res.data.records
total.value = res.data.total;
loading.value = false;
if(purchaseinventoryList.value.length==0){
return
}
@@ -690,7 +714,6 @@ function getList(type) {
purchaseinventoryList.value.push({practitionerName:'合计',dispensePrice:dispensePrice,refundPrice:refundPrice})
}
}
loading.value = false;
// 带分页数据
if(total.value&&total.value>queryParams.value.pageSize){
let queryParamsValue = {

View File

@@ -1,11 +1,3 @@
<!--
* @Author: X_bo v-hss@tbpartners.local
* @Date: 2025-09-01 16:37:41
* @LastEditTime: 2025-09-02 17:21:49
* @LastEditors: X_bo v-hss@tbpartners.local
* @Description:
* @FilePath: \openhis-ui-vue3\src\views\medicationmanagement\statisticalManagement\pharmacyMonthlybalance.vue
-->
<template>
<div class="app-container">
<el-row>
@@ -94,6 +86,14 @@
icon="Search"
@click="handleRightQuery"
>查询</el-button>
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
:disabled="!rightQueryParams.orgId"
>导出Excel</el-button
>
</el-form-item>
</el-form>
@@ -108,6 +108,7 @@
<el-table-column label="生产厂家" prop="manufacturerText" width="500" :show-overflow-tooltip="true" />
<el-table-column label="数量" prop="totalQuantity" width="100" :show-overflow-tooltip="true" />
<el-table-column label="单位" prop="unitCode_dictText" width="100" :show-overflow-tooltip="true" />
<el-table-column label="单价" prop="unitPrice" width="100" :show-overflow-tooltip="true" />
<el-table-column label="项目总价" prop="totalMoney" width="120" :show-overflow-tooltip="true" />
<el-table-column label="所属科室" prop="orgId_dictText" width="150" :show-overflow-tooltip="true" />
<el-table-column label="发放时间" prop="dispenseTime" width="240" :show-overflow-tooltip="true">
@@ -204,9 +205,9 @@ function getRightList() {
rightLoading.value = true;
getMedDevInfo(rightQueryParams.value).then((res) => {
console.log(res)
rightTableData.value = res.data.data.records || [];
rightTableData.value = res.data.records || [];
// 设置总条数
rightTotal.value = res.data.data.total || 0;
rightTotal.value = res.data.total || 0;
rightLoading.value = false;
}).catch(() => {
rightLoading.value = false;
@@ -293,6 +294,12 @@ function handleCurrentChange(val) {
rightQueryParams.value.pageNo = val;
getRightList();
}
/** 导出按钮操作 */
function handleExport() {
proxy.$download.downloadGet("report-manage/medication-device/excel-out", {
...rightQueryParams.value,
}, `config_${new Date().getTime()}.xlsx`);
}
</script>
<style scoped>

View File

@@ -138,6 +138,14 @@
>重置</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
>导出</el-button>
</el-col>
</el-row>
<el-table
@@ -276,13 +284,13 @@
<el-table-column
label="制单日期"
align="center"
key="createTime"
prop="createTime"
key="occurrenceTime"
prop="occurrenceTime"
width="160"
:show-overflow-tooltip="true"
>
<template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
<span>{{ parseTime(scope.row.occurrenceTime) }}</span>
</template>
</el-table-column>
<el-table-column
@@ -316,6 +324,7 @@ import {
} from "./statisticalManagent";
const { proxy } = getCurrentInstance();
const route = useRoute();
// const {
// item_type
@@ -347,8 +356,8 @@ const data = reactive({
purposeLocationId: undefined,
categoryType: undefined,
supplierId: undefined,
createTimeSTime:undefined,
createTimeETime:undefined,
occurrenceTimeSTime:undefined,
occurrenceTimeETime:undefined,
},
rules: {},
});
@@ -363,6 +372,12 @@ function getPharmacyCabinetLists() {
supplierListOptions.value = response.data.supplierListOptions
})
}
/** 导出按钮操作 */
function handleExport() {
proxy.$download.downloadGet("report-manage/inbound/excel-out", {
...queryParams.value
}, `dict_${new Date().getTime()}.xlsx`);
}
/** 查询调拨管理项目列表 */
function getList() {
loading.value = true;
@@ -373,13 +388,37 @@ function getList() {
});
}
// 监听路由变化
watch(
() => route.query,
(newQuery) => {
// 如果路由中包含指定参数,则使用这些参数进行查询
if (newQuery.purposeLocationId || newQuery.occurrenceTimeSTime || newQuery.occurrenceTimeETime) {
// 设置查询参数
if (newQuery.purposeLocationId) {
queryParams.value.purposeLocationId = newQuery.purposeLocationId;
}
if (newQuery.occurrenceTimeSTime) {
queryParams.value.occurrenceTimeSTime = newQuery.occurrenceTimeSTime + ' 00:00:00';
}
if (newQuery.occurrenceTimeETime) {
queryParams.value.occurrenceTimeETime = newQuery.occurrenceTimeETime + ' 23:59:59';
}
// 执行查询
getList();
}
},
{ immediate: true }
);
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.createTimeSTime =
queryParams.value.occurrenceTimeSTime =
approvalTime.value && approvalTime.value.length == 2
? approvalTime.value[0] + " 00:00:00"
: "";
queryParams.value.createTimeETime =
queryParams.value.occurrenceTimeETime =
approvalTime.value && approvalTime.value.length == 2
? approvalTime.value[1] + " 23:59:59"
: "";
@@ -390,8 +429,8 @@ function handleQuery() {
/** 清空条件按钮操作 */
function handleClear() {
// 清空查询条件
queryParams.value.createTimeSTime = ""
queryParams.value.createTimeETime = ""
queryParams.value.occurrenceTimeSTime = ""
queryParams.value.occurrenceTimeETime = ""
approvalTime.value = ""
proxy.resetForm("queryRef");
getList();

View File

@@ -138,6 +138,14 @@
>重置</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
>导出</el-button>
</el-col>
</el-row>
<el-table
@@ -293,13 +301,13 @@
<el-table-column
label="制单日期"
align="center"
key="createTime"
prop="createTime"
key="occurrenceTime"
prop="occurrenceTime"
width="160"
:show-overflow-tooltip="true"
>
<template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
<span>{{ parseTime(scope.row.occurrenceTime) }}</span>
</template>
</el-table-column>
<el-table-column
@@ -333,6 +341,7 @@ import {
} from "./statisticalManagent";
const { proxy } = getCurrentInstance();
const route = useRoute();
// const {
// item_type
// } = proxy.useDict(
@@ -363,14 +372,38 @@ const data = reactive({
purposeLocationId: undefined,
categoryType: undefined,
supplierId: undefined,
createTimeSTime:undefined,
createTimeETime:undefined,
occurrenceTimeSTime:undefined,
occurrenceTimeETime:undefined,
},
rules: {},
});
const { queryParams, form, rules } = toRefs(data);
// 监听路由变化
watch(
() => route.query,
(newQuery) => {
// 如果路由中包含指定参数,则使用这些参数进行查询
if (newQuery.purposeLocationId || newQuery.occurrenceTimeSTime || newQuery.occurrenceTimeETime) {
// 设置查询参数
if (newQuery.purposeLocationId) {
queryParams.value.purposeLocationId = newQuery.purposeLocationId;
}
if (newQuery.occurrenceTimeSTime) {
queryParams.value.occurrenceTimeSTime = newQuery.occurrenceTimeSTime + ' 00:00:00';
}
if (newQuery.occurrenceTimeETime) {
queryParams.value.occurrenceTimeETime = newQuery.occurrenceTimeETime + ' 23:59:59';
}
// 执行查询
getList();
}
},
{ immediate: true }
);
function getPharmacyCabinetLists() {
getPharmacyCabinetList().then((response) => {
locationIdList.value = response.data
@@ -391,11 +424,11 @@ function getList() {
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.createTimeSTime =
queryParams.value.occurrenceTimeSTime =
approvalTime.value && approvalTime.value.length == 2
? approvalTime.value[0] + " 00:00:00"
: "";
queryParams.value.createTimeETime =
queryParams.value.occurrenceTimeETime =
approvalTime.value && approvalTime.value.length == 2
? approvalTime.value[1] + " 23:59:59"
: "";
@@ -406,8 +439,8 @@ function handleQuery() {
/** 清空条件按钮操作 */
function handleClear() {
// 清空查询条件
queryParams.value.createTimeSTime = ""
queryParams.value.createTimeETime = ""
queryParams.value.occurrenceTimeSTime = ""
queryParams.value.occurrenceTimeETime = ""
approvalTime.value = ""
proxy.resetForm("queryRef");
getList();
@@ -420,6 +453,12 @@ function handleSelectionChange(selection) {
multiple.value = !selection.length;
}
/** 导出按钮操作 */
function handleExport() {
proxy.$download.downloadGet("report-manage/purchase-return/excel-out", {
...queryParams.value
}, `dict_${new Date().getTime()}.xlsx`);
}
getList();
getPharmacyCabinetLists()

Some files were not shown because too many files have changed in this diff Show More