This commit is contained in:
ChenQiuYu 2025-04-24 14:28:56 +08:00
parent c0f4613829
commit ccbad2bcaf
8 changed files with 65 additions and 125 deletions

View File

@ -2,5 +2,10 @@ export enum apiConfig{
/**
*
*/
"ManagerLogin"="manager/manager/login"//登录
"ManagerLogin"="manager/manager/login",//登录
/**
*
*/
"DoctorDetail" ="medical/record/getDetailByRegisId"//详情
}

View File

@ -8,12 +8,10 @@
<el-option label="中医模板" :value="1"/>
<el-option label="口腔模板" :value="2"/>
</el-select>
</div>
</div>
</template>
<div class="container">
<el-form :model="formDate" label-width="auto" ref="formRef">
<el-descriptions
:column="1"

View File

@ -5,23 +5,23 @@
<img class="avatar-image" src="/static/images/outpatient/profile-picture.png" alt="头像"/>
<div class="avatar-info-wrapper">
<div class="avatar-info">
<span class="avatar-info-name">{{ registerInfo.name }}</span>
<span class="avatar-info-sex" style="margin: 0 16px">{{ registerInfo.sex }}</span>
<span class="avatar-info-age">{{ registerInfo.age }}</span>
<span class="avatar-info-name">{{ patientRegistration.name }}</span>
<span class="avatar-info-sex" style="margin: 0 16px">{{ patientRegistration.gender }}</span>
<span class="avatar-info-age">{{ patientRegistration.age }}</span>
</div>
<div class="avatar-info-phone-num">
<span class="avatar-info-phone">{{ registerInfo.certno }}</span>
<span class="avatar-info-num">就诊次数<i class="caret-num">{{ registerInfo.visitCount }}</i></span>
<span class="avatar-info-phone">{{ patientRegistration.phone }}</span>
<span class="avatar-info-num">就诊次数<i class="caret-num">{{ patientRegistration.visitCount || 0 }}</i></span>
</div>
</div>
</div>
<div class="detail">
<div>挂号医生:&nbsp;<span class="detail-doctor">{{registerInfo.dockerName}}-{{registerInfo.dockerSection}}</span></div>
<div>挂号医生:&nbsp;<span class="detail-doctor">{{patientRegistration.dockerName}}-{{patientRegistration.dockerSection}}</span></div>
<div class="detail-middle">
<div>费用类别:&nbsp;<span class="detail-doctor">医保</span></div>
<div>医保卡剩余金额:&nbsp;<span class="detail-balance">756</span></div>
</div>
<div>上次就诊时间:&nbsp;<span class="detail-doctor">{{ registerInfo.lastVisitTime }}</span></div>
<div>上次就诊时间:&nbsp;<span class="detail-doctor">{{ patientRegistration.lastVisitTime }}</span></div>
</div>
</div>
</Panel>
@ -30,14 +30,7 @@
import Panel from "@/components/common/Panel.vue";
import {post} from "@/utils/request.ts";
import {ref} from "vue";
const registerInfo = ref<any>({})
const init = (registerId: any) => {
post("registration/getDetailById", {id: registerId}).then((res: any) => {
registerInfo.value = res
})
console.log('init')
}
defineExpose({init})
const patientRegistration=defineModel<any>()
</script>
<style scoped lang="scss">
.avatar {

View File

@ -5,75 +5,23 @@
<ul>
<li class="item" v-for="(item, index) in list" :key="index">
<span class="index">{{ index + 1 }}</span>
<span class="name">{{ item.projectName }}</span>
<span class="unit">{{}}</span>
<span class="name">{{ item.name }}</span>
<span class="unit">{{ item.selectedNum || 0 }}{{ item.selectedUnit }}</span>
<span class="price">{{ item.selectedPrice || '0' }}</span>
<span class="delete">
<el-button type="text" @click="deleteItem(item.id)">
<el-icon><CircleClose/></el-icon>
</el-button>
</span>
</li>
</ul>
</div>
<div class="search">
<div class="search-input">
<SearchInput
:request-api="itemSearchApi"
:show-config="itemShowConfig"
@selectedCallBack="itemSelect"
:placeholder="'请输入药材名称'"
>
</SearchInput>
</div>
<span style="margin-right: 24px">{{ list.reduce((acc, cur) => acc + cur.unitPrice, 0) }}</span>
<span style="margin-left: 24px">合计</span>
<span style="margin-right: 24px">{{ list.reduce((acc, cur) => acc + cur.selectedNum*cur.selectedPrice, 0) }}</span>
</div>
</div>
</Panel>
</template>
<script setup lang="ts">
import Panel from "@/components/common/Panel.vue";
import SearchInput from "@/components/SearchInput.vue";
import {CircleClose} from "@element-plus/icons-vue";
const itemSearchApi = "goods/goods/search";
const itemShowConfig = [
{
label: "项目名称",
prop: "name",
},
{
label: "项目类型",
prop: "type",
},
{
label: "售价",
prop: "unitPrice",
},
]
const itemSelect = (row: any) => {
row.selectNum = 1
row.selectedUnit = row.packagingUnit
row.selectedPrice = row.unitPrice
list.value.push(row)
}
const deleteItem = (id: any) => {
list.value = list.value.filter((item) => item.id !== id);
};
const list = defineModel<any[]>({default: () => []});
const selectUnit = (item: any, unit: any) => {
item.selectedUnit = unit;
if (unit == item.packagingUnit) {
item.selectedPrice = item.unitPrice
return
}
if (unit == item.minPackagingUnit) {
item.selectedPrice = item.disassemblyPrice
}
}
</script>
<style scoped lang="scss">
@ -149,10 +97,7 @@ const selectUnit = (item: any, unit: any) => {
border-top: 1px solid #EAEAEC;
display: flex;
align-items: center;
.search-input {
height: 100%;
flex: 1;
}
justify-content: space-between;
}
}
</style>

View File

@ -5,14 +5,17 @@
<ul>
<li class="item" v-for="(item, index) in list" :key="index">
<span class="index">{{ index + 1 }}</span>
<span class="name">{{ item.projectName }}</span>
<span class="code">{{ item.projectSocialCode }}</span>
<span class="price">{{ item.projectUnitPrice }}</span>
<span class="name">{{ item.name }}</span>
<span class="code">{{ item.socialCode }}</span>
<span class="unit">{{ item.unit }}</span>
<span class="price">{{ item.unitPrice }}</span>
</li>
</ul>
</div>
<div class="search">
<span style="margin-right: 24px">{{ list.reduce((acc, cur) => acc + cur.projectUnitPrice, 0) }}</span></div>
<span style="margin-left: 24px">合计</span>
<span style="margin-right: 24px">{{ list.reduce((acc, cur) => acc + cur.unitPrice, 0) }}</span>
</div>
</div>
</Panel>
</template>
@ -21,9 +24,6 @@ import Panel from "@/components/common/Panel.vue";
import {onMounted} from "vue";
const list = defineModel<any[]>({default: () => []});
onMounted(()=>{
console.log(list.value)
})
</script>
<style scoped lang="scss">
@ -62,6 +62,14 @@ onMounted(()=>{
height: 100%;
line-height: 64px;
}
.unit{
width: 60px;
margin-left: 10px;
border-right: 1px solid #EAEAEC;
height: 100%;
line-height: 64px;
text-align: center;
}
.price{
height: 100%;
width: 200px;
@ -83,10 +91,7 @@ onMounted(()=>{
border-top: 1px solid #EAEAEC;
display: flex;
align-items: center;
.search-input {
height: 100%;
flex: 1;
}
justify-content: space-between;
}
}
</style>

View File

@ -19,7 +19,6 @@ const totalAmount = defineModel<any>()
<div>总金额<span class="text icon"></span><span class="text">{{ totalAmount || '0' }}</span></div>
<div class="btn-group">
<el-button @click="deleteItem">取消接诊</el-button>
<el-button type="primary">保存并打印</el-button>
<el-button type="primary" @click="save">完成接诊</el-button>
</div>
</div>

View File

@ -6,13 +6,17 @@
<div class="middle">
<el-scrollbar>
<div class="case">
<Case v-model="formData"></Case>
<CaseDetail v-if="registerId&&formData" v-model="formData"></CaseDetail>
<Case v-else v-model="formData"></Case>
</div>
<div class="service-items">
<ServiceItems v-model="itemList"></ServiceItems>
<ServiceItemsDetail v-if="registerId&&itemList" v-model="itemList"></ServiceItemsDetail>
<ServiceItems v-else v-model="itemList"></ServiceItems>
</div>
<div class="pharmaceutical-consumables">
<PharmaceuticalConsumables v-model="goodsList"></PharmaceuticalConsumables>
<PharmaceuticalConsumablesDetail v-if="registerId&&goodsList"
v-model="goodsList"></PharmaceuticalConsumablesDetail>
<PharmaceuticalConsumables v-else v-model="goodsList"></PharmaceuticalConsumables>
</div>
<div class="bottom">
<Settlement v-model="totalAmount" @deleteItem="deleteItem" @save="save"></Settlement>
@ -21,7 +25,7 @@
</div>
<div class="right">
<div class="top">
<MedicalInformation ref="medicalInformationRef"></MedicalInformation>
<MedicalInformation v-model="patientRegistration" ref="medicalInformationRef"></MedicalInformation>
</div>
<div class="bottom">
<MedicalHistory ref="medicalHistoryRef"></MedicalHistory>
@ -45,10 +49,10 @@ import {ElMessage} from "element-plus";
import ServiceItemsDetail from "@/components/outpatient/ServiceItemsDetail.vue";
import PharmaceuticalConsumablesDetail from "@/components/outpatient/PharmaceuticalConsumablesDetail.vue";
import CaseDetail from "@/components/outpatient/CaseDetail.vue";
import {apiConfig} from "@/assets/config/apiConfig.ts";
const registerId = ref()
const patientId = ref()
const serviceList = ref([])
const itemList = ref([])
const goodsList = ref([])
const formData = ref<any>({})
@ -81,7 +85,7 @@ const save = () => {
const totalAmount = ref(0)
const medicalInformationRef = ref()
const medicalHistoryRef = ref()
const showDetail = ref(false)
const patientRegistration= ref<any>({})
const getId = (item: any) => {
registerId.value = item.id
patientId.value = item.patientInfoId
@ -91,49 +95,41 @@ const getId = (item: any) => {
})
if (item.status == 1) {
post('registration/changeStatus', {id: item.id, status: 2}).then((res: any) => {
status.value=2
status.value = 2
})
}
if (item.status == 3) {
post('medical/record/getDetailByRegisId', {
post(apiConfig.DoctorDetail, {
regisId: item.id
}).then((res: any) => {
formData.value = res
formData.value = res.diagnosisMedicalRecord
goodsList.value = res.goodsDetail
itemList.value = res.serviceDetail
itemList.value = res.itemDetail
patientRegistration.value=res.patientRegistration
})
}
}
const status = ref<any>(1)
const deleteItem = () => {
post('registration/changeStatus', {id: registerId.value, status: 1}).then((res: any) => {
status.value=1
status.value = 1
})
}
const getStatus = (e: any) => {
status.value = e
}
// 使 watch serviceList itemList
watch([serviceList, itemList], ([newServiceList, newItemList]) => {
// 使 watch goodsList itemList
watch([goodsList, itemList], ([newGoodsList, newItemList]) => {
const pharmaceuticalTotalAmount = newItemList.reduce((pre: any, cur: any) => {
return pre + cur.unitPrice
}, 0);
const serviceTotalAmount = newServiceList.reduce((pre: any, cur: any) => {
return pre + cur.unitPrice
const serviceTotalAmount = newGoodsList.reduce((pre: any, cur: any) => {
return pre + cur.selectedNum * cur.selectedPrice
}, 0);
totalAmount.value = pharmaceuticalTotalAmount + serviceTotalAmount;
console.log(totalAmount.value)
}, {deep: true});
const changeDetail = (flag: boolean) => {
showDetail.value = flag
if (!flag) {
formData.value = {}
goodsList.value = []
itemList.value = []
}
}
</script>
<style scoped lang="scss">
.container {

View File

@ -83,7 +83,6 @@ function set_tab() {
post("social/directory/column_list", {type: current_tab.value})
.then((res: any) => {
column_list.value = res;
console.log(column_list)
get_data_list();
})
}
@ -101,14 +100,14 @@ function get_data_list() {
isDownLoading.value = false;
total_page.value = res.total_page;
tableData.value = res.list
// tableData.value.forEach((item: any) => {
// if (item.enddate == null) {
// item.enddate = ""
// }
// if (item.json.rx_flag) {
// item.json.rx_flag = item.json.rx_flag == 1 ? "" : ""
// }
// })
tableData.value.forEach((item: any) => {
if (item.enddate == null) {
item.enddate = "长期有效"
}
if (item.json.rx_flag) {
item.json.rx_flag = item.json.rx_flag == 1 ? "是" : "否"
}
})
})
}