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 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
-
- + + +
@@ -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, + })), + }; + }); +};