Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web

This commit is contained in:
LiJianZhao 2025-05-08 16:53:05 +08:00
commit 36f2b13a82
6 changed files with 208 additions and 70 deletions

View File

@ -28,7 +28,8 @@
<el-table-column
v-for="item in showConfig"
:prop="item.prop"
:label="item.label"
:label="item.label||'-'"
show-overflow-tooltip
></el-table-column>
</el-table>
</div>
@ -90,7 +91,7 @@ const changeInput = (inputStr: string) => {
};
const emit = defineEmits(['selectedCallBack','focus']);
const emit = defineEmits(['selectedCallBack', 'focus']);
const clickRow = (row: any) => {
emit('selectedCallBack', row);
@ -103,11 +104,11 @@ const beforeShow = () => {
popoverRef.value.hide();
}
};
const isVisible =ref(false)
const focus=()=>{
isVisible.value=true
console.log( "focus输入框")
emit('focus',true)
const isVisible = ref(false)
const focus = () => {
isVisible.value = true
console.log("focus输入框")
emit('focus', true)
}
const handlerBlur = () => {
isVisible.value = false

View File

@ -1,7 +1,45 @@
<template>
<panel title="药品耗材">
<el-table v-if="goodsDetail.length>0" :data="goodsDetail" max-height="150" style="width: 100%">
<el-table-column prop="name" label="名称" show-overflow-tooltip></el-table-column>
<el-table-column prop="name" label="名称">
<template #default="scope">
<el-popover
placement="top-start"
trigger="hover"
width="500"
@show="getHilistInfo(scope.row)"
@hide="colosInfo"
>
<template #reference>
{{ scope.row.name }}
</template>
<div class="detail">
<div style="display: flex;justify-content: space-between">
<div style="font-size: 18px;font-weight: 500;color: #000">{{
hilistInfo.name
}}[{{ hilistInfo.json?.category || '-' }}]
</div>
<div>{{ scope.row.selectedPrice }}/{{ scope.row.selectedUnit }}</div>
</div>
<div style="display: flex;justify-content: space-between">
<div>规格:{{ hilistInfo.json?.dosage_specifications || '-' }}</div>
<div>生产厂商:{{ hilistInfo.json?.producer || '-' }}</div>
<div>限价:{{ hilistInfo.json?.stock || '0' }}</div>
</div>
<div style="display: flex;justify-content: space-between">
<div>批准文号:{{ hilistInfo.json?.approval_number || '-' }}</div>
<div>本位码:{{ hilistInfo.json?.standard_code || '-' }}</div>
</div>
<div style="display: flex;justify-content: space-between">
<div>限价:{{ hilistInfo.hilistPricUplmtAmt ? hilistInfo.hilistPricUplmtAmt : '无' }}</div>
<div>限价类型:{{ hilistInfo.hilistLmtpricType ? hilistInfo.hilistLmtpricType : '无' }}</div>
</div>
</div>
</el-popover>
</template>
</el-table-column>
<el-table-column prop="selectedPrice" label="单价">
<template #default="scope">
{{ scope.row.selectedPrice }}
@ -49,6 +87,7 @@
:placeholder="'请输入药名或者拼音码'"
@selectedCallBack="goodsSelect"
v-if="status"
@focus="focus"
></SearchInput>
</div>
<span>合计{{ getTotalPrice() }}</span>
@ -57,8 +96,10 @@
</template>
<script setup lang="ts">
import SearchInput from "@/components/SearchInput.vue";
import {ref, watchEffect} from "vue";
import Panel from "@/components/common/Panel.vue";
import {ref} from "vue";
import {post} from "@/utils/request.ts";
import {ElMessage} from "element-plus";
const props = defineProps({
status: {
@ -78,18 +119,46 @@ const goodsShowConfig = [
prop: "name",
},
{
label: "项目类型",
prop: "type",
label: "规格",
prop: "specifications",
},
{
label: "售价",
label: "库存",
prop: "inventory",
},
{
label: "价格",
prop: "unitPrice",
},
{
label: "厂家",
prop: "producer",
},
{
label: "效期",
prop: "lifespan",
},
{
label: "收费项目等级",
prop: "category",
},
{
label: "限制条件",
prop: "limit",
}
]
const goodsSelect = (row: any) => {
row.selectedNum = 1
row.selectedUnit = row.packagingUnit
row.selectedPrice = row.unitPrice
if (goodsDetail.value.find((i: any) => i.id == row.id)) {
ElMessage.warning("数据已存在,只能加数量")
goodsDetail.value.find((i: any) => i.id == row.id).selectedNum += 1
goodsDetail.value.find((i: any) => i.id == row.id).selectedUnit = row.packagingUnit
goodsDetail.value.find((i: any) => i.id == row.id).selectedPrice = row.unitPrice
emit('totalPriceChange')
return
}
goodsDetail.value.push(row)
emit('totalPriceChange')
}
@ -103,7 +172,7 @@ const selectUnit = (item: any, unit: any) => {
emit('totalPriceChange')
}
const emit = defineEmits(["totalPriceChange"])
const emit = defineEmits(["totalPriceChange", 'focus'])
const handleNumChange = () => {
emit('totalPriceChange')
}
@ -117,7 +186,20 @@ const getTotalPrice = () => {
return totalPrice;
}
const focus = (e: any) => {
emit('focus', e)
}
const hilistInfo = ref<any>({})
const getHilistInfo = (item: any) => {
if (item.hilistCode) {
post("social/directory/getByCode", {code: item.hilistCode}).then((res: any) => {
hilistInfo.value = res
})
}
}
const colosInfo = () => {
hilistInfo.value = {}
}
</script>
<style scoped lang="scss">
:deep(.el-table__cell) {

View File

@ -1,13 +1,38 @@
<template>
<Panel title="服务项目">
<el-table v-if="itemDetail.length>0" :data="itemDetail" max-height="150">
<el-table-column prop="itemName" label="项目名称" show-overflow-tooltip></el-table-column>
<el-table-column prop="itemName" label="项目名称" show-overflow-tooltip width="200">
<template #default="scope">
<el-popover
width="485"
@show="show(scope.row)"
@hide="hide"
>
<template #reference>
{{ scope.row.itemName }}
</template>
<div class="detail">
<div style="display: flex;justify-content: space-between">
<div style="font-size: 18px;font-weight: 500;color: #000">{{
itemInfo.name
}}[{{ chrgitm_lv[itemInfo.chrgitmLv as keyof typeof chrgitm_lv || '-'] || '-' }}]
</div>
<div>{{ scope.row.unitPrice }}/{{ scope.row.unit }}</div>
</div>
<div style="display: flex;justify-content: space-between">
<div>限制条件:{{ itemInfo.lmtUsedFlag == 0 ? '否' : itemInfo.lmtUsedFlag == 1 ? '是' : '-' }}</div>
<div> 医保码:{{ scope.row.itemSocialCode || '-' }}</div>
</div>
</div>
</el-popover>
</template>
</el-table-column>
<el-table-column label="单价">
<template #default="scope">
{{ scope.row.selectedPrice }}
</template>
</el-table-column>
<el-table-column label="数量">
<el-table-column label="数量" width="180">
<template #default="scope">
<el-input-number v-if="props.status" v-model="scope.row.selectedNum" :min="0"
@change="handleNumChange" size="small"></el-input-number>
@ -29,6 +54,7 @@
<div class="bottom">
<div class="search">
<SearchInput
@focus="focus"
:placeholder="'请输入药服务项目或拼音码'"
:request-api="serviceSearchApi"
:show-config="serviceShowConfig"
@ -42,6 +68,9 @@
import {defineProps, watchEffect, ref} from "vue";
import SearchInput from "@/components/SearchInput.vue";
import Panel from "@/components/common/Panel.vue";
import {post} from "@/utils/request.ts";
import chrgitm_lv from "@/assets/config/directory/chrgitmLv.json"
import {ElMessage} from "element-plus";
const props = defineProps({
status: {
@ -61,19 +90,36 @@ const serviceShowConfig = [
prop: "itemName",
},
{
label: "服务医保码",
prop: "itemSocialCode",
label: "单位",
prop: "unit",
},
{
label: "售价",
prop: "unitPrice",
},
{
label: "收费项目等级",
prop: "chrgitmLv",
},
{
label: "限制条件",
prop: "limit",
},
]
const emit = defineEmits(['totalPriceChange'])
const emit = defineEmits(['totalPriceChange', 'focus'])
const serviceSelect = (row: any) => {
row.selectedNum = 1
row.selectedUnit = row.unit
row.selectedPrice = row.unitPrice
if (itemDetail.value.find((i: any) => i.id == row.id)) {
ElMessage.warning("数据已存在,只能加数量")
itemDetail.value.find((i: any) => i.id == row.id).selectedNum += 1
itemDetail.value.find((i: any) => i.id == row.id).selectedUnit = row.packagingUnit
itemDetail.value.find((i: any) => i.id == row.id).selectedPrice = row.unitPrice
emit('totalPriceChange')
return
}
itemDetail.value.push(row)
emit('totalPriceChange')
}
@ -91,8 +137,18 @@ const getTotalPrice = () => {
return totalPrice;
}
const focus = (e: any) => {
emit('focus', e)
}
const itemInfo = ref<any>({});
const show = (item: any) => {
post('social/directory/getItemByCode', {code: item.itemSocialCode}).then((res: any) => {
itemInfo.value = res
})
}
const hide = () => {
itemInfo.value = {}
}
</script>
<style scoped lang="scss">
:deep(.el-table__cell) {
@ -101,9 +157,10 @@ const getTotalPrice = () => {
.bottom {
text-align: right;
border-top: 1px solid #EAEAEC ;
border-top: 1px solid #EAEAEC;
display: flex;
.search{
.search {
flex: 1;
}
}

View File

@ -1,6 +1,5 @@
<template>
<el-popover placement="bottom-start" :visible="isVisible" :width="props.width" ref="popoverRef"
@before-enter="beforeShow" @hide="afterShow">
<template #reference>

View File

@ -9,13 +9,12 @@
<Panel title="医疗诊断">
<template #default>
<div class="diagnosis-content">
<div>诊断</div>
<div class="diagnosis">
诊断
<DiagnosisSearchInput
v-model="diagnosisKeyword"
:request-api="diagnosisSearchApi"
:show-config="diagnosisShowConfig"
:width="600"
@selectedCallBack="diagnosisSelect"
ref="diagnosisSearchRef"
:show-header="false"
@ -24,13 +23,14 @@
>
</DiagnosisSearchInput>
</div>
<div>医生</div>
<div class="doctor">
医生
<el-select
v-model="formData.doctorId"
@change="handleChange"
clearable
size="large">
style="width: 100%"
>
<el-option
v-for="item in doctorList"
:key="item.id"
@ -40,20 +40,20 @@
</el-option>
</el-select>
</div>
</div>
</template>
</Panel>
</div>
<div style="margin-top: 24px">
<ServiceDetail v-model="formData.itemDetail" :status="formData.status == 0" @totalPriceChange="getOrderTotalPrice"></ServiceDetail>
<ServiceDetail v-model="formData.itemDetail" :status="formData.status == 0"
@totalPriceChange="getOrderTotalPrice"></ServiceDetail>
</div>
<div style="margin-top: 24px">
<GoodsDetail v-model="formData.goodsDetail" :status="formData.status == 0" @totalPriceChange="getOrderTotalPrice"></GoodsDetail>
<GoodsDetail v-model="formData.goodsDetail" :status="formData.status == 0"
@totalPriceChange="getOrderTotalPrice"></GoodsDetail>
</div>
<div class="bottom" >
<TotalPrice v-model="formData.totalPrice" @edit="saveAndCharge" :status="formData.status" ></TotalPrice>
<div class="bottom">
<TotalPrice v-model="formData.totalPrice" @edit="saveAndCharge" :status="formData.status"></TotalPrice>
</div>
</el-scrollbar>
</div>
@ -109,7 +109,7 @@ const delDraft = () => {
}
const settlementRef = ref()
const saveAndCharge = () => {
post('charge/save', {data: {...formData.value,doctorId: doctorId.value}}).then((res: any) => {
post('charge/save', {data: {...formData.value, doctorId: doctorId.value}}).then((res: any) => {
formData.value.code = res
nextTick(() => {
settlementRef.value?.init(res)
@ -133,7 +133,7 @@ const diagnosisSelect = (list: any) => {
formData.value.diagnosisMedicalRecord.diagnosisDetail = JSON.stringify(list)
formData.value.diagnosisMedicalRecord.diagnosisSummary = diagnosisNames
}
const recordsConsumptionRef= ref<any>("")
const recordsConsumptionRef = ref<any>("")
const patientCardRef = ref()
const clickItem = async (item: any, status: any) => {
statusDisabled.value = status
@ -174,7 +174,6 @@ onMounted(() => {
list()
})
const getOrderTotalPrice = () => {
debugger
let totalPrice = 0
formData.value.itemDetail?.forEach((item: any) => {
totalPrice += item.selectedPrice * item.selectedNum
@ -191,7 +190,7 @@ const props = {
expandTrigger: 'hover' as const,
}
const doctorId=ref<any>('')
const doctorId = ref<any>('')
const handleChange = (value: any) => {
doctorId.value = value[value.length - 1]
}
@ -224,11 +223,21 @@ const list = () => {
display: flex;
flex-direction: column;
overflow: hidden;
.diagnosis-content{
height:64px;
padding:0 24px 24px;
.diagnosis-content {
height: 64px;
padding: 0 24px 24px;
display: flex;
justify-content: left;
align-items: center;
.diagnosis {
flex: 1;
margin-right: 24px;
}
.doctor {
width: 200px;
}
}
.case {
@ -285,6 +294,7 @@ const list = () => {
}
.bottom {
margin-top: 24px;
height: 86px;

View File

@ -17,7 +17,7 @@
</div>
</el-scrollbar>
<div class="bottom">
<Settlement v-model="totalAmount" @cancelReception="cancelReception" @save="save" :status="curRegister?.status ==2"
<Settlement v-model="formData.totalPrice" @cancelReception="cancelReception" @save="save" :status="curRegister?.status ==2"
@edit="edit"></Settlement>
</div>
@ -167,16 +167,6 @@ const getOrderTotalPrice = () => {
formData.value.preTotalPrice = totalPrice
formData.value.totalPrice = totalPrice
}
// 使 watch goodsList itemList
watch([() => goodsList.value, itemDetail], ([newGoodsList, newItemList]) => {
const pharmaceuticalTotalAmount = newItemList.reduce((pre: any, cur: any) => {
return pre + cur.unitPrice * cur.selectedNum
}, 0);
const serviceTotalAmount = newGoodsList.reduce((pre: any, cur: any) => {
return pre + cur.selectedNum * cur.selectedPrice
}, 0);
totalAmount.value = pharmaceuticalTotalAmount + serviceTotalAmount;
}, {deep: true});
const caseRef= ref<any>("")
const copyForm=(item:any) => {
formData.value = item.diagnosisMedicalRecord
@ -193,7 +183,6 @@ const copyGoodsList=(item:any) => {
goodsList.value = item.goodsDetail
}
const seeDockerInfo = ref<any>()
const getSeeDockerInfo = (newValue:any) => {
if (!registerId.value)return;