diff --git a/src/assets/config/apiConfig.ts b/src/assets/config/apiConfig.ts
index bf98e6a..3337be1 100644
--- a/src/assets/config/apiConfig.ts
+++ b/src/assets/config/apiConfig.ts
@@ -2,5 +2,10 @@ export enum apiConfig{
/**
* 用户操作
*/
- "ManagerLogin"="manager/manager/login"//登录
+ "ManagerLogin"="manager/manager/login",//登录
+ /**
+ * 接诊操作
+ */
+ "DoctorDetail" ="medical/record/getDetailByRegisId"//详情
+
}
\ No newline at end of file
diff --git a/src/components/outpatient/CaseDetail.vue b/src/components/outpatient/CaseDetail.vue
index 1326121..3cd605d 100644
--- a/src/components/outpatient/CaseDetail.vue
+++ b/src/components/outpatient/CaseDetail.vue
@@ -8,12 +8,10 @@
-
-
- {{ registerInfo.name }}
- {{ registerInfo.sex }}
- {{ registerInfo.age }}
+ {{ patientRegistration.name }}
+ {{ patientRegistration.gender }}
+ {{ patientRegistration.age }}
- {{ registerInfo.certno }}
- 就诊次数:{{ registerInfo.visitCount }}次
+ {{ patientRegistration.phone }}
+ 就诊次数:{{ patientRegistration.visitCount || 0 }}次
-
挂号医生: {{registerInfo.dockerName}}-{{registerInfo.dockerSection}}
+
挂号医生: {{patientRegistration.dockerName}}-{{patientRegistration.dockerSection}}
-
上次就诊时间: {{ registerInfo.lastVisitTime }}
+
上次就诊时间: {{ patientRegistration.lastVisitTime }}
@@ -30,14 +30,7 @@
import Panel from "@/components/common/Panel.vue";
import {post} from "@/utils/request.ts";
import {ref} from "vue";
-const registerInfo = ref({})
-const init = (registerId: any) => {
- post("registration/getDetailById", {id: registerId}).then((res: any) => {
- registerInfo.value = res
- })
- console.log('init')
-}
-defineExpose({init})
+const patientRegistration=defineModel()
\ No newline at end of file
diff --git a/src/components/outpatient/ServiceItemsDetail.vue b/src/components/outpatient/ServiceItemsDetail.vue
index 4ec289c..0cb4882 100644
--- a/src/components/outpatient/ServiceItemsDetail.vue
+++ b/src/components/outpatient/ServiceItemsDetail.vue
@@ -5,14 +5,17 @@
-
{{ index + 1 }}
- {{ item.projectName }}
- {{ item.projectSocialCode }}
- ¥{{ item.projectUnitPrice }}元
+ {{ item.name }}
+ {{ item.socialCode }}
+ {{ item.unit }}
+ ¥{{ item.unitPrice }}元
- ¥{{ list.reduce((acc, cur) => acc + cur.projectUnitPrice, 0) }}元
+ 合计
+ ¥{{ list.reduce((acc, cur) => acc + cur.unitPrice, 0) }}元
+
@@ -21,9 +24,6 @@ import Panel from "@/components/common/Panel.vue";
import {onMounted} from "vue";
const list = defineModel({default: () => []});
-onMounted(()=>{
- console.log(list.value)
-})
\ No newline at end of file
diff --git a/src/components/outpatient/Settlement.vue b/src/components/outpatient/Settlement.vue
index 5c10b1c..0520130 100644
--- a/src/components/outpatient/Settlement.vue
+++ b/src/components/outpatient/Settlement.vue
@@ -19,7 +19,6 @@ const totalAmount = defineModel()
总金额:¥{{ totalAmount || '0' }}
取消接诊
- 保存并打印
完成接诊
diff --git a/src/views/outpatient/index.vue b/src/views/outpatient/index.vue
index 44007a8..df6a5b6 100644
--- a/src/views/outpatient/index.vue
+++ b/src/views/outpatient/index.vue
@@ -6,13 +6,17 @@
-
+
+
-
+
+
@@ -21,7 +25,7 @@
-
+
@@ -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
({})
@@ -81,7 +85,7 @@ const save = () => {
const totalAmount = ref(0)
const medicalInformationRef = ref()
const medicalHistoryRef = ref()
-const showDetail = ref(false)
+const patientRegistration= ref({})
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(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 = []
- }
-}