This commit is contained in:
ChenQiuYu 2025-04-29 16:27:35 +08:00
parent 5caab6347d
commit bdb62f0399
22 changed files with 1156 additions and 752 deletions

View File

@ -1,9 +1,7 @@
<template> <template>
<el-popover placement="bottom-start" trigger="click" :width="props.width"> <el-popover placement="bottom-start" trigger="click" :width="props.width">
<template #reference> <template #reference>
<el-input v-model="input" :style="{'width': props.width+'px'}" clearable></el-input> <el-input v-model="input" :style="{'width': props.width+'px'}" clearable :disabled="disabled"></el-input>
</template> </template>
<div class="code-popo" v-if="props.list.length > 0"> <div class="code-popo" v-if="props.list.length > 0">
<div class="code-item" v-for="item in props.list"> <div class="code-item" v-for="item in props.list">
@ -16,6 +14,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from "vue"; import {ref} from "vue";
const input = defineModel<string | null>(); const input = defineModel<string | null>();
const props = defineProps({ const props = defineProps({
list: { list: {
@ -25,6 +24,10 @@ const props = defineProps({
width: { width: {
type: Number, type: Number,
default: 1000 default: 1000
},
disabled: {
type: Boolean,
default: false
} }
}) })
@ -38,11 +41,13 @@ const inputStr = (str: string) => {
<style scoped lang="scss"> <style scoped lang="scss">
.code-popo { .code-popo {
width: 100%; width: 100%;
.code-item { .code-item {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 5px 0; padding: 5px 0;
border-bottom: 1px solid #DDDDDD; border-bottom: 1px solid #DDDDDD;
.code-item-name { .code-item-name {
float: left; float: left;
font-size: 16px; font-size: 16px;
@ -50,9 +55,11 @@ const inputStr = (str: string) => {
padding: 5px; padding: 5px;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
color: #000; color: #000;
} }
&:after { &:after {
clear: both; clear: both;
} }

View File

@ -10,6 +10,7 @@
clearable clearable
@input="changeInput" @input="changeInput"
class="no-border-input" class="no-border-input"
:disabled="disabled"
> >
</el-input> </el-input>
</template> </template>
@ -63,6 +64,10 @@ const props = defineProps({
placeholder: { placeholder: {
type: String, type: String,
default: "" default: ""
},
disabled: {
type: Boolean,
default: false
} }
}); });

View File

@ -18,8 +18,8 @@ const {
_isShow.value = isShow == null ? false : isShow; _isShow.value = isShow == null ? false : isShow;
_showFooter.value = showFooter == null ? false : showFooter; _showFooter.value = showFooter == null ? false : showFooter;
_width.value = width == null ? 1200 : width; _width.value = width == null ? 1200 : Number(width);
_height.value = height == null ? 800 : height; _height.value = height == null ? 800 : Number(height);
_close.value = close == null ? true : close; _close.value = close == null ? true : close;
watch(() => isShow, (newVal) => { watch(() => isShow, (newVal) => {
@ -45,9 +45,7 @@ const closeBtn = () => {
</div> </div>
</div> </div>
<div class="content" > <div class="content" >
<el-scrollbar style="height:100%;margin-top: 0">
<slot></slot> <slot></slot>
</el-scrollbar>
</div> </div>
<div class="footer" v-if="_showFooter"> <div class="footer" v-if="_showFooter">
<slot name="footer"></slot> <slot name="footer"></slot>

View File

@ -1,5 +1,7 @@
<template> <template>
<Mask :is-show="isShow" :height="900" @close="exit" title="新增" :show-footer="true"> <Mask :is-show="isShow" :height="900" @close="exit" title="新增" :show-footer="true">
<template #default>
<el-scrollbar>
<div class="header"> <div class="header">
<el-button type="primary" style="margin-top: 10px" round class="btn" @click="openCreateSearch" v-if="_type!=0" <el-button type="primary" style="margin-top: 10px" round class="btn" @click="openCreateSearch" v-if="_type!=0"
plain> plain>
@ -115,7 +117,8 @@
<el-descriptions-item label="最小包装数量|单位"> <el-descriptions-item label="最小包装数量|单位">
<el-form-item> <el-form-item>
<div class="unit-item"> <div class="unit-item">
<el-input ref="minPackagingRef" v-model="edit_data.minPackagingNumber" type="number" class="input" <el-input ref="minPackagingRef" v-model="edit_data.minPackagingNumber" type="number"
class="input"
style="width: 200px;"> style="width: 200px;">
</el-input> </el-input>
<el-popover <el-popover
@ -170,7 +173,10 @@
id="code-pop" id="code-pop"
class="code-popo" class="code-popo"
> >
<div style="color: #6c6b6b;font-size: 12px">已关联({{ idCodeList ? idCodeList.length : 0 }})</div> <div style="color: #6c6b6b;font-size: 12px">已关联({{
idCodeList ? idCodeList.length : 0
}})
</div>
<Divider/> <Divider/>
<div class="item"> <div class="item">
<div v-for="(item,index) in idCodeList" :key="index"> <div v-for="(item,index) in idCodeList" :key="index">
@ -341,6 +347,9 @@
</el-aside> </el-aside>
</el-container> </el-container>
</div> </div>
</el-scrollbar>
</template>
<template #footer> <template #footer>
<div class="footer"> <div class="footer">
<el-button @click="returnInit" type="primary" v-if="edit_data.id != null">医保库存重新初始化</el-button> <el-button @click="returnInit" type="primary" v-if="edit_data.id != null">医保库存重新初始化</el-button>

View File

@ -15,10 +15,11 @@
<div class="container"> <div class="container">
<el-form :model="formDate" label-width="auto" ref="formRef"> <el-form :model="formDate" label-width="auto" ref="formRef">
<el-form-item label="主诉"> <el-form-item label="主诉">
<PopoverInput v-model="formDate.mainAppeal" :list="mainAppealList"/> <PopoverInput :disabled="disabled" v-model="formDate.mainAppeal" :list="mainAppealList"/>
</el-form-item> </el-form-item>
<el-form-item label="诊断"> <el-form-item label="诊断">
<DiagnosisSearchInput <DiagnosisSearchInput
:disabled="disabled"
:request-api="diagnosisSearchApi" :request-api="diagnosisSearchApi"
:show-config="diagnosisShowConfig" :show-config="diagnosisShowConfig"
@selectedCallBack="diagnosisSelect" @selectedCallBack="diagnosisSelect"
@ -26,31 +27,31 @@
</DiagnosisSearchInput> </DiagnosisSearchInput>
</el-form-item> </el-form-item>
<el-form-item label="现病史"> <el-form-item label="现病史">
<PopoverInput v-model="formDate.nowMedicalHistory" :list="nowMedicalHistoryList"/> <PopoverInput :disabled="disabled" v-model="formDate.nowMedicalHistory" :list="nowMedicalHistoryList"/>
</el-form-item> </el-form-item>
<el-form-item label="既往史"> <el-form-item label="既往史">
<PopoverInput v-model="formDate.beforeMedicalHistory" :list="beforeMedicalHistoryList"/> <PopoverInput :disabled="disabled" v-model="formDate.beforeMedicalHistory" :list="beforeMedicalHistoryList"/>
</el-form-item> </el-form-item>
<el-form-item label="过敏史"> <el-form-item label="过敏史">
<PopoverInput v-model="formDate.allergyHistory" :list="allergyHistoryList"/> <PopoverInput :disabled="disabled" v-model="formDate.allergyHistory" :list="allergyHistoryList"/>
</el-form-item> </el-form-item>
<el-form-item label="体格检查"> <el-form-item label="体格检查">
<PhysiqueExamInuput v-model="formDate.exam" :list="physiqueExamList"/> <PhysiqueExamInuput :disabled="disabled" v-model="formDate.exam" :list="physiqueExamList"/>
</el-form-item> </el-form-item>
<el-form-item label="望闻问切" v-if="modelType==1"> <el-form-item label="望闻问切" v-if="modelType==1">
<PopoverInput v-model="formDate.chinaAdjunctCheck" :list="chinaAdjunctCheckList"/> <PopoverInput :disabled="disabled" v-model="formDate.chinaAdjunctCheck" :list="chinaAdjunctCheckList"/>
</el-form-item> </el-form-item>
<el-form-item label="治法" v-if="modelType==1"> <el-form-item label="治法" v-if="modelType==1">
<el-input v-model="formDate.chinaDeal"></el-input> <el-input v-model="formDate.chinaDeal" :disabled="disabled"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="口腔检查" v-if="modelType==2"> <el-form-item label="口腔检查" v-if="modelType==2">
<el-input v-model="formDate.mouthCheck"></el-input> <el-input :disabled="disabled" v-model="formDate.mouthCheck"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="辅助检查" v-if="modelType==2 || modelType ==0"> <el-form-item label="辅助检查" v-if="modelType==2 || modelType ==0">
<el-input v-model="formDate.adjunctCheck"></el-input> <el-input :disabled="disabled" v-model="formDate.adjunctCheck"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="处置" v-if="modelType==0 || modelType ==2"> <el-form-item label="处置" v-if="modelType==0 || modelType ==2">
<el-input v-model="formDate.deal"></el-input> <el-input :disabled="disabled" v-model="formDate.deal"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -58,7 +59,7 @@
</Panel> </Panel>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from "vue"; import {computed, ref} from "vue";
import { import {
mainAppealList, mainAppealList,
nowMedicalHistoryList, nowMedicalHistoryList,
@ -71,6 +72,17 @@ import PopoverInput from "@/components/PopoverInput.vue";
import DiagnosisSearchInput from "@/components/outpatient/DiagnosisSearchInput.vue"; import DiagnosisSearchInput from "@/components/outpatient/DiagnosisSearchInput.vue";
import PhysiqueExamInuput from "@/components/outpatient/PhysiqueExamInuput.vue"; import PhysiqueExamInuput from "@/components/outpatient/PhysiqueExamInuput.vue";
const props = defineProps({
status: {
type: Number,
default: 0
}
})
const disabled = computed(() => {
if(props.status === 1){
return true
}
})
const formDate = defineModel<any>(); const formDate = defineModel<any>();
const modelType = ref(0) const modelType = ref(0)
@ -95,6 +107,7 @@ const diagnosisSelect = (list: any) => {
formDate.value.diagnosisDetail = JSON.stringify(list) formDate.value.diagnosisDetail = JSON.stringify(list)
formDate.value.diagnosisSummary = diagnosisNames formDate.value.diagnosisSummary = diagnosisNames
} }
defineExpose({diagnosisSelect})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.content { .content {

View File

@ -1,7 +1,8 @@
<template> <template>
<el-popover placement="bottom-start" trigger="click" :width="props.width" ref="popoverRef" @before-enter="beforeShow"> <el-popover placement="bottom-start" trigger="click" :width="props.width" ref="popoverRef" @before-enter="beforeShow">
<template #reference> <template #reference>
<el-input v-model="keyword" :style="{'width': props.width+'px'}" @input="changeInput" placeholder="诊断选择"></el-input> <el-input v-model="keyword" :style="{'width': props.width+'px'}" @input="changeInput" :disabled="disabled"
placeholder="诊断选择"></el-input>
</template> </template>
<div class="container" v-if="searchList.length > 0"> <div class="container" v-if="searchList.length > 0">
<el-table :data="searchList" style="width: 100%" @row-click="clickRow" :show-header="props.showHeader" <el-table :data="searchList" style="width: 100%" @row-click="clickRow" :show-header="props.showHeader"
@ -40,6 +41,10 @@ const props = defineProps({
showHeader: { showHeader: {
type: Boolean, type: Boolean,
default: true default: true
},
disabled: {
type: Boolean,
default: false
} }
}) })
@ -91,7 +96,6 @@ const init = (list:any,nList:any) => {
selectList.value = list; selectList.value = list;
nameList.value = nList; nameList.value = nList;
keyword.value = nameList.value.join(",") + "," keyword.value = nameList.value.join(",") + ","
} }
defineExpose({init}) defineExpose({init})
</script> </script>

View File

@ -1,13 +1,9 @@
<template> <template>
<div class="disease-detail"> <div class="disease-detail">
<div class="top">
<span>复制全部医嘱</span>
<span>复制病例</span>
</div>
<div class="content"> <div class="content">
<div class="content-title"> <div class="content-title">
<div class="name">病例</div> <div class="name">病例</div>
<button class="btn">复制</button> <button class="btn" @click="copy">复制</button>
</div> </div>
<div class="content-middle"> <div class="content-middle">
<p>主诉:{{ detailObj.diagnosisMedicalRecord.mainAppeal }}</p> <p>主诉:{{ detailObj.diagnosisMedicalRecord.mainAppeal }}</p>
@ -16,20 +12,27 @@
<p>体查:{{ detailObj.diagnosisMedicalRecord.exam }}</p> <p>体查:{{ detailObj.diagnosisMedicalRecord.exam }}</p>
<p>复查:{{ detailObj.diagnosisMedicalRecord.allergy }}</p> <p>复查:{{ detailObj.diagnosisMedicalRecord.allergy }}</p>
<p>过敏:{{ detailObj.diagnosisMedicalRecord.allergyHistory }}</p> <p>过敏:{{ detailObj.diagnosisMedicalRecord.allergyHistory }}</p>
<p>诊断:{{ detailObj.diagnosisMedicalRecord.pastMedicalHistory }}</p> <p>诊断:{{ detailObj.diagnosisMedicalRecord.diagnosisSummary}}</p>
<p>处置:{{ detailObj.diagnosisMedicalRecord.treatment }}</p> <p>处置:{{ detailObj.diagnosisMedicalRecord.treatment }}</p>
</div> </div>
</div> </div>
<div class="content"> <div class="content">
<div class="content-title"> <div class="content-title">
<div class="name">服务项目</div> <div class="name">服务项目</div>
<button class="btn">复制</button> <button class="btn" @click="copyItem">复制</button>
</div> </div>
<div class="content-middle"> <div class="content-middle">
<div class="item" v-for="item in detailObj.itemDetail"> <div class="item" v-for="item in detailObj.itemDetail">
<div class="name">{{item.name}}</div> <el-tooltip
class="box-item"
effect="dark"
:content="item.itemName"
placement="bottom-start"
>
<div class="name">{{ item.itemName }}</div>
</el-tooltip>
<div class="price"> <div class="price">
<div class="price-left">{{item.unit}}</div> <div class="price-left">{{ item.selectedNum || 0 }}{{ item.selectedUnit }}</div>
<div class="price-right">{{ item.unitPrice }}</div> <div class="price-right">{{ item.unitPrice }}</div>
</div> </div>
</div> </div>
@ -38,11 +41,18 @@
<div class="content"> <div class="content">
<div class="content-title"> <div class="content-title">
<div class="name">药品耗材</div> <div class="name">药品耗材</div>
<button class="btn">复制</button> <button class="btn" @click="copyGoods">复制</button>
</div> </div>
<div class="content-middle"> <div class="content-middle">
<div class="item" v-for="item in detailObj.goodsDetail"> <div class="item" v-for="item in detailObj.goodsDetail">
<el-tooltip
class="box-item"
effect="dark"
:content="item.name"
placement="bottom-start"
>
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
</el-tooltip>
<div class="price"> <div class="price">
<div class="price-left">{{ item.selectedNum || 0 }}{{ item.selectedUnit }}</div> <div class="price-left">{{ item.selectedNum || 0 }}{{ item.selectedUnit }}</div>
<div class="price-right">{{ item.selectedPrice }}</div> <div class="price-right">{{ item.selectedPrice }}</div>
@ -68,9 +78,19 @@ import {ref, defineProps, onMounted} from 'vue'
const {detail} = defineProps(['detail']); const {detail} = defineProps(['detail']);
const detailObj = ref<any>(detail) const detailObj = ref<any>(detail)
const sumPrice = ref(0) const sumPrice = ref(0)
const emit = defineEmits(['copy', 'copyItem', 'copyGoods'])
const copy = () => {
emit('copy', detailObj.value)
}
const copyItem = () => {
emit('copyItem', detailObj.value)
}
const copyGoods = () => {
emit('copyGoods', detailObj.value)
}
onMounted(() => { onMounted(() => {
const pharmaceuticalTotalAmount = detailObj.value.itemDetail.reduce((pre: any, cur: any) => { const pharmaceuticalTotalAmount = detailObj.value.itemDetail.reduce((pre: any, cur: any) => {
return pre + cur.unitPrice return pre + cur.selectedNum * cur.selectedPrice
}, 0); }, 0);
const serviceTotalAmount = detailObj.value.goodsDetail.reduce((pre: any, cur: any) => { const serviceTotalAmount = detailObj.value.goodsDetail.reduce((pre: any, cur: any) => {
@ -114,7 +134,6 @@ onMounted(()=>{
.name { .name {
font-weight: bold; font-weight: bold;
font-size: 16px; font-size: 16px;
color: #333333;
} }
.btn { .btn {
@ -139,8 +158,16 @@ onMounted(()=>{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 8px; margin-bottom: 8px;
.name{
white-space: nowrap; /* 防止文本换行 */
overflow: hidden; /* 隐藏溢出的文本 */
text-overflow: ellipsis; /* 显示省略号 */
width: 100px;
}
.price { .price {
display: flex; display: flex;
.price-left { .price-left {
margin-right: 38px; margin-right: 38px;
} }

View File

@ -19,7 +19,7 @@
</div> </div>
</template> </template>
<div> <div>
<DiseaseDetails :detail="item"></DiseaseDetails> <DiseaseDetails :detail="item" @copy="copy" @copyItem="copyItem" @copyGoods="copyGoods"></DiseaseDetails>
</div> </div>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
@ -41,6 +41,16 @@ const init = (patientId: any) => {
const clearList = () => { const clearList = () => {
list.value = [] list.value = []
} }
const emit = defineEmits(['copy','copyItem','copyGoods'])
const copy = (item: any) => {
emit('copy', item)
}
const copyItem = (item: any) => {
emit('copyItem', item)
}
const copyGoods = (item: any) => {
emit('copyGoods', item)
}
defineExpose({init,clearList}) defineExpose({init,clearList})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -44,6 +44,7 @@ import Panel from "@/components/common/Panel.vue";
import {post} from "@/utils/request.ts"; import {post} from "@/utils/request.ts";
import {formatTime} from "@/utils/dateUtils.ts"; import {formatTime} from "@/utils/dateUtils.ts";
import {apiConfig} from "@/assets/config/apiConfig.ts"; import {apiConfig} from "@/assets/config/apiConfig.ts";
import {ElMessageBox} from "element-plus";
const props = defineProps({ const props = defineProps({
status: { status: {
@ -82,7 +83,9 @@ const statusList = ref<any>([
num: 0 num: 0
} }
]) ])
const itemId=defineModel()
onMounted(() => { onMounted(() => {
curItem.value = itemId
initStatusList() initStatusList()
init() init()
}) })
@ -126,8 +129,8 @@ const clickLi = (item: any) => {
curItem.value = item curItem.value = item
emit('getId', item) emit('getId', item)
} }
watch(() => props.status, () => { watch(() => props.status, () => {
curItem.value = ''
initStatusList() initStatusList()
init() // init() //
}) })

View File

@ -37,6 +37,7 @@
:show-config="itemShowConfig" :show-config="itemShowConfig"
@selectedCallBack="itemSelect" @selectedCallBack="itemSelect"
:placeholder="'请输入药材名称'" :placeholder="'请输入药材名称'"
:disabled="disabled"
> >
</SearchInput> </SearchInput>
</div> </div>
@ -51,9 +52,19 @@
import Panel from "@/components/common/Panel.vue"; import Panel from "@/components/common/Panel.vue";
import SearchInput from "@/components/SearchInput.vue"; import SearchInput from "@/components/SearchInput.vue";
import {CircleClose} from "@element-plus/icons-vue"; import {CircleClose} from "@element-plus/icons-vue";
import {watch,ref} from "vue"; import {watch, ref, computed} from "vue";
const props = defineProps({
status: {
type: Number,
default: 0
}
})
const disabled=computed(()=>{
if(props.status === 1){
return true
}
})
const itemSearchApi = "goods/goods/search"; const itemSearchApi = "goods/goods/search";
const itemShowConfig = [ const itemShowConfig = [
{ {

View File

@ -1,7 +1,7 @@
<template> <template>
<el-popover placement="bottom-start" trigger="click" :width="props.width"> <el-popover placement="bottom-start" trigger="click" :width="props.width">
<template #reference> <template #reference>
<el-input v-model="input" :style="{'width': props.width+'px'}" clearable></el-input> <el-input v-model="input" :style="{'width': props.width+'px'}" clearable :disabled="disabled"></el-input>
</template> </template>
<el-tabs v-model="tabName" class="demo-tabs"> <el-tabs v-model="tabName" class="demo-tabs">
<el-tab-pane v-for="item in props.list" :label="item.name" :name="item.name"> <el-tab-pane v-for="item in props.list" :label="item.name" :name="item.name">
@ -41,6 +41,10 @@ const props = defineProps({
width: { width: {
type: Number, type: Number,
default: 1000 default: 1000
},
disabled: {
type: Boolean,
default: false
} }
}) })

View File

@ -27,6 +27,7 @@
:show-config="serviceShowConfig" :show-config="serviceShowConfig"
@selectedCallBack="serviceSelect" @selectedCallBack="serviceSelect"
:placeholder="'请输入项目名称'" :placeholder="'请输入项目名称'"
:disabled="disabled"
> >
</SearchInput> </SearchInput>
</div> </div>
@ -35,10 +36,22 @@
</Panel> </Panel>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {defineModel, computed} from "vue";
import Panel from "@/components/common/Panel.vue"; import Panel from "@/components/common/Panel.vue";
import {CircleClose} from '@element-plus/icons-vue' import {CircleClose} from '@element-plus/icons-vue'
import SearchInput from "@/components/SearchInput.vue"; import SearchInput from "@/components/SearchInput.vue";
const props=defineProps({
status: {
type: Number,
default: 0
}
})
const disabled = computed(() => {
if(props.status === 1){
return true
}
})
const serviceSearchApi = "item/search"; const serviceSearchApi = "item/search";
const serviceShowConfig = [ const serviceShowConfig = [
{ {
@ -63,6 +76,7 @@ const list = defineModel<any[]>({default: () => []});
const deleteItem = (id: any) => { const deleteItem = (id: any) => {
list.value = list.value.filter((item) => item.id !== id); list.value = list.value.filter((item) => item.id !== id);
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -0,0 +1,111 @@
<template>
<Mask :top="100" :width="400" :height="400" :is-show="show">
<CloseBtn @click="close"></CloseBtn>
<el-card>
<template #header>
<span>添加用户</span>
</template>
<div>
<el-form
:model="userInfo"
ref="formDataRef"
:rules="rules"
label-width="80px"
>
<el-form-item label="姓名" prop="name">
<el-input v-model="userInfo.name"></el-input>
</el-form-item>
<el-form-item label="用户名" prop="username">
<el-input v-model="userInfo.username"></el-input>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input v-model="userInfo.password"></el-input>
</el-form-item>
<el-form-item label="人员类型" prop="type">
<el-select v-model="userInfo.type">
<el-option
v-for="item in personType"
:key="item.key"
:label="item.value"
:value="item.key"
>
</el-option>
</el-select>
</el-form-item>
<el-button type="primary" @click="save">保存</el-button>
<el-button @click="close">取消</el-button>
</el-form>
</div>
</el-card>
</Mask>
</template>
<script setup lang="ts">
import Mask from "@/components/Mask.vue";
import {type PropType, ref} from "vue";
import CloseBtn from "@/components/CloseBtn.vue";
import {post} from "@/utils/request.ts";
const props = defineProps({
saveCallback: {
type: Function as PropType<(args?: any) => void>,
default: () => {}
}
})
const personType = ref<any>([
{
key: "0",
value: "普通用户",
},
{
key: "1",
value: "管理员",
},
{
key: "2",
value: "医师",
}
]);
const show = ref<boolean>(false);
const userInfo = ref<any>({})
const formDataRef = ref();
const open = () => {
show.value = true;
};
const close = () => {
show.value = false;
props.saveCallback();
};
defineExpose({open})
const rules = {
name: [
{required: true, message: "请输入姓名", trigger: 'blur'}
],
username: [
{required: true, message: "请输入用户名", trigger: 'blur'}
],
password: [
{required: true, message: "请输入密码", trigger: 'blur'}
],
type: [
{required: true, message: "请输入人员类型", trigger: 'blur'}
]
}
const save = () => {
formDataRef.value?.validate((valid: boolean) => {
if (!valid) {
console.log("表单验证失败");
return;
}
//
post("setting/user/save", {userInfo: userInfo.value}).then((res: any) => {
formDataRef.value?.resetFields();
close()
});
});
}
</script>
<style scoped lang="scss">
</style>

View File

@ -0,0 +1,53 @@
<template>
<CloseBtn @click="close"></CloseBtn>
<el-form
:model="form"
>
<el-descriptions
:column="3"
border
title="详情"
direction="vertical"
label-width="20"
>
<el-descriptions-item label="名称">
<div>{{ form.name }}</div>
</el-descriptions-item>
<el-descriptions-item label="编码">
<div>{{ form.code }}</div>
</el-descriptions-item>
<el-descriptions-item label="状态">
<div>{{ form.status }}</div>
</el-descriptions-item>
<el-descriptions-item label="创建时间">
<div>{{ form.create_time }}</div>
</el-descriptions-item>
<el-descriptions-item label="状态">
<div>{{ form.status }}</div>
</el-descriptions-item>
<el-descriptions-item label="创建时间">
<div>{{ form.create_time }}</div>
</el-descriptions-item>
</el-descriptions>
</el-form>
</template>
<script setup lang="ts">
import {reactive,defineEmits} from "vue";
import {ElDescriptionsItem} from "element-plus";
import CloseBtn from "@/components/CloseBtn.vue";
const form= reactive({
name: '1',
code: '2',
status: '3',
create_time: '4',
})
const emit = defineEmits(['close'])
const close = () => {
emit('close')
}
</script>
<style scoped lang="scss">
</style>

View File

@ -1,15 +1,18 @@
<template> <template>
<Mask :is-show="isShow" @close="close" :title="props.id?'项目编辑':'项目新增'" :show-footer="true"> <Mask :is-show="isShow" width="400" height="550" @close="close" :title="props.id?'项目编辑':'项目新增'"
<div style="padding: 24px"> :show-footer="true">
<template #default>
<el-scrollbar>
<div style="padding: 0 24px">
<div class="header" style="width: 100%;display: flex;justify-content: center;margin-bottom: 10px"> <div class="header" style="width: 100%;display: flex;justify-content: center;margin-bottom: 10px">
<el-button type="primary" style="margin-top:10px" round class="btn" @click="openCreateSearch" <el-button type="primary" style="margin-top:10px" round class="btn" @click="openCreateSearch"
plain> plain>
一键建档 一键建档
</el-button> </el-button>
</div> </div>
<el-form :model="form" label-width="auto"> <el-form :model="form" label-width="auto" :rules="formRules">
<el-descriptions <el-descriptions
:column="3" :column="2"
direction="vertical" direction="vertical"
border border
> >
@ -19,38 +22,38 @@
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="单位"> <el-descriptions-item label="单位">
<el-form-item> <el-form-item prop="unit">
<el-input v-model.number="form.unit" min="0"> <el-input v-model.number="form.unit" min="0">
<template #append></template> <template #append></template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="原价">
<el-form-item>
<el-input v-model="form.purchaseUnitPrice">
<template #prefix>
</template>
</el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="售价">
<el-form-item>
<el-input v-model="form.unitPrice">
<template #prefix></template>
</el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="医保码"> <el-descriptions-item label="医保码">
<el-form-item> <el-form-item>
<el-input v-model="form.itemSocialCode"/> <el-input v-model="form.itemSocialCode"/>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="原价">
<el-form-item>
<el-input v-model="form.purchaseUnitPrice">
<template #append>
<el-button text @click="imageURL"></el-button>
</template>
</el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="售价">
<el-form-item>
<el-input v-model="form.unitPrice">
<template #append>
<el-button type="text" @click="imageURL"></el-button>
</template>
</el-input>
</el-form-item>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-form> </el-form>
</div> </div>
</el-scrollbar>
</template>
<template #footer> <template #footer>
<div class="bottom"> <div class="bottom">
<el-button type="primary" @click="save()">保存</el-button> <el-button type="primary" @click="save()">保存</el-button>
@ -157,9 +160,19 @@ const init = () => {
if (props.id) { if (props.id) {
post("item/getItemById", {id: props.id}).then((res: any) => { post("item/getItemById", {id: props.id}).then((res: any) => {
form.value = res form.value = res
form.value.unit = Number(res.unit)
}) })
} }
} }
const formRules = {
itemName: [
{required: true, message: '请输入项目名称', trigger: 'blur'},
],
unit: [
{required: true, message: '请输入单位', trigger: 'blur'},
{type: 'number', message: '单位必须为数字值'}
],
}
defineExpose({init}) defineExpose({init})
</script> </script>
<style scoped> <style scoped>

View File

@ -1,5 +1,6 @@
<template> <template>
<Mask :is-show="isShow" @close="exit" :width="800" :height="600" title="成员管理" :show-footer="true"> <Mask :is-show="isShow" @close="exit" :width="800" :height="600" title="成员管理" :show-footer="true">
<el-scrollbar>
<div style="padding: 24px"> <div style="padding: 24px">
<el-form :model="userInfo" label-width="auto" :rules="rules" ref="ruleFormRef" style="width: 100%;height: 100%"> <el-form :model="userInfo" label-width="auto" :rules="rules" ref="ruleFormRef" style="width: 100%;height: 100%">
<el-descriptions <el-descriptions
@ -117,6 +118,7 @@
</el-descriptions> </el-descriptions>
</el-form> </el-form>
</div> </div>
</el-scrollbar>
<template #footer> <template #footer>
<div class="bottom"> <div class="bottom">
<el-button type="primary" @click="save()">保存</el-button> <el-button type="primary" @click="save()">保存</el-button>

View File

@ -1,6 +1,6 @@
<template> <template>
<Mask :width="800" :height="600" :is-show="show" :top="100" @close="close" title="药品" :show-footer="true"> <Mask :width="800" :height="600" :is-show="show" :top="100" @close="close" title="药品" :show-footer="true">
<div class="search_content_wrapper"> <div class="search_content_wrapper" style="padding: 24px">
<div class="search_wrapper"> <div class="search_wrapper">
<span>项目名称:</span> <span>项目名称:</span>
<el-input <el-input
@ -8,8 +8,9 @@
v-model="keyword" v-model="keyword"
placeholder="请输入药品名称或者编号" placeholder="请输入药品名称或者编号"
@keydown.enter="search_social" @keydown.enter="search_social"
clearable/> clearable
<button @click="search_social">搜索</button> />
<el-button type="primary" @click="search_social">搜索</el-button>
</div> </div>
<div class="search_result"> <div class="search_result">
@ -86,14 +87,16 @@ let change_page = (page: number) => {
// }) // })
const change_current_search_data_index = (val: any) => { const change_current_search_data_index = (val: any) => {
current_search_data = JSON.parse(JSON.stringify(val)); current_search_data = JSON.parse(JSON.stringify(val));
console.log(current_search_data.id) // console.log(current_search_data.id)
// proos.changeData(current_search_data) // proos.changeData(current_search_data)
} }
const init = (_name: string) => { const init = (_name: string) => {
keyword.value = _name; keyword.value = _name;
show.value = true; show.value = true;
// init_search_data() if(_name != ''){
// search_social() init_search_data()
search_social()
}
}; };
defineExpose({init}); defineExpose({init});
@ -108,7 +111,7 @@ function init_search_data() {
} }
let confirm = () => { let confirm = () => {
let jsondata = current_search_data.json; let jsondata = current_search_data;
let data = { let data = {
id: null, id: null,
type: null, type: null,
@ -130,13 +133,10 @@ let confirm = () => {
regType: jsondata.reg_type, regType: jsondata.reg_type,
approvalNumber: jsondata.approval_number, approvalNumber: jsondata.approval_number,
category: jsondata.category category: jsondata.category
} }
} }
console.log("data", data)
emit('confirm', data) emit('confirm', data)
show.value = false; close()
} }
let isloading = ref(false); let isloading = ref(false);
@ -172,6 +172,7 @@ let search_social = () => {
} }
const close = () => { const close = () => {
show.value = false; show.value = false;
// search_result.value = {}
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -185,11 +186,8 @@ const close = () => {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
margin: auto;
margin-top: 24px;
border-radius: 10px; border-radius: 10px;
box-sizing: border-box; box-sizing: border-box;
padding: 10px;
} }
.search_wrapper { .search_wrapper {
@ -232,6 +230,7 @@ const close = () => {
width: 100%; width: 100%;
height: 400px; height: 400px;
} }
.bottom { .bottom {
height: 100%; height: 100%;
display: flex; display: flex;
@ -239,4 +238,7 @@ const close = () => {
align-items: center; align-items: center;
padding: 0 24px; padding: 0 24px;
} }
:deep(.el-input__wrapper){
width: 100%;
}
</style> </style>

View File

@ -1,5 +1,7 @@
<template> <template>
<Mask :is-show="isShow" @close="exit" :height="570" :title="props.id?'编辑':'新增'" :show-footer="true"> <Mask :is-show="isShow" @close="exit" :height="570" :title="props.id?'编辑':'新增'" :show-footer="true">
<template #default>
<el-scrollbar>
<div style="padding: 24px"> <div style="padding: 24px">
<el-form :model="form" label-width="auto"> <el-form :model="form" label-width="auto">
<el-descriptions <el-descriptions
@ -109,6 +111,8 @@
</el-descriptions> </el-descriptions>
</el-form> </el-form>
</div> </div>
</el-scrollbar>
</template>
<template #footer> <template #footer>
<div class="bottom"> <div class="bottom">
<el-button type="primary" @click="save()">保存</el-button> <el-button type="primary" @click="save()">保存</el-button>

View File

@ -1,22 +1,22 @@
<template> <template>
<div class="container"> <div class="container">
<div class="left"> <div class="left">
<MedicalQueue :status="status" @getId="getId" @getStatus="getStatus"></MedicalQueue> <MedicalQueue v-model="itemId" :status="status" @getId="getId" @getStatus="getStatus"></MedicalQueue>
</div> </div>
<div class="middle"> <div class="middle">
<el-scrollbar> <el-scrollbar>
<div class="case"> <div class="case">
<CaseDetail v-if="patientRegistration.status==3" v-model="formData" ></CaseDetail> <CaseDetail v-if="patientRegistration.status==3" v-model="formData" ></CaseDetail>
<Case v-else v-model="formData"></Case> <Case ref="caseRef" v-else v-model="formData" :status="status"></Case>
</div> </div>
<div class="service-items"> <div class="service-items">
<ServiceItemsDetail v-if="patientRegistration.status==3" v-model="itemList"></ServiceItemsDetail> <ServiceItemsDetail v-if="patientRegistration.status==3" v-model="itemList"></ServiceItemsDetail>
<ServiceItems v-else v-model="itemList"></ServiceItems> <ServiceItems v-else v-model="itemList" :status="status"></ServiceItems>
</div> </div>
<div class="pharmaceutical-consumables"> <div class="pharmaceutical-consumables">
<PharmaceuticalConsumablesDetail v-if="patientRegistration.status==3" <PharmaceuticalConsumablesDetail v-if="patientRegistration.status==3"
v-model="goodsList" ></PharmaceuticalConsumablesDetail> v-model="goodsList" ></PharmaceuticalConsumablesDetail>
<PharmaceuticalConsumables v-else v-model="goodsList"></PharmaceuticalConsumables> <PharmaceuticalConsumables v-else v-model="goodsList" :status="status"></PharmaceuticalConsumables>
</div> </div>
<div class="bottom"> <div class="bottom">
<Settlement v-if="status!=1" v-model="totalAmount" @deleteItem="deleteItem" @save="save" :status="status" <Settlement v-if="status!=1" v-model="totalAmount" @deleteItem="deleteItem" @save="save" :status="status"
@ -29,7 +29,7 @@
<MedicalInformation v-model="patientRegistration" ref="medicalInformationRef"></MedicalInformation> <MedicalInformation v-model="patientRegistration" ref="medicalInformationRef"></MedicalInformation>
</div> </div>
<div class="bottom"> <div class="bottom">
<MedicalHistory ref="medicalHistoryRef"></MedicalHistory> <MedicalHistory ref="medicalHistoryRef" @copy="copyForm" @copyItem="copyItemList" @copyGoods="copyGoodsList"></MedicalHistory>
</div> </div>
</div> </div>
</div> </div>
@ -94,20 +94,22 @@ const medicalHistoryRef = ref()
const patientRegistration = ref<any>({}) const patientRegistration = ref<any>({})
const getId = (item: any) => { const getId = (item: any) => {
registerId.value = item.id registerId.value = item.id
itemId.value = item.id
patientId.value = item.patientInfoId patientId.value = item.patientInfoId
status.value = item.status status.value = item.status
nextTick(() => { nextTick(() => {
medicalHistoryRef.value?.init(patientId.value); medicalHistoryRef.value?.init(patientId.value);
}) })
if (item.status == 1) { if (item.status == 1) {
ElMessageBox.alert(`您将要接诊${item.name}`, '提示', { ElMessageBox.confirm(`您将要接诊${item.name}`, "提示", {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
showClose: true, callback: (action: any) => {
callback: (action: Action) => { if (action == "confirm") {
post('registration/changeStatus', {id: item.id, status: 2}).then((res: any) => { post('registration/changeStatus', {id: item.id, status: 2}).then((res: any) => {
status.value = 2 status.value = 2
}) })
}
}, },
}) })
} }
@ -138,6 +140,7 @@ const getStatus = (e: any) => {
medicalHistoryRef.value?.clearList(); medicalHistoryRef.value?.clearList();
}) })
} }
const itemId = ref<any>('')
const edit = () => { const edit = () => {
post('registration/changeStatus', {id: registerId.value, status: 2}).then((res: any) => { post('registration/changeStatus', {id: registerId.value, status: 2}).then((res: any) => {
status.value = 2 status.value = 2
@ -153,6 +156,21 @@ watch([() => goodsList.value, itemList], ([newGoodsList, newItemList]) => {
}, 0); }, 0);
totalAmount.value = pharmaceuticalTotalAmount + serviceTotalAmount; totalAmount.value = pharmaceuticalTotalAmount + serviceTotalAmount;
}, {deep: true}); }, {deep: true});
const caseRef= ref<any>("")
const copyForm=(item:any) => {
formData.value = item.diagnosisMedicalRecord
const diagnosisNames =JSON.parse(item.diagnosisMedicalRecord.diagnosisDetail)
nextTick(()=>{
caseRef.value?.diagnosisSelect(diagnosisNames)
})
}
const copyItemList=(item:any) => {
console.log(item)
itemList.value = item.itemDetail
}
const copyGoodsList=(item:any) => {
goodsList.value = item.goodsDetail
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {

View File

@ -113,8 +113,9 @@ const handleSelect = (item: any) => {
} }
const isShow = ref(false) const isShow = ref(false)
const ItemEditRef = ref<any>('') const ItemEditRef = ref<any>('')
const id = ref('') const id = ref<any>('')
const rowClick = ((row: any) => { const rowClick = ((row: any) => {
id.value = row.id
openDialog() openDialog()
}) })

View File

@ -1,11 +1,94 @@
<template> <template>
<div class="container-wrapper"> <div class="container-wrapper" style="padding: 24px">
log <div class="title">操作日志</div>
<div class="content">
<el-table
:data="tableData"
style="width: 100%"
:default-sort="{prop: 'id', order: 'descending'}"
@row-click="rowClick"
>
<el-table-column prop="id" label="ID"></el-table-column>
<el-table-column prop="username" label="用户名"></el-table-column>
<el-table-column prop="operation" label="操作"></el-table-column>
<el-table-column prop="time" label="时间"></el-table-column>
<el-table-column prop="method" label="方法"></el-table-column>
</el-table>
</div>
<div class="pagination">
<el-pagination
background
layout="prev, pager, next"
:current-page="currentPage"
:page-size="pageSize"
:total="total"
@current-change="handleCurrentChange"
></el-pagination>
</div>
<Mask :is-show="isShow" :width="800" :height="500">
<Detail @close="isShow = false"/>
</Mask>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {onMounted, ref} from 'vue'
import {post} from '@/utils/request.ts'
import Mask from "@/components/Mask.vue";
import Detail from "@/components/settings/Detail.vue";
const tableData = ref<any>([
{
id: 1,
username: 'admin',
operation: '新增用户',
time: '2021-01-01 00:00:00',
}
])
onMounted(()=>{
init()
})
const init=()=>{
const params = {
currentPage: currentPage.value,
pageSize: pageSize.value,
}
// post("",{params:params}).then((res:any)=>{
// tableData.value=res
// })
}
const currentPage = ref(1)
const pageSize = ref(20)
const total = ref(0)
const handleCurrentChange = (val: any) => {
currentPage.value = val
}
const isShow = ref(false)
const rowClick=(row:any)=>{
isShow.value=true
console.log(row,'ROW')
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.container-wrapper{
display: flex;
flex-direction: column;
.title{
font-size: 20px;
height: 60px;
line-height: 60px;
background: #fff;
font-weight: 500;
}
.content{
flex: 1;
background: #fff;
}
.pagination{
height: 60px;
background: #fff;
border-top: 1px solid #ebeef5;
display: flex;
align-items: center;
}
}
</style> </style>

View File

@ -1,69 +1,81 @@
<template> <template>
<div class="container-wrapper"> <div class="container-wrapper" style="padding: 24px">
<el-button @click="sendMessage">发送消息 </el-button> <el-form ref="ruleFormRef" style="max-width: 600px" :model="tableDate" label-width="auto"
<el-button @click="getarry">拉配置 </el-button> class="demo-ruleForm" status-icon>
<el-button @click="getNetwork">拿ip</el-button> <el-form-item label="打印机名称" prop="common_name">
<el-select v-model="printConfig.printName" >
<el-option v-for="item in tableDate" :label="item" :value="item">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="打印类型" prop="common_sortName">
<el-select v-model="printConfig.pageType">
<el-option v-for="item in pageTypes" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-button type="primary" @click="save">保存</el-button>
</el-form>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {getKey} from "@/utils/discrotyUtil.ts";
import gends from "@/assets/config/directory/gends.json";
import natys from "@/assets/config/directory/antys.json";
import psnCertTypes from "@/assets/config/directory/psnCertTypes.json";
import insutypes from "@/assets/config/directory/insutypes.json";
import {onMounted, onUnmounted, ref} from "vue"; import {onMounted, onUnmounted, ref} from "vue";
import {ElMessage} from "element-plus";
import {post} from "@/utils/request.ts"; import {post} from "@/utils/request.ts";
import type {Request, Response} from "@/utils/ws.ts";
import {useWsStore} from "@/stores/wsStore.ts"; import {useWsStore} from "@/stores/wsStore.ts";
import type {Request, Response} from "@/utils/ws.ts";
import {ElMessage} from "element-plus";
const pageTypes = [
{
label: "80小票打印机",
value: "80"
},
{
label: "58小票打印机",
value: "58"
}
]
const printConfig= ref<any>({
printName:"",
pageType:""
})
const save = () => {
post("common/config/savePrinter", {printConfig:printConfig.value}).then((res:any)=>{
ElMessage.success("保存成功")
})
}
const getPrintConfig = () => {
post("common/config/getPrintConfig").then((res:any)=>{
printConfig.value.printName=res.printName
printConfig.value.pageType=res.pageType
})
}
const tableDate = ref<any>([])
const wsStore = useWsStore(); const wsStore = useWsStore();
const isReading = ref(false)
const ReadSocialCard = async (readType: string) => {
isReading.value = true;
let data: any = {}
data.key ="111111111111";
data.val="哈哈哈哈122222222222222";
let request: Request = { let request: Request = {
type: "Config/set", type: "getPrintList",
config: {}, config: null,
data: data data: null
} }
wsStore.sendMessage(request); wsStore.sendMessage(request);
};
const sendMessage = () => {
ReadSocialCard("CardDefault");
}
const reciceMessage = (response: Response) => { const reciceMessage = (response: Response) => {
console.log(response); tableDate.value = response.Data;
} getPrintConfig()
const getarry = () => {
let data: any = {}
let request: Request = {
type: "Config/getAll",
config: {},
data: data
}
wsStore.sendMessage(request);
}
const getNetwork = () => {
let data: any = {}
let request: Request = {
type: "getNetwork",
config: {},
data: data
}
wsStore.sendMessage(request);
} }
onMounted(async () => { onMounted(async () => {
wsStore.setMessageCallback(reciceMessage) wsStore.setMessageCallback(reciceMessage)
}); })
onUnmounted(() => { onUnmounted(() => {
wsStore.removeAllMessageCallback() wsStore.removeAllMessageCallback()
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
</style> </style>