Compare commits

...

2 Commits

Author SHA1 Message Date
LiJianZhao 75d5734566 Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web 2025-05-07 14:25:26 +08:00
LiJianZhao f4de43ac6a dev 2025-05-07 14:25:17 +08:00
6 changed files with 82 additions and 53 deletions

View File

@ -1,22 +1,24 @@
<template> <template>
<el-table :data="data.goodsDetail" max-height="150" style="width: 100%"> <el-table :data="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="名称" show-overflow-tooltip></el-table-column>
<el-table-column prop="selectedPrice" label="单价" > <el-table-column prop="selectedPrice" label="单价">
<template #default="scope"> <template #default="scope">
{{scope.row.selectedPrice}} {{ scope.row.selectedPrice }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="number" label="数量" > <el-table-column prop="number" label="数量">
<template #default="scope"> <template #default="scope">
<div v-if="data.status == 0"> <div v-if="data.status == 0">
<el-input-number v-model="scope.row.selectedNum" min="0" @change="handleNumChange" size="small"></el-input-number> <el-input-number v-model="scope.row.selectedNum" min="0" @change="handleNumChange"
size="small"></el-input-number>
<el-dropdown> <el-dropdown>
<span style="line-height: 30px;margin-left: 10px">{{ scope.row.selectedUnit }}</span> <span style="line-height: 30px;margin-left: 10px">{{ scope.row.selectedUnit }}</span>
<template #dropdown> <template #dropdown>
<el-dropdown-menu v-if="scope.row.trdnFlag == 1"> <el-dropdown-menu v-if="scope.row.trdnFlag == 1">
<el-dropdown-item @click="selectUnit(scope.row,scope.row.packagingUnit)">{{ scope.row.packagingUnit }} <el-dropdown-item @click="selectUnit(scope.row,scope.row.packagingUnit)">{{ scope.row.packagingUnit }}
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click="selectUnit(scope.row,scope.row.minPackagingUnit)">{{ scope.row.minPackagingUnit }} <el-dropdown-item @click="selectUnit(scope.row,scope.row.minPackagingUnit)">
{{ scope.row.minPackagingUnit }}
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
@ -28,19 +30,22 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="小计" > <el-table-column label="小计">
<template #default="scope"> <template #default="scope">
{{ scope.row.selectedNum*scope.row.selectedPrice }} {{ scope.row.selectedNum * scope.row.selectedPrice }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" v-if="data.status == 0" > <el-table-column label="操作" v-if="data.status == 0">
<template #default="scope"> <template #default="scope">
<el-button type="danger" link @click="delGoods(scope.row)">X</el-button> <el-button type="danger" link @click="delGoods(scope.row)">X</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<SearchInput v-if="data.status == 0" :request-api="goodsSearchApi" :show-config="goodsShowConfig" @selectedCallBack="goodsSelect"></SearchInput> <div class="bottom">
<span>合计{{getTotalPrice()}}</span> <SearchInput v-if="data.status == 0" :request-api="goodsSearchApi" :show-config="goodsShowConfig"
@selectedCallBack="goodsSelect"></SearchInput>
<span>合计{{ getTotalPrice() }}</span>
</div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import SearchInput from "@/components/SearchInput.vue"; import SearchInput from "@/components/SearchInput.vue";
@ -82,26 +87,30 @@ const selectUnit = (item: any, unit: any) => {
item.selectedUnit = unit; item.selectedUnit = unit;
if (unit == item.packagingUnit) { if (unit == item.packagingUnit) {
item.selectedPrice = item.unitPrice item.selectedPrice = item.unitPrice
}else if (unit == item.minPackagingUnit) { } else if (unit == item.minPackagingUnit) {
item.selectedPrice = item.disassemblyPrice item.selectedPrice = item.disassemblyPrice
} }
emit('totalPriceChange') emit('totalPriceChange')
} }
const emit = defineEmits(["totalPriceChange"]) const emit = defineEmits(["totalPriceChange"])
const handleNumChange = ()=>{ const handleNumChange = () => {
emit('totalPriceChange') emit('totalPriceChange')
} }
const getTotalPrice =()=>{ const getTotalPrice = () => {
let totalPrice = 0; let totalPrice = 0;
data.value.goodsDetail?.forEach((item:any)=>{ data.value.goodsDetail?.forEach((item: any) => {
totalPrice += item.selectedNum*item.selectedPrice totalPrice += item.selectedNum * item.selectedPrice
}) })
return totalPrice; return totalPrice;
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
:deep(.el-table__cell){ :deep(.el-table__cell) {
padding: 0 4px; padding: 0 4px;
} }
.bottom {
text-align: right;
}
</style> </style>

View File

@ -136,11 +136,9 @@ import {onMounted, ref} from "vue";
import {post} from "@/utils/request.ts"; import {post} from "@/utils/request.ts";
const seeDockerInfo = ref<any>(); const seeDockerInfo = ref<any>();
const getSeeDockerInfo = (newValue:any) => { const getSeeDockerInfo = (newValue:any) => {
debugger
if (!newValue)return; if (!newValue)return;
post('medical/record/getSeeDockerInfo', {regisId: newValue}).then((res: any) => { post('medical/record/getSeeDockerInfo', {regisId: newValue}).then((res: any) => {
seeDockerInfo.value = res seeDockerInfo.value = res
debugger
}) })
} }
const init =(regisId:any)=>{ const init =(regisId:any)=>{

View File

@ -25,9 +25,12 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<SearchInput v-if="data.status == 0" :request-api="serviceSearchApi" :show-config="serviceShowConfig" <div class="bottom">
@selectedCallBack="serviceSelect"></SearchInput> <SearchInput v-if="data.status == 0" :request-api="serviceSearchApi" :show-config="serviceShowConfig"
<span>合计{{getTotalPrice()}}</span> @selectedCallBack="serviceSelect"></SearchInput>
<span>合计{{getTotalPrice()}}</span>
</div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import SearchInput from "@/components/SearchInput.vue"; import SearchInput from "@/components/SearchInput.vue";
@ -75,4 +78,7 @@ const getTotalPrice =()=>{
:deep(.el-table__cell){ :deep(.el-table__cell){
padding: 0 4px; padding: 0 4px;
} }
.bottom{
text-align: right;
}
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-input v-model="keyword" style="width:100%;height: 100%" @input="changeInput" :disabled="disabled" @click="changeInput" <el-input v-model="keyword" :style="{width:props.width+'px',height: 100+'%'}" @input="changeInput" :disabled="disabled" @click="changeInput"
placeholder="诊断选择" ref="inputRef" @focus="focus"></el-input> placeholder="诊断选择" ref="inputRef" @focus="focus"></el-input>
<el-popover placement="bottom-start" trigger="click" :width="props.width" ref="popoverRef" @before-enter="beforeShow" :virtual-ref="inputRef" @hide ="afterShow"> <el-popover placement="bottom-start" trigger="click" :width="props.width" ref="popoverRef" @before-enter="beforeShow" :virtual-ref="inputRef" @hide ="afterShow">

View File

@ -31,7 +31,7 @@
</Panel> </Panel>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {onMounted, ref, watch} from "vue"; import {nextTick, onMounted, ref, watch} from "vue";
import Panel from "@/components/common/Panel.vue"; import Panel from "@/components/common/Panel.vue";
import {post} from "@/utils/request.ts"; import {post} from "@/utils/request.ts";
import {formatListTime} from "@/utils/dateUtils.ts"; import {formatListTime} from "@/utils/dateUtils.ts";
@ -48,13 +48,15 @@ const search = ref('')
const curItem = ref<any>('') const curItem = ref<any>('')
const emit = defineEmits(['getId', 'changeDetail', 'getStatus']) const emit = defineEmits(['getId', 'changeDetail', 'getStatus'])
const tab = (item: any) => { const tab = (item: any) => {
emit('getStatus', item.value) nextTick(()=>{
init() emit('getStatus', item.value)
if (item.value == 3) { init()
emit('changeDetail', true) if (item.value == 3) {
} else { emit('changeDetail', true)
emit('changeDetail', false) } else {
} emit('changeDetail', false)
}
})
} }
const list = ref<any>([]) const list = ref<any>([])

View File

@ -7,28 +7,36 @@
<el-scrollbar> <el-scrollbar>
<div> <div>
<Panel title="医疗诊断"> <Panel title="医疗诊断">
<template #tools>
<el-cascader
v-model="formData.doctorId"
:options="sectionDoctorOption"
:props="props"
@change="handleChange"
clearable
/>
</template>
<template #default> <template #default>
<div style="height:64px;padding:0 24px 24px"> <div class="diagnosis-content">
<DiagnosisSearchInput <div class="diagnosis">
v-model="diagnosisKeyword" 诊断
:request-api="diagnosisSearchApi" <DiagnosisSearchInput
:show-config="diagnosisShowConfig" v-model="diagnosisKeyword"
@selectedCallBack="diagnosisSelect" :request-api="diagnosisSearchApi"
ref="diagnosisSearchRef" :show-config="diagnosisShowConfig"
:show-header="false" :width="600"
:disabled="statusDisabled==1" @selectedCallBack="diagnosisSelect"
ref="diagnosisSearchRef"
:show-header="false"
:disabled="statusDisabled==1"
>
</DiagnosisSearchInput>
</div>
<div class="doctor">
医生
<el-cascader
v-model="formData.doctorId"
:options="sectionDoctorOption"
:props="props"
@change="handleChange"
clearable
size="large"
/>
</div>
>
</DiagnosisSearchInput>
</div> </div>
</template> </template>
</Panel> </Panel>
@ -235,6 +243,12 @@ const generateOptions = () => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow: hidden; overflow: hidden;
.diagnosis-content{
height:64px;
padding:0 24px 24px;
display: flex;
justify-content: left;
}
.case { .case {
background: #FFFFFF; background: #FFFFFF;