From b20616b20a4d44a533a658183f2ad5d60e384168 Mon Sep 17 00:00:00 2001 From: ChenQiuYu Date: Wed, 30 Apr 2025 15:10:05 +0800 Subject: [PATCH] dev --- src/components/charge/ChargeQueue.vue | 24 ++-- src/components/charge/PatientCard.vue | 46 ++++++ src/components/charge/RecordsLog.vue | 77 ++++++++++ src/components/charge/RecordsLog/Detail.vue | 151 ++++++++++++++++++++ src/utils/discrotyUtil.ts | 1 + src/views/charge/index.vue | 150 +++++++++++-------- 6 files changed, 377 insertions(+), 72 deletions(-) create mode 100644 src/components/charge/PatientCard.vue create mode 100644 src/components/charge/RecordsLog.vue create mode 100644 src/components/charge/RecordsLog/Detail.vue diff --git a/src/components/charge/ChargeQueue.vue b/src/components/charge/ChargeQueue.vue index d43cc61..a59ff3f 100644 --- a/src/components/charge/ChargeQueue.vue +++ b/src/components/charge/ChargeQueue.vue @@ -17,25 +17,25 @@
    -
  • - 头像 - 头像 - {{ item.patientInfo.name }} + {{ item.patientName }} - {{ formatTime(item.patientRegistration.createDatetime) || '-' }} + {{ formatTime(item.createTime) || '-' }} {{ item.status == 0 ? '未收' : '已收' }} @@ -62,7 +62,7 @@ const clickItem = (item: any) => { emit('clickItem', item, query.value.status); } -const orderList = ref([]); +const ChargeQueueList = ref([]); const query = ref({ pageSize: 20, pageNum: 1, @@ -75,25 +75,25 @@ const addChargeOrder = () => { patientName: "匿名患者", payType: -1, } - if (orderList.value[0]?.id == -1) { + if (ChargeQueueList.value[0]?.id == -1) { return } - orderList.value.unshift(newOrder) + ChargeQueueList.value.unshift(newOrder) clickFirst() } const clickFirst = () => { - clickItem(orderList.value[0]) + clickItem(ChargeQueueList.value[0]) } const getOrderList = () => { post("medical/record/getChargeQueue", {query: query.value}).then( (res: any) => { - orderList.value = res.list + ChargeQueueList.value = res.list clickFirst() } ) } const delDraft = () => { - orderList.value.shift(); + ChargeQueueList.value.shift(); clickFirst() } defineExpose({delDraft, getOrderList}) diff --git a/src/components/charge/PatientCard.vue b/src/components/charge/PatientCard.vue new file mode 100644 index 0000000..32cd7da --- /dev/null +++ b/src/components/charge/PatientCard.vue @@ -0,0 +1,46 @@ + + + + + + \ No newline at end of file diff --git a/src/components/charge/RecordsLog.vue b/src/components/charge/RecordsLog.vue new file mode 100644 index 0000000..84cf6da --- /dev/null +++ b/src/components/charge/RecordsLog.vue @@ -0,0 +1,77 @@ + + + \ No newline at end of file diff --git a/src/components/charge/RecordsLog/Detail.vue b/src/components/charge/RecordsLog/Detail.vue new file mode 100644 index 0000000..bf72135 --- /dev/null +++ b/src/components/charge/RecordsLog/Detail.vue @@ -0,0 +1,151 @@ + + + \ No newline at end of file diff --git a/src/utils/discrotyUtil.ts b/src/utils/discrotyUtil.ts index c5a7738..cbe6300 100644 --- a/src/utils/discrotyUtil.ts +++ b/src/utils/discrotyUtil.ts @@ -1,4 +1,5 @@ export function getKey(map: any, key: any) { + console.log(key) if (Object.keys(map).length === 0) { return "未知"; } diff --git a/src/views/charge/index.vue b/src/views/charge/index.vue index 3319beb..5432578 100644 --- a/src/views/charge/index.vue +++ b/src/views/charge/index.vue @@ -5,54 +5,32 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
-
- + + +
@@ -66,14 +44,16 @@
- +
+
+
@@ -96,6 +76,11 @@ import GoodsDetail from "@/components/charge/GoodsDetail.vue"; import DiagnosisSearchInput from "@/components/outpatient/DiagnosisSearchInput.vue"; import Settlement from "@/components/charge/Settlement.vue"; import TotalPrice from "@/components/charge/TotalPrice.vue"; +import psnCertTypes from "@/assets/config/directory/psnCertTypes.json" +import {getKey} from "@/utils/discrotyUtil.ts"; +import antys from "@/assets/config/directory/antys.json" +import RecordsLog from "@/components/charge/RecordsLog.vue"; +import PatientCard from "@/components/charge/PatientCard.vue"; const socialCard = ref({payInfo: {}}) const formData = ref({ @@ -112,7 +97,7 @@ const delDraft = () => { } const settlementRef = ref() const saveAndCharge = () => { - post('charge/save', {data: formData.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) @@ -136,17 +121,18 @@ const diagnosisSelect = (list: any) => { formData.value.diagnosisMedicalRecord.diagnosisDetail = JSON.stringify(list) formData.value.diagnosisMedicalRecord.diagnosisSummary = diagnosisNames } +const recordsConsumptionRef= ref("") +const clickItem = async (item: any, status: any) => { -const clickItem = (item: any, status: any) => { - formData.value = item + formData.value = await post('medical/record/getByDiagnosisCode', {diagnosisCode: item.code}) statusDisabled.value = status getOrderTotalPrice() nextTick(() => { let list = JSON.parse(formData.value.diagnosisMedicalRecord.diagnosisDetail) let nList = formData.value.diagnosisMedicalRecord.diagnosisSummary.split(',') diagnosisSearchRef.value?.init(list, nList); + recordsConsumptionRef.value?.init(formData.value.patientInfo.id); }) - } const dockerList = ref([]) const getDockerList = () => { @@ -172,6 +158,7 @@ const orderCanceled = () => { onMounted(() => { getDockerList() + list() }) const getOrderTotalPrice = () => { let totalPrice = 0 @@ -184,13 +171,58 @@ const getOrderTotalPrice = () => { formData.value.preTotalPrice = totalPrice formData.value.totalPrice = totalPrice } + + +const props = { + expandTrigger: 'hover' as const, +} + +const doctorId=ref('') +const handleChange = (value: any) => { + doctorId.value = value[value.length - 1] +} + +const cardTypeList = ref(Object.entries(psnCertTypes).map(([id, name]) => ({id, name}))) +const sectionList = ref([]) +const doctorList = ref([]) +const sectionDoctorOption = ref('') +const list = () => { + post('organization/section/allList').then((res: any) => { + sectionList.value = res + post('organization/member/search', {query: {role: 1}}).then((res: any) => { + doctorList.value = res + nextTick(() => { + generateOptions() + }) + }) + }) + +} +const generateOptions = () => { + if (!sectionList.value || !doctorList.value) return []; + sectionDoctorOption.value = sectionList.value.map((section: any) => { + console.log(section) + // 过滤出属于当前科室的医生 + const doctors = doctorList.value.filter((doc: any) => doc.sectionId === section.id); + console.log(doctors) + return { + value: section.id, + label: section.name, + children: doctors.map((doc: any) => ({ + value: doc.id, + label: doc.name, + })), + }; + }); +};