|
@@ -10,9 +10,9 @@
|
|
|
</view>
|
|
|
<swiper :current="tabCurId" class="swiper-box" duration="300" @change="onChangeTab">
|
|
|
<swiper-item class="tab-content" v-for="(_tabItem,tabIndex) in navList" :key="tabIndex">
|
|
|
- <CfStatus v-if="tabCurId==0" :info="cfStatusList" />
|
|
|
- <CfLogistics v-if="tabCurId==1" :info="logisticsInfoData" />
|
|
|
- <CfContent v-if="tabCurId==2" :info="recipeContent" />
|
|
|
+ <CfStatus v-if="tabCurId==0" />
|
|
|
+ <CfLogistics v-if="tabCurId==1" />
|
|
|
+ <CfContent v-if="tabCurId==2" />
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
</view>
|
|
@@ -21,13 +21,17 @@
|
|
|
<script lang="ts" setup>
|
|
|
import { ref, nextTick, onMounted } from 'vue'
|
|
|
import rest from '@/stores/rest'
|
|
|
+ import { BasicInfoVO } from '../../lib/type'
|
|
|
|
|
|
import TopCard from './TopCard.vue'
|
|
|
import CfStatus from './CfStatus.vue'
|
|
|
import CfLogistics from './CfLogistics.vue'
|
|
|
import CfContent from './CfContent.vue'
|
|
|
|
|
|
- import { getSexByCardNo,maskCardNo,getAgeByCardNo,formatDate } from '@/lib/util'
|
|
|
+ import {
|
|
|
+ getSexByCardNo,
|
|
|
+ maskCardNo,
|
|
|
+ } from '@/lib/util'
|
|
|
|
|
|
|
|
|
const topCardRef = ref()
|
|
@@ -62,7 +66,8 @@
|
|
|
])
|
|
|
|
|
|
const swiperBoxStyle = () => {
|
|
|
- let _h = `calc(100% - 72rpx - ${topCardRef.value?.offsetHeight})`;
|
|
|
+ let _h = `calc(100% - 72rpx -
|
|
|
+ cfListDtos: boolean;${topCardRef.value?.offsetHeight})`;
|
|
|
console.log("_h", _h)
|
|
|
return {
|
|
|
height: '200px',
|
|
@@ -84,25 +89,6 @@
|
|
|
hzxm: '刘秀碧',
|
|
|
})
|
|
|
const cfDataList = ref([]) // 处方列表
|
|
|
- const cfStatusList = ref([]) // 处方状态
|
|
|
- const logisticsInfoData = ref({
|
|
|
- no: '',
|
|
|
- statusList: [],
|
|
|
- }) // 物流信息
|
|
|
- const recipeContent = ref({
|
|
|
- hosName: '',
|
|
|
- name: '',
|
|
|
- sex: '',
|
|
|
- age: '',
|
|
|
- cfNo: '',
|
|
|
- list: [],
|
|
|
- ts: '',
|
|
|
- fs: '',
|
|
|
- kd: '',
|
|
|
- doctor: '',
|
|
|
- date: '',
|
|
|
- note: '根据卫生部《处方管理办法》规定,处方当日有效除药品质量原因外,药品一经发出,不得退换',
|
|
|
- })
|
|
|
|
|
|
// 地址信息拼接
|
|
|
const addressInfSplice = (basic:string, details:string, isShow) => {
|
|
@@ -115,7 +101,7 @@
|
|
|
|
|
|
const getInfo = async () => {
|
|
|
// todo 基础信息
|
|
|
- let basicInfo = await rest.get('/app-api/bmfw/findList',dataList.value)
|
|
|
+ let basicInfo = await rest.get('/app-api/bmfw/findList',dataList.value) as BasicInfoVO
|
|
|
console.log("基础信息", basicInfo)
|
|
|
// todo 地址信息
|
|
|
let addressInfo = await rest.get('/default/consignee-info/list',{hzid:dataList.value.hzsfzh})
|
|
@@ -126,7 +112,7 @@
|
|
|
}
|
|
|
info.value.idCard = maskCardNo(basicInfo[0].hzsfzh)
|
|
|
info.value.sex = getSexByCardNo(basicInfo[0].hzsfzh)
|
|
|
- if (addressInfo && addressInfo.length > 0){
|
|
|
+ if (Array.isArray(addressInfo) && addressInfo.length > 0){
|
|
|
let address = (addressInfo[0].province || '') + (addressInfo[0].city || '') + (addressInfo[0].area || '')
|
|
|
info.value.addr = addressInfSplice(address,addressInfo[0].shrdzxxdz,false)
|
|
|
}else {
|
|
@@ -134,109 +120,6 @@
|
|
|
}
|
|
|
cfDataList.value = basicInfo[0].cfListDtos
|
|
|
console.log("处方列表", cfDataList.value)
|
|
|
- // 处方状态
|
|
|
- await getCfStatusData()
|
|
|
- // 物流信息
|
|
|
- await getLogisticsInfo()
|
|
|
- // 处方内容
|
|
|
- await getRecipeContent()
|
|
|
- }
|
|
|
-
|
|
|
- function filterTitle(index) {
|
|
|
- let dict_type = {
|
|
|
- '00':'已开方',
|
|
|
- '01':'已接收',
|
|
|
- '02':'已确认',
|
|
|
- '04':'已配方',
|
|
|
- '05':'已浸泡',
|
|
|
- '06':'已煎煮',
|
|
|
- '07':'已包装',
|
|
|
- '08':'已快递',
|
|
|
- '09':'已发药',
|
|
|
- '10':'已签收',
|
|
|
- }
|
|
|
- return dict_type[index]
|
|
|
- }
|
|
|
- function filterIcon(state){
|
|
|
- let dict_type = {
|
|
|
- '00':'\ue672',
|
|
|
- '01':'\ue672',
|
|
|
- '02':'\ue676',
|
|
|
- '04':'\ue671',
|
|
|
- '05':'\ue673',
|
|
|
- '06':'\ue675',
|
|
|
- '07':'\ue677',
|
|
|
- '08':'\ue674',
|
|
|
- '09':'\ue8c6',
|
|
|
- '10':'\ue602',
|
|
|
- }
|
|
|
- return dict_type[state] || '\ue625'
|
|
|
- }
|
|
|
- const getCfStatusData = async()=> {
|
|
|
- cfStatusList.value = []
|
|
|
- let statusRes = await rest.get('/app-api/bmfw/findCfStatus',{ptwybh:'2024_1857595040975118338'})
|
|
|
- let res = statusRes.statusList
|
|
|
- console.log("处方状态", res)
|
|
|
- for (let i = 0; i < res.length; i++) {
|
|
|
- let cflist = { time: '',title:'',icon:'',message:'',createTime:'',isCur: false }
|
|
|
- // 去除一审
|
|
|
- if (res[i].prescriptionOperationType != '22'){
|
|
|
- cflist.time = formatDate(res[i].createTime,'{y}-{m}-{d} {h}:{i}')
|
|
|
- cflist.title = filterTitle(res[i].prescriptionOperationType)
|
|
|
- cflist.icon = filterIcon(res[i].prescriptionOperationType)
|
|
|
- cflist.createTime = res[i].createTime
|
|
|
- cfStatusList.value.push(cflist)
|
|
|
- }
|
|
|
- }
|
|
|
- cfStatusList.value.sort((a, b) => b.createTime - a.createTime)
|
|
|
- if (cfStatusList.value.length > 0) {
|
|
|
- cfStatusList.value[0].isCur = true
|
|
|
- }
|
|
|
- console.log("循环", cfStatusList.value)
|
|
|
- }
|
|
|
-
|
|
|
- function filterAddressTitle(index){
|
|
|
- let dict_type = {
|
|
|
- '2':'在途中',
|
|
|
- '3':'派送中',
|
|
|
- '4':'已签收',
|
|
|
- '9':'签收失败',
|
|
|
- }
|
|
|
- return dict_type[index]
|
|
|
- }
|
|
|
-
|
|
|
- const getLogisticsInfo = async()=> {
|
|
|
- let res = await rest.get('/app-api/bmfw/findCfWl',{ptwybh:'2024_1857595040975118338'})
|
|
|
- for (let i = 0; i < res.cfList.length; i++) {
|
|
|
- let msgList = JSON.parse(res.cfList[i].msg)
|
|
|
- for (let j = 0; j< msgList.length;j++){
|
|
|
- let listWl = { time: '',title:'',icon:'',message:'' }
|
|
|
- listWl.time = msgList[j].time2
|
|
|
- listWl.title = filterAddressTitle(msgList[j].wlzt)
|
|
|
- listWl.icon = '\ue674'
|
|
|
- listWl.message = msgList[j].context
|
|
|
- logisticsInfoData.value.statusList.push(listWl)
|
|
|
- }
|
|
|
- logisticsInfoData.value.no = res.cfList[i].ydh
|
|
|
- }
|
|
|
- console.log("物流", logisticsInfoData.value)
|
|
|
- }
|
|
|
-
|
|
|
- const getRecipeContent = async () => {
|
|
|
- let res = await rest.get('/app-api/bmfw/findCfYp',{ptwybh:'2024_1857595040975118338'})
|
|
|
- console.log("处方内容", res)
|
|
|
- recipeContent.value.hosName = res.yljgmc
|
|
|
- recipeContent.value.name = res.patient.hzxm
|
|
|
- recipeContent.value.sex = getSexByCardNo(res.patient.zjhm)
|
|
|
- recipeContent.value.age = getAgeByCardNo(res.patient.zjhm)
|
|
|
- recipeContent.value.cfNo = res.yncfbh
|
|
|
- recipeContent.value.list = res.detail
|
|
|
- recipeContent.value.ts = res.cfts
|
|
|
- recipeContent.value.fs = res.fyfsyf
|
|
|
- recipeContent.value.kd = res.fyfslx
|
|
|
- recipeContent.value.doctor = res.doctor.nickname
|
|
|
- recipeContent.value.date = formatDate(res.createTime,'{y}-{m}-{d} {h}:{i}')
|
|
|
- console.log("111", recipeContent.value)
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|