提交问诊记录

This commit is contained in:
zoujiandong 2023-10-13 11:16:20 +08:00
parent 307f0627d2
commit c8fc69d754
14 changed files with 2309 additions and 9 deletions

18
src/api/inquiry/list.js Normal file
View File

@ -0,0 +1,18 @@
import request from '../../utils/request'
const url = '/admin/order/inquiry/record';
export function getInquiryList(params){
return request({
url:'/admin/order/inquiry/record',
method: 'get',
params
})
}
export function getInquiryDetail(id){
return request({
url:'/admin/order/inquiry/record/'+id,
method: 'get'
})
}

View File

@ -65,3 +65,11 @@ export function inquiryCase(id){//病例详情
method: 'get'
})
}
export function getIm(id,params){//获取im分页
return request({
url:`/admin/order/inquiry/im/${id}`,
method: 'get',
params
})
}

View File

@ -16,3 +16,9 @@ export function getPrescriptionDetail(id){
method: 'get'
})
}
export function getCase(id){
return request({
url:'/admin/case/inquiry/'+id,
method: 'get'
})
}

View File

@ -0,0 +1,468 @@
<template>
<!-- Modal -->
<a-modal
v-model:visible="modalVisible"
fullscreen
:title="'问诊详情'"
title-align="start"
:auto-label-width="true"
:footer="false"
@cancel="handleClose"
>
<div class="titlebox">
<div class="bar"></div>
<div class="name">订单信息</div>
</div>
<a-form :model="modalForm" ref="modalFormRef" :auto-label-width="true">
<a-row :gutter="24" style="margin-top: 35px">
<a-col :span="12">
<a-form-item field="inquiry_no" label="订单编号:">
<span>{{ modalForm.inquiry_no }}</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item field="order_product_status" label="订单状态:">
<span>{{ formatInquiryStatus(modalForm.inquiry_status) }}</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item field="user.created_at" label="支付时间:">
<span v-if="parseTime(modalForm.pay_time)">{{
parseTime(modalForm.pay_time)
}}</span>
<span v-else>-</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item field="reception_time" label="接诊时间:">
<span v-if="parseTime(modalForm.reception_time)">{{
parseTime(modalForm.reception_time)
}}</span>
<span v-else>-</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item field="inquiry_type" label="问诊类型:">
<span>{{ formatInquiryType(modalForm.inquiry_type) }}</span>
</a-form-item>
</a-col>
</a-row>
<a-divider />
<div class="titlebox" v-if="modalForm.user_doctor">
<div class="bar"></div>
<div class="name">医生信息</div>
<a-space
style="
margin-right: 8px;
flex: 1;
display: flex;
justify-content: flex-end;
"
>
<a-button type="primary" @click="openDcotor"
>查看医生完整信息</a-button
>
</a-space>
</div>
<a-row :gutter="24" style="margin-top: 35px">
<a-col :span="24">
<a-form-item field="license_cert" :hide-label="true">
<div class="doctorInfo" v-if="modalForm.user_doctor">
<a-space size="large">
<a-image
width="80"
height="80"
class="headImg"
:src="modalForm.user_doctor.avatar"
v-if="modalForm.user_doctor.avatar"
>
</a-image>
<a-image
width="80"
height="80"
class="headImg"
src="https://img.applets.igandanyiyuan.com/basic/file/doctor_avatar.png"
v-else
>
</a-image>
</a-space>
<div class="infobox">
<div class="name">
{{ modalForm.user_doctor.user_name }}&nbsp;&nbsp;{{
formatDoctorTitle(modalForm.user_doctor.doctor_title)
}}
</div>
<div class="hospital">
{{
modalForm.user_doctor.hospital.hospital_name
}}&nbsp;&nbsp;{{
modalForm.user_doctor.department_custom_name
}}
</div>
</div>
</div>
<div class="doctorInfo" v-else>暂未分配到医生</div>
</a-form-item>
</a-col>
</a-row>
<a-divider v-if="modalForm.user_doctor" />
<div class="titlebox">
<div class="bar"></div>
<div class="name">就诊人信息</div>
<a-space
style="
margin-right: 8px;
flex: 1;
display: flex;
justify-content: flex-end;
"
>
<a-button type="primary" status="warning" @click="openPatient"
>查看就诊人完整信息</a-button
>
</a-space>
</div>
<a-row
:gutter="24"
style="margin-top: 35px"
v-if="modalForm.order_inquiry_case"
>
<a-col :span="24">
<a-form-item label="就诊人姓名:">
<span
>{{ modalForm.order_inquiry_case.name }}&nbsp;&nbsp;{{
modalForm.order_inquiry_case.sex == 1 ? '男' : '女'
}}&nbsp;&nbsp;{{ modalForm.order_inquiry_case.age }}</span
>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" v-if="modalForm.order_inquiry_case">
<a-col :span="24">
<a-form-item field="inquiry_no" label="病情描述:">
<span>{{ modalForm.order_inquiry_case.disease_desc }}</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" v-if="modalForm.order_inquiry_case">
<a-col :span="24">
<a-form-item field="inquiry_no" label="确诊疾病:">
<span
>{{
modalForm.order_inquiry_case.disease_class_name
}}&nbsp;&nbsp;{{
modalForm.user_doctor.department_custom_name
}}</span
>
</a-form-item>
</a-col>
</a-row>
<a-divider />
</a-form>
<div class="titlebox">
<div class="bar"></div>
<div class="name">聊天记录</div>
</div>
<a-form-item field="license_cert" :hide-label="true">
<div class="phone">
<div class="phonecont">
<a-button class="more" v-if="showMore">点击加载更多</a-button>
<div class="nomore" v-else>---没有更多了---</div>
<div
class="msgbox"
:class="
modalForm.user_doctor.user_id == item.from_user_id
? 'patientmsg'
: ''
"
v-for="item in chatlist"
:key="item.message_id"
>
<img
v-if="modalForm.user_doctor.user_id == item.from_user_id"
class="chatAvater"
src="https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png"
alt=""
/>
<img
v-else="modalForm.user_doctor.user_id == item.from_user_id"
class="chatAvater"
:src="modalForm.user_doctor.avatar"
alt=""
/>
<div class="msgcon">
<div class="msgtext" v-if="item.message_type == 'TIMTextElem'">
{{ JSON.parse(item.message_content).Text }}
</div>
<div
class="msgtext"
v-else-if="item.message_type == 'TIMCustomElem'"
>
<div
v-if="
JSON.parse(JSON.parse(item.message_content).Data)
.message_type == 2
"
class="text"
>
222
</div>
</div>
<div class="date">{{ item.created_at }}</div>
</div>
</div>
</div>
</div>
</a-form-item>
<a-divider />
<div class="titlebox">
<div class="bar"></div>
<div class="name">操作</div>
</div>
<a-row :gutter="24" style="margin-top: 35px">
<a-col :span="24">
<a-form-item field="" label="" no-style>
<a-space
style="margin-right: 8px"
v-if="
modalForm.report_pre_status == 2 &&
modalForm.refund_status != 2 &&
modalForm.refund_status != 3
"
>
<a-button
type="primary"
v-has="'admin:sysProductList:report'"
@click="
() => {
isVisible = true;
order_product_id = modalForm.order_product_id;
}
"
>上报处方平台</a-button
>
</a-space>
<!-- 订单状态=2退款状态=45支付状态=2上报状态!=1 -->
<a-space
style="margin-right: 8px"
v-if="
modalForm.order_product_status == 2 &&
modalForm.pay_status == 2 &&
(modalForm.refund_status == 4 ||
modalForm.refund_status == 5 ||
modalForm.refund_status == 0) &&
modalForm.report_pre_status != 1
"
>
<a-button
type="primary"
v-has="'admin:sysProductList:cancel'"
status="danger"
@click="
() => {
okVisible = true;
cur_product_id = modalForm.order_product_id;
}
"
>取消药品订单</a-button
>
</a-space>
</a-form-item>
</a-col>
</a-row>
</a-modal>
<!-- 医生详情弹框 -->
<doctorModal
:doctorVisible="doctorVisible"
:doctor_id="doctor_id"
@doctorVisibleChange="
() => {
doctorVisible = false;
doctor_id = '';
}
"
></doctorModal>
<!-- 患者详情弹窗 -->
<patientModal
:patientVisible="patientVisible"
:data="patientData"
@patientVisibleChange="
() => {
patientVisible = false;
}
"
></patientModal>
</template>
<script setup>
import { ref, toRefs, reactive, watch,nextTick } from 'vue';
import { formatDoctorTitle } from '@/utils/format';
import { parseTime } from '@/utils/parseTime';
import { inquiryCase, getIm } from '@/api/order/list';
import { formatInquiryType, formatInquiryStatus } from '@/utils/format';
const emits = defineEmits(['inquiryVisibleChange']);
const showMore = ref(true);
const props = defineProps({
//
modalVisible: {
type: Boolean,
default: false,
},
modalForm: {
type: Object,
},
});
const firstIn=ref(false);
const doctorVisible = ref(false);
const doctor_id = ref('');
const patientVisible = ref(false);
const patientData = reactive({});
const { modalVisible, modalForm } = toRefs(props);
const openPatient = () => {
patientVisible.value = true;
};
const pager = reactive({
page: 1,
page_size: 10,
});
const chatlist = ref([]);
const HandleGetIm = async (id, params = {}) => {
const { code, data } = await getIm(id, params);
if (code == 200) {
if (chatlist.value < 10) {
showMore.value = false;
}
chatlist.value = data.data.reverse().concat(chatlist.value);
if(!firstIn.value){
nextTick(() => {
//
let ele = document.querySelector('.phonecont');
ele.scrollTop = ele.scrollHeight;
});
}
firstIn.value=true
}
};
watch(
() => props.modalForm,
() => {
if (
props.modalForm.order_inquiry_case &&
props.modalForm.order_inquiry_case.inquiry_case_id
) {
let id = props.modalForm.order_inquiry_case.inquiry_case_id;
inquiryCase(id).then((data) => {
Object.assign(patientData, data.data);
});
}
if (props.modalForm.order_inquiry_id) {
let id = props.modalForm.order_inquiry_id;
HandleGetIm(id, { ...pager });
}
},
{ immediate: true, deep: true }
);
const openDcotor = () => {
doctor_id.value = props.modalForm.doctor_id;
doctorVisible.value = true;
};
const handleClose = () => {
emits('inquiryVisibleChange', (modalVisible.value = false));
};
</script>
<style scoped>
.more {
display: flex;
margin: 20px auto 10px;
}
.nomore {
font-size: 12px;
color: #666;
text-align: center;
margin: 20px auto 10px;
}
.headImg {
margin-right: 20px;
border-radius: 50%;
width: 80px;
height: 80px;
}
.doctorInfo {
display: flex;
align-items: center;
}
.infobox {
display: flex;
flex-direction: column;
justify-content: space-between;
}
.phone {
margin-top: 35px;
position: relative;
background: #111;
border-radius: 55px;
box-shadow: 0px 0px 0px 2px #aaa;
width: 320px;
height: 480px;
padding: 105px 25px 60px;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
.phone:before {
content: '';
width: 60px;
height: 10px;
border-radius: 10px;
position: absolute;
left: 50%;
margin-left: -30px;
background: #333;
top: 50px;
}
.phonecont {
width: 100%;
height: 100%;
overflow: scroll;
background: #fff;
}
.chatAvater {
width: 40px;
height: 40px;
border-radius: 50%;
}
.msgbox {
display: flex;
margin: 4px 12px 12px;
flex-direction: row-reverse;
}
.patientmsg {
display: flex;
flex-direction: row;
justify-content: flex-start;
}
.phonecont .msgtext {
max-width: 80vw;
border-radius: 5px;
padding: 5px 8px;
background: #efefef;
}
.msgbox .msgcon {
margin-right: 6px;
}
.patientmsg .msgcon {
margin-left: 6px;
}
.date {
font-size: 12px;
color: #666;
}
</style>

View File

@ -0,0 +1,629 @@
<template>
<!-- Modal -->
<a-modal
v-model:visible="medinceVisible"
fullscreen
:title="'药品详情'"
title-align="start"
:auto-label-width="true"
:footer="false"
@cancel="handleClose"
>
<div class="titlebox">
<div class="bar"></div>
<div class="name">订单信息</div>
</div>
<a-form :model="modalForm" ref="modalFormRef" :auto-label-width="true">
<a-row :gutter="24" style="margin-top: 35px">
<a-col :span="12">
<a-form-item field="inquiry_no" label="订单编号:">
<span>{{ modalForm.order_product_no }}</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item field="order_product_status" label="处方编号:">
<span v-if="modalForm.order_prescription">{{
modalForm.order_prescription.prescription_code
}}</span>
<span v-else>暂无</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item field="user.created_at" label="下单时间:">
<span>{{ modalForm.created_at }}</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item field="pay_time" label="支付时间:">
<span v-if="parseTime(modalForm.pay_time)">{{
parseTime(modalForm.pay_time)
}}</span>
<span v-else>-</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item field="amount_total" label="订单金额:">
<span>{{ modalForm.amount_total }}</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item field="logistics_fee" label="邮费:">
<span>{{ modalForm.logistics_fee }}</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<a-form-item field="payment_amount_total" label="实付金额:">
<span>{{ modalForm.payment_amount_total }}</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item field="order_product_status" label="订单状态:">
<span>{{
formatProductStatus(modalForm.order_product_status)
}}</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" v-if="modalForm.cancel_reason">
<a-col :span="24">
<a-form-item field="department_custom_name" label="备 注 ">
<span>{{
formatProductCancelReason(modalForm.cancel_reason)
}}</span>
</a-form-item>
</a-col>
</a-row>
<a-divider />
<div class="titlebox" v-if="modalForm.order_product_refund">
<div class="bar"></div>
<div class="name">退款信息</div>
</div>
<a-row
:gutter="24"
style="margin-top: 35px"
v-if="modalForm.order_product_refund"
>
<a-col :span="12">
<a-form-item field="inquiry_refund_no" label="退款编号:">
<span>{{
modalForm.order_product_refund.product_refund_no
}}</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item field="escrow_trade_no" label=" 第三方订单编号:">
<span>{{ modalForm.order_product_refund.refund_id }}</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" v-if="modalForm.order_product_refund">
<a-col :span="12">
<a-form-item field="inquiry_refund_no" label="退款金额:">
<span>{{ modalForm.order_product_refund.refund_total }}</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item field="escrow_trade_no" label="退款状态:">
<span>{{
formatRefundStatus(
modalForm.order_product_refund.product_refund_status
)
}}</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" v-if="modalForm.order_product_refund">
<a-col :span="24">
<a-form-item field="inquiry_refund_no" label="退款时间:">
<span v-if="parseTime(modalForm.order_product_refund.success_time)">{{ modalForm.order_product_refund.success_time }}</span>
<span v-else>-</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" v-if="modalForm.order_product_refund">
<a-col :span="24">
<a-form-item field="inquiry_refund_no" label="退款原因:">
<span>{{ modalForm.order_product_refund.refund_reason }}</span>
</a-form-item>
</a-col>
</a-row>
<a-divider v-if="modalForm.order_product_refund" />
<div class="titlebox" v-if="modalForm.order_product_item.length > 0">
<div class="bar"></div>
<div class="name">药品信息</div>
</div>
<a-row
:gutter="24"
style="margin-top: 35px"
v-if="modalForm.order_product_item.length > 0"
>
<a-col :span="24">
<a-form-item field="license_cert" :hide-label="true">
<a-list>
<a-list-item
v-for="item in modalForm.order_product_item"
:key="item.product_item_id"
>
<a-list-item-meta
:title="item.product_name + item.product_spec"
:description="item.manufacturer + '*' + item.amount"
>
<template #avatar>
<a-avatar shape="square">
<img
alt="avatar"
src="https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
/>
</a-avatar>
</template>
</a-list-item-meta>
</a-list-item>
</a-list>
</a-form-item>
</a-col>
</a-row>
<a-divider v-if="modalForm.order_product_item.length > 0" />
<div class="titlebox">
<div class="bar"></div>
<div class="name">地址信息</div>
<a-space
style="
margin-right: 8px;
flex: 1;
display: flex;
justify-content: flex-end;
"
>
<a-button type="primary" status="warning" @click="toggleAddress"
>{{lookAllAddress?'隐藏完整地址信息':'查看完整地址信息'}}</a-button
>
</a-space>
</div>
<a-row :gutter="24" style="margin-top: 35px">
<a-col :span="12">
<a-form-item field="inquiry_no" label="收货人姓名:">
<span v-if="!lookAllAddress"> {{ modalForm.consignee_name_mask}}</span>
<span v-else>{{AddressData.consignee_name}}</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item field="inquiry_no" label="收货人电话:">
<span v-if="!lookAllAddress"> {{modalForm.consignee_tel_mask}}</span>
<span v-else>{{AddressData.consignee_tel}}</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<a-form-item field="inquiry_no" label="收货人地址:">
<span v-if="!lookAllAddress"> {{modalForm.address_mask }}</span>
<span v-else>{{AddressData.address}}</span>
</a-form-item>
</a-col>
</a-row>
<a-divider />
<div class="titlebox">
<div class="bar"></div>
<div class="name">物流信息</div>
</div>
<a-row :gutter="24" style="margin-top: 35px">
<a-col :span="24">
<a-form-item field="license_cert" :hide-label="true">
<div class="timeline" v-if="modalForm.order_product_logistics">
<a-timeline>
<a-timeline-item
:label="item.time"
:dotColor="formatColor(item.status)"
v-for="item in cur_express"
>
{{ item.context }}
</a-timeline-item>
</a-timeline>
<a-button @click="toggleExpand" class="expand">{{
isExpand ? '收起' : '展开'
}}</a-button>
</div>
<div v-else>暂无物流信息</div>
</a-form-item>
</a-col>
</a-row>
<a-divider />
<div class="titlebox" v-if="modalForm.order_prescription">
<div class="bar"></div>
<div class="name">处方信息</div>
</div>
<a-row
:gutter="24"
style="margin-top: 35px"
v-if="modalForm.order_prescription"
>
<a-col :span="24">
<a-form-item field="license_cert" :hide-label="true">
<tableUnit
:pagination="false"
:columns="modalForm.chufang_columns"
:data="modalForm.chufang_data"
></tableUnit>
<!-- <prescription :data="modalForm.order_prescription"></prescription> -->
</a-form-item>
</a-col>
</a-row>
<a-divider v-if="modalForm.order_prescription" />
<div class="titlebox" v-if="modalForm.user_doctor">
<div class="bar"></div>
<div class="name">医生信息</div>
<a-space
style="
margin-right: 8px;
flex: 1;
display: flex;
justify-content: flex-end;
"
>
<a-button type="primary" @click="openDcotor"
>查看医生完整信息</a-button
>
</a-space>
</div>
<a-row :gutter="24" style="margin-top: 35px">
<a-col :span="24">
<a-form-item field="license_cert" :hide-label="true">
<div class="doctorInfo" v-if="modalForm.user_doctor">
<a-space size="large">
<a-image
width="80"
height="80"
class="headImg"
:src="modalForm.user_doctor.avatar"
v-if="modalForm.user_doctor.avatar"
>
</a-image>
<a-image
width="80"
height="80"
class="headImg"
src="https://img.applets.igandanyiyuan.com/basic/file/doctor_avatar.png"
v-else
>
</a-image>
</a-space>
<div class="infobox">
<div class="name">
{{ modalForm.user_doctor.user_name }}&nbsp;&nbsp;{{
formatDoctorTitle(modalForm.user_doctor.doctor_title)
}}
</div>
<div class="hospital">
{{
modalForm.user_doctor.hospital.hospital_name
}}&nbsp;&nbsp;{{
modalForm.user_doctor.department_custom_name
}}
</div>
</div>
</div>
<div class="doctorInfo" v-else>暂未分配到医生</div>
</a-form-item>
</a-col>
</a-row>
<a-divider v-if="modalForm.user_doctor" />
<div class="titlebox">
<div class="bar"></div>
<div class="name">就诊人信息</div>
<a-space
style="
margin-right: 8px;
flex: 1;
display: flex;
justify-content: flex-end;
"
>
<a-button type="primary" status="warning" @click="openPatient"
>查看就诊人完整信息</a-button
>
</a-space>
</div>
<a-row :gutter="24" style="margin-top: 35px" v-if="modalForm.order_inquiry_case">
<a-col :span="24">
<a-form-item label="就诊人姓名:">
<span>{{modalForm.order_inquiry_case.name }}&nbsp;&nbsp;{{modalForm.order_inquiry_case.sex == 1 ? '男' : '女'}}&nbsp;&nbsp;{{ modalForm.order_inquiry_case.age }}</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" v-if="modalForm.order_inquiry_case">
<a-col :span="24">
<a-form-item field="inquiry_no" label="病情描述:">
<span>{{modalForm.order_inquiry_case.disease_desc}}</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" v-if="modalForm.order_inquiry_case">
<a-col :span="24">
<a-form-item field="inquiry_no" label="确诊疾病:">
<span>{{modalForm.order_inquiry_case.disease_class_name}}&nbsp;&nbsp;{{modalForm.user_doctor.department_custom_name}}</span>
</a-form-item>
</a-col>
</a-row>
<a-divider />
<div class="titlebox">
<div class="bar"></div>
<div class="name">处方上报状态</div>
</div>
<a-row :gutter="24" style="margin-top: 35px">
<a-col :span="24">
<a-form-item field="inquiry_no" label="上报状态:">
<span> {{ fromatReportStatus(modalForm.report_pre_status) }}</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" >
<a-col :span="24">
<a-form-item field="inquiry_no" label="上报时间:">
<span v-if="parseTime(modalForm.report_pre_time)"> {{modalForm.report_pre_time}}</span>
<span v-else>-</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" v-if="modalForm.report_pre_fail_reason">
<a-col :span="24" >
<a-form-item field="inquiry_no" label="上报失败原因:">
<span> {{ modalForm.report_pre_fail_reason}}</span>
</a-form-item>
</a-col>
</a-row>
<a-divider />
</a-form>
<div class="titlebox">
<div class="bar"></div>
<div class="name">操作</div>
</div>
<a-row :gutter="24" style="margin-top: 35px">
<a-col :span="24">
<a-form-item field="" label="" no-style>
<a-space
style="margin-right: 8px"
v-if="modalForm.report_pre_status == 2 && modalForm.refund_status!=2 && modalForm.refund_status!=3"
>
<a-button
type="primary"
v-has="'admin:sysProductList:report'"
@click="
() => {
isVisible = true;
order_product_id = modalForm.order_product_id;
}
"
>上报处方平台</a-button
>
</a-space>
<!-- 订单状态=2退款状态=45支付状态=2上报状态!=1 -->
<a-space
style="margin-right: 8px"
v-if="
(modalForm.order_product_status == 2 && modalForm.pay_status==2
&& (modalForm.refund_status==4 || modalForm.refund_status==5 || modalForm.refund_status==0) &&
modalForm.report_pre_status != 1 )
"
>
<a-button
type="primary"
v-has="'admin:sysProductList:cancel'"
status="danger"
@click="
() => {
okVisible = true;
cur_product_id = modalForm.order_product_id;
}
"
>取消药品订单</a-button
>
</a-space>
</a-form-item>
</a-col>
</a-row>
</a-modal>
<!-- 医生详情弹框 -->
<doctorModal
:doctorVisible="doctorVisible"
:doctor_id="doctor_id"
@doctorVisibleChange="
() => {
doctorVisible = false;
doctor_id = '';
}
"
></doctorModal>
<!-- 患者详情弹窗 -->
<patientModal
:patientVisible="patientVisible"
:data="modalForm.patientData"
@patientVisibleChange="
() => {
patientVisible = false;
}
"
></patientModal>
<confirmModal
:okVisible="okVisible"
:api="cancelProduct"
:dealType="'order_inquiry_id'"
:id="cur_product_id"
@closeChange="closeChange"
></confirmModal>
<isOkModal
:isVisible="isVisible"
:api="reportPrePscription"
:title="'确定上报处方吗?'"
:dealType="'order_product_id'"
:id="order_product_id"
@closeChangeOk="closeChangeOk"
></isOkModal>
</template>
<script setup>
import {reactive,ref,getCurrentInstance,watch,toRefs} from 'vue';
import { parseTime } from '@/utils/parseTime';
import {
formatDoctorTitle,
fromatReportStatus,
formatPrescriptionStatus,
formatPharmacistStatus,
formatProductCancelReason,
} from '@/utils/format';
import {lookAddress,cancelProduct,reportPrePscription} from '@/api/order/list';
const IMG_URL = import.meta.env.VITE_IMG_URL;
const emits = defineEmits(['medinceVisibleChange']);
const AddressData=reactive({});
const getAddress= async (order_product_id)=>{
const{data,code}= await lookAddress(order_product_id);
if(code==200){
Object.assign(AddressData,data)
}
}
const props = defineProps({
//
medinceVisible: {
type: Boolean,
default: false,
},
modalTitle:{
type: String,
default:'就诊人详情'
},
modalForm: {
type: Object,
default:{
order_product_refund: {},
order_product_item: [],
order_product_logistics: null,
user_doctor: null,
express:[],
patientData:{},
order_prescription: null,
}
},
});
const cur_express=ref([]);
const isExpand = ref(false);
const lookAllAddress=ref(false);
const doctorVisible = ref(false);
const doctor_id = ref('');
const patientVisible = ref(false);
const okVisible = ref(false);
const cur_product_id = ref('');
const isVisible = ref(false);
const order_product_id= ref('');
const {medinceVisible,modalForm} = toRefs(props);
watch(()=>props.modalForm,(newValue,oldValue)=>{
cur_express.value = props.modalForm.express.length > 1 && props.modalForm.express.slice(0, 1);
console.log(props.modalForm);
if(props.modalForm.order_product_id){
getAddress(props.modalForm.order_product_id)
}
},{immediate:true,deep:true})
const toggleExpand = () => {
isExpand.value = !isExpand.value;
if (isExpand.value) {
cur_express.value =props.modalForm.express.slice(0, -1);
} else {
cur_express.value = props.modalForm.express.slice(0, 1);
}
};
const toggleAddress=()=>{
lookAllAddress.value=!lookAllAddress.value;
}
const openPatient = () => {
//Object.assign(patientData, modalForm.order_inquiry_case);
patientVisible.value = true;
};
const openDcotor=()=>{
doctor_id.value=props.modalForm.user_doctor.doctor_id;
doctorVisible.value=true
}
//
const closeChange = (data) => {
cur_product_id.value = '';
okVisible.value = false;
};
//
const closeChangeOk = (data) => {
order_product_id.value = '';
isVisible.value = false;
};
const handleClose=()=>{
emits('medinceVisibleChange', (medinceVisible.value = false));
}
const formatProductStatus = (val) => {
//<!-- 1: 2: 3: 4: 5: -->
let data = {
1: '待支付',
2: '待发货',
3: '已发货',
4: '已签收',
5: '已取消',
};
if (val) {
return data[val];
} else {
return '';
}
};
const formatRefundStatus = (val) => {
//退0:退 1:退 2:退 3:退 4:退 5:退 6:退
let data = {
0: '无退款',
1: '申请退款',
2: '退款中',
3: '退款成功',
4: '拒绝退款',
5: '退款关闭',
6: '退款异常',
};
if (val || val == 0) {
return data[val];
} else {
return '';
}
};
const formatColor = (value) => {
if (value == '签收') {
return '#00B42A';
} else {
return 'var(--color-fill-4)';
}
};
</script>
<style scoped>
.headImg {
margin-right: 20px;
border-radius: 50%;
width: 80px;
height: 80px;
}
.doctorInfo {
display: flex;
align-items: center;
}
.infobox {
display: flex;
flex-direction: column;
justify-content: space-between;
}
</style>

View File

@ -127,13 +127,16 @@ const props = defineProps({
type: Boolean,
default: false,
},
modalTitle:{
type: String,
default:'就诊人详情'
},
data: {
type: Object,
},
});
const emits = defineEmits(['patientVisibleChange']);
const { patientVisible, data } = toRefs(props);
const modalTitle = ref('就诊人详情');
const { patientVisible, data,modalTitle } = toRefs(props);
const modalSatus = ref('detail');
const loading = ref(false);
@ -256,4 +259,10 @@ const handleClose = () => {
patientVisible.value = false;
//otherList.value=[];
};
</script>
</script>
<style scoped>
.row{
display: flex;
line-height: 32px;
}
</style>

View File

@ -0,0 +1,396 @@
<template>
<!-- Modal -->
<a-modal v-model:visible="modalVisible" fullscreen title="处方详情" title-align="start" :footer="false"
@cancel="handleClose">
<div class="titlebox">
<div class="bar"></div>
<div class="name">基本信息</div>
</div>
<a-form :model="modalForm" ref="modalFormRef" :auto-label-width="true">
<a-row :gutter="24" style="margin-top: 35px;">
<a-col :span="12">
<a-form-item field="avatar" label="订单编号:">
<span>{{modalForm.order_prescription_id}}</span>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item field="idCard" label="处方状态:" >
<div class="box" >
<div class="cardNum">{{formatPrescriptionStatus(modalForm.prescription_status)}}</div>
</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" >
<a-col :span="12">
<a-form-item field="idCard" label="开方医生:" >
<div class="box" >{{ modalForm.doctor_name }} </div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item field="idCard" label="审方药师:" >
<div class="box" >{{modalForm.pharmacist_name}} </div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" >
<a-col :span="12">
<a-form-item field="idCard" label="就 诊 人:" >
<div class="box" >{{ modalForm.patient_name}}</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" >
<a-col :span="12">
<a-form-item field="idCard" label="开方时间:" >
<div class="box" > {{ modalForm.doctor_created_time }}</div>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item field="idCard" label="审方时间:" >
<div class="box" > {{ modalForm.pharmacist_verify_time }}</div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" >
<a-col :span="12">
<a-form-item field="idCard" label="诊断:" >
<div class="box" >{{ modalForm.order_prescription_icd }} </div>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" >
<a-col :span="12">
<a-form-item field="idCard" label="用法用量:" >
<span class="box" v-for="item in modalForm.order_prescription_product"> {{ item.product_name
}}{{item.frequency_use}}</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" >
<a-col :span="12">
<a-form-item field="idCard" label="医嘱:" >
<div class="box" >{{ modalForm.doctor_advice }}</div>
</a-form-item>
</a-col>
</a-row>
<a-divider />
<div class="titlebox">
<div class="bar"></div>
<div class="name">药品信息</div>
</div>
<a-row :gutter="24" style="margin-top: 35px;">
<a-col :span="24">
<a-form-item field="avatar" :hide-label="true">
<a-list>
<a-list-item
v-for="item in modalForm.order_prescription_product"
:key="item.product_item_id"
>
<a-list-item-meta
:title="item.product_name + item.product_spec"
:description="item.manufacturer + '*' + item.prescription_product_num
"
>
<template #avatar>
<a-avatar shape="square">
<img
alt="avatar"
src="https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
/>
</a-avatar>
</template>
</a-list-item-meta>
</a-list-item>
</a-list>
</a-form-item>
</a-col>
</a-row>
<a-divider />
<div class="titlebox">
<div class="bar"></div>
<div class="name">处方信息</div>
</div>
<a-row :gutter="24" style="margin-top: 35px;">
<a-col :span="24">
<a-form-item field="" :hide-label="true">
<tableUnit
:pagination="false"
:columns="chufang_columns"
:data="chufang_data"
></tableUnit>
<!-- <prescription :data="modalForm.order_prescription"></prescription> -->
</a-form-item>
</a-col>
</a-row>
<a-divider />
<div class="titlebox">
<div class="bar"></div>
<div class="name">病例信息</div>
<a-space
style="
margin-right: 8px;
flex: 1;
display: flex;
justify-content: flex-end;
"
>
<a-button type="primary" status="warning" @click="openPatient"
>查看完整病例信息</a-button
>
</a-space>
</div>
<a-row :gutter="24" style="margin-top: 35px" v-if="modalForm.order_inquiry_case">
<a-col :span="24">
<a-form-item label="就诊人姓名:">
<span>{{modalForm.order_inquiry_case.name }}&nbsp;&nbsp;{{modalForm.order_inquiry_case.sex == 1 ? '男' : '女'}}&nbsp;&nbsp;{{ modalForm.order_inquiry_case.age }}</span>
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="24" v-if="modalForm.order_inquiry_case">
<a-col :span="24">
<a-form-item field="inquiry_no" label="病情描述:">
<span>{{modalForm.order_inquiry_case.disease_desc}}</span>
</a-form-item>
</a-col>
</a-row>
<!-- <a-row :gutter="24" v-if="modalForm.order_inquiry_case">
<a-col :span="24">
<a-form-item field="inquiry_no" label="确诊疾病:">
<span>{{modalForm.order_inquiry_case.disease_class_name}}&nbsp;&nbsp;{{modalForm.user_doctor.department_custom_name}}</span>
</a-form-item>
</a-col>
</a-row> -->
<a-divider />
</a-form>
<div class="titlebox" >
<div class="bar"></div>
<div class="name">操作</div>
</div>
<a-row :gutter="24" style="margin-top: 35px;" >
<a-col :span="24">
<a-form-item field="" label="" no-style>
<!-- -->
<a-space style="margin-right: 8px;" v-if="modalForm.prescription_status==4">
<a-button type="primary" @click="lookMedince" v-has="'admin:sysPrescriptionList:vieworder'">查看订单</a-button>
</a-space>
<a-space >
<a-button type="primary" status="danger" @click="downloadFile(downloadUrl)" v-has="'admin:sysPrescriptionList:download'" >下载</a-button>
</a-space>
</a-form-item>
</a-col>
</a-row>
</a-modal>
<!-- 患者详情弹窗 -->
<patientModal
:patientVisible="patientVisible"
:data="patientData"
:modalTitle="'病例详情'"
@patientVisibleChange="
() => {
patientVisible = false;
}
"
></patientModal>
<medinceModal :medinceVisible="medinceVisible" :modalForm="medinceData" @medinceVisibleChange="()=>{medinceVisible=false}"></medinceModal>
</template>
<script setup>
import {ref,toRefs,reactive,watchEffect,watch} from 'vue';
import {getCase} from '@/api/prescription/list';
import { getProductDetail,inquiryCase} from '@/api/order/list';
// import {
// productList,
// getProductDetail,
// cancelProduct,
// reportPrePscription,
// lookAddress,
// inquiryCase
// } from '@/api/order/list';
import {formatPrescriptionStatus, formatPharmacistStatus} from "@/utils/format"
const IMG_URL = import.meta.env.VITE_IMG_URL;
const props = defineProps({
//
modalVisible: {
type: Boolean,
default: false,
},
modalForm: {
type: Object,
default:{
order_inquiry_case:{
order_prescription_id:''
},
user_doctor:{}
}
},
});
let express = []; //
const cur_express = ref([]);
const patientVisible=ref(false);
const patientData=reactive({});
const medinceVisible=ref(false);
let chufang_data = ref([]);
const chufang_columns = reactive([
{
title: '处方编号',
dataIndex: 'prescription_code',
},
{
title: '处方状态',
dataIndex: 'prescription_status',
},
{
title: '药师审核状态',
dataIndex: 'pharmacist_audit_status',
},
{
title: '医嘱',
dataIndex: 'doctor_advice',
},
{
title: '药师驳回原因',
dataIndex: 'pharmacist_fail_reason',
},
{
title: '处方链接',
dataIndex: 'url',
slotName: 'url',
},
]);
const downloadUrl=ref('')
const emits = defineEmits(['familyVisibleChange']);
const {modalVisible,modalForm} = toRefs(props);
watch(modalForm.value,()=>{
let data_arr = [{}];
chufang_columns.forEach((item) => {
if (item.dataIndex == 'prescription_status') {
data_arr[0][item.dataIndex] = formatPrescriptionStatus(
modalForm.value[item.dataIndex]
);
} else if (item.dataIndex == 'pharmacist_audit_status') {
data_arr[0][item.dataIndex] = formatPharmacistStatus(
modalForm.value[item.dataIndex]
);
} else if (item.dataIndex == 'url') {
data_arr[0][item.dataIndex] =
IMG_URL +
'/applet/prescription/' +
modalForm.value.order_prescription_id +
'.pdf';
downloadUrl.value=data_arr[0][item.dataIndex];
} else if (item.dataIndex == 'pharmacist_fail_reason') {
data_arr[0][item.dataIndex] = modalForm.value[item.dataIndex]
? modalForm.value[item.dataIndex]
: '暂无';
} else {
data_arr[0][item.dataIndex] =modalForm.value[item.dataIndex];
}
});
chufang_data.value= data_arr;
},{immediate:true,deep:true})
const handleGetCase=()=>{
getCase(modalForm.value.order_inquiry_case.inquiry_case_id
).then(data=>{
if(data.code==200){
Object.assign(patientData,data.data)
}
})
}
const medinceData=reactive({
order_product_refund: {},
order_product_item: [],
order_product_logistics: null,
user_doctor: null,
express:[],
order_prescription: null,
order_product_id:'',
patientData:{}
})
const lookMedince=()=>{
medinceVisible.value=true;
getDetail(modalForm.value.order_product_id);
};
//
const getDetail = async (order_product_id) => {
chufang_data.vlaue=[];
Object.assign(patientData,{});
const { code, data, message } = await getProductDetail(order_product_id);
if (code == 200) {
Object.assign(medinceData, data);
let result = data.order_prescription;
express = data.order_product_logistics
? JSON.parse(data.order_product_logistics.logistics_content)
: [];
//cur_express.value = express.length > 1 && express.slice(0, 1);
if(data.order_inquiry_case && data.order_inquiry_case.inquiry_case_id){
const caseInfo= await inquiryCase(data.order_inquiry_case.inquiry_case_id);
Object.assign(patientData,caseInfo.data);
}
}
medinceData.chufang_columns=chufang_columns;
medinceData.chufang_data=chufang_data.value;
medinceData.express= express;//cur_express.value;
medinceData.order_product_id=order_product_id;
medinceData.patientData=patientData;
};
// Akiraka 20230210
const handleClose = () => {
emits('familyVisibleChange', false);
};
const openPatient=() =>{
handleGetCase();
patientVisible.value=true;
}
const downloadFile=(fileUrl)=>{
const request = new XMLHttpRequest()
request.open('GET', fileUrl)
request.responseType = 'blob'
request.onload = (res) => {
if (res.target.status == 200) {
const url = window.URL.createObjectURL(res.currentTarget.response)
const link = document.createElement('a')
link.href = url
link.setAttribute('download', '处方'+new Date().getTime())
link.click()
}
}
request.send()
}
</script>
<style scoped>
.cardNum {
width: 150px;
}
.arco-form-item-layout-horizontal:first-child,
.arco-form-item-layout-horizontal:nth-child(2) {
align-items: center;
}
.cellbox{
margin-top: 35px;
}
.cellbox .cell{
width:50%;
border-bottom:1px dashed #efefef;
margin-bottom: 20px;
}
.cellbox .cell:first-child{
border: none;
}
.box {
display: flex;
align-items: center;
}
.cert .arco-form-item-label-col {
flex: 0 0 8px !important;
}
</style>

View File

@ -69,4 +69,23 @@ export const formatRelation=(val)=>{
}else{
return ''
}
}
export const formatInquiryType=(val)=>{
//类型1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药 5:检测)
let data={1:'专家问诊', 2:'快速问诊', 3:'公益问诊', 4:'问诊购药',5:'糖组检测'}
if(val){
return data[val]
}else{
return ''
}
}
export const formatInquiryStatus=(val)=>{
// 1:待支付 2:待分配 3:待接诊 4:已接诊 5:已完成 6:已结束 7:已取消
let data={1:'待支付', 2:'待分配', 3:'待接诊', 4:'已接诊',5:'已完成',6:'已结束',7:'已取消'}
if(val){
return data[val]
}else{
return ''
}
}

View File

@ -286,6 +286,9 @@ const handleSubmit = (done) => {
};
if (!modalForm.menu_id) {
console.log("dasdasd",modalForm)
if(modalForm.menu_type==''){
modalForm.menu_type=0;
};
const {code,message} = await addMenu(modalForm);
if (code==200) {
proxy.$message.success('新增成功');

View File

@ -701,6 +701,7 @@
const { data, code, message } = res;
if (code == 200) {
departmentData.value = data;
}
});
}

View File

@ -945,7 +945,7 @@
{ title: '多点审核状态', dataIndex: 'multi_point_status', slotName: 'multi_point_status', width: 140 },
{ title: '是否推荐', dataIndex: 'is_recommend', slotName: 'is_recommend' },
{ title: '深度合作', dataIndex: 'is_platform_deep_cooperation', slotName: 'is_platform_deep_cooperation' },
{ title: '申请人', dataIndex: 'user_name' },
{ title: '申请人', dataIndex: 'created_by' },
{ title: '审核状态', dataIndex: 'iden_auth_status', slotName: 'iden_auth_status' },
{ title: '实名认证', dataIndex: 'idcard_status', slotName: 'iden_auth_status' },

View File

@ -0,0 +1,350 @@
<template>
<div class="app-container">
<a-form :model="queryForm" ref="queryFormRef" layout="inline">
<a-form-item field="user_name" label="账号名字">
<a-input :style="{ width: '182px' }" v-model="queryForm.user_name" placeholder="请输入账号或者姓名" @press-enter="handleQuery" />
</a-form-item>
<a-form-item field="mobile" label="电话号码">
<a-input :style="{ width: '182px' }" v-model="queryForm.mobile" placeholder="请输入电话号码" @press-enter="handleQuery" />
</a-form-item>
<!-- <a-form-item field="status" label="启用状态">
<a-select v-model="queryForm.status" placeholder="请选择启用状态" :style="{ width: '182px' }">
<a-option :value="0">禁用</a-option>
<a-option :value="1">正常</a-option>
<a-option :value="2">删除</a-option>
</a-select>
</a-form-item> -->
<a-form-item field="create_range_time" label="创建时间范围">
<a-range-picker
style="width: 260px"
v-model="queryForm.create_range_time"
/>
</a-form-item>
<a-form-item>
<a-space>
<a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
<a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
</a-space>
</a-form-item>
</a-form>
<a-divider />
<!-- action -->
<!-- <div class="action">
<a-space>
<a-button v-has="'admin:sysFamilyList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
<a-button v-has="'admin:sysFamilyList:remove'" type="primary" status="danger"><icon-delete /> 批量删除 </a-button>
</a-space>
</div> -->
<!-- table -->
<a-table :columns="columns" :data="tableData"
:row-selection="{ type: 'checkbox', showCheckedAll: true }"
:pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
row-key="doctor_id" @selection-change="(selection) => {deleteData = selection;console.log(selection)}"
@page-change="handlePageChange" @page-size-change="handlepage_sizeChange">
<template #doctor_id="{record,rowIndex}">
<span>{{pager.page}}</span>
<div>{{(rowIndex+1)+(pager.page-1)*10}}</div>
</template>
<template #status="{ record }">
<!-- 状态0:禁用 1:正常 2:删除 -->
<a-tag v-if="record.status == 0" color="#ffb400">禁用</a-tag>
<a-tag v-else-if="record.status == 1" color="green">正常</a-tag>
<a-tag v-else color="red">删除</a-tag>
</template>
<template #is_platform_deep_cooperation="{ record }">
<a-tag v-if="record.is_platform_deep_cooperation == 0" color="gray"></a-tag>
<a-tag v-else color="green"></a-tag>
</template>
<template #disable_reason="{record}">
<div class="reason" v-if="record.disable_reason" :title="record.disable_reason">{{ record.disable_reason }}</div>
<div v-else>-</div>
</template>
<template #relation="{record}">
<div>{{formatRelation(record.relation)}}</div>
</template>
<template #action="{ record }">
<a-space>
<a-button v-has="'admin:sysFamilyList:detail'" type="text"
@click="handleDetail(record)"><icon-book />详情</a-button>
<!-- <a-button v-has="'admin:sysFamilyList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
修改</a-button> -->
<!-- <a-button v-has="'admin:sysFamilyList:remove'" type="text"
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
</a-space>
</template>
</a-table>
<familyModal :modalVisible="modalVisible" :modalForm="modalForm" @familyVisibleChange="()=>{modalVisible=false}"></familyModal>
<!-- Akiraka 20230223 删除与批量删除 开始 -->
<!-- <DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removeFamily"
@deleteVisibleChange="() => deleteVisible = false" /> -->
<!-- Akiraka 20230223 删除与批量删除 结束 -->
<a-modal v-model:visible="okVisible" :modal-style="{width:'320px'}" body-class="okmodal"
@cancel="()=>okVisible=false">
<template #title>
提示
</template>
<div>确定保存当前信息</div>
</a-modal>
</div>
</template>
<script setup>
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
import { getInquiryList,getInquiryDetail} from '@/api/inquiry/list';
import {formatRelation} from "@/utils/format"
// Akiraka 20230210
const deleteData = ref([])
// Akiraka 20230210
const deleteVisible = ref(false)
// Akiraka 20230210
const okVisible = ref(false);
watch(() => deleteVisible.value, (value) => {
if (value == false) {
getInquiryInfo(pager);
}
});
const file = ref();
const { proxy } = getCurrentInstance();
const currentPage = ref(1);
const family_data=ref([]);
const family_columns=ref([{
title: '编号',
dataIndex: 'code',
slotName:'code'
},{
title: '就诊人姓名',
dataIndex: 'card_name_mask',
},{
title: '身份证号',
dataIndex: 'id_number_mask',
},{
title: '与账号关系',
dataIndex: 'relation',
slotName:'relation'
},{
title: '添加时间',
dataIndex: 'created_at',
slotName:'created_at'
}, { title: '操作', slotName: 'action'}])
// Pager
const pager = {
total: 0,
page: 1,
page_size: 10,
};
// form
const queryForm = reactive({
});
const modalForm = reactive({
user:{},
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png',
});
watch(() => queryForm.create_range_time,
(value) => {
if (value) {
let [startTime, endTime] = value;
queryForm.created_at = startTime + '&' + endTime;
} else {
queryForm.created_at = '';
}
}
);
// Modal
const modalVisible = ref(false);
const modalTitle = ref('默认标题');
// Batch Del List
let batchList = [];
// Table Columns
const columns = [
{ title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' },
{ title: '订单编号', dataIndex: 'inquiry_no',slotName: 'inquiry_type',width:200 },
{ title: '服务分类', dataIndex: '服务分类',slotName: 'inquiry_type', width:200 },
{ title: '坐班时间', dataIndex:'reception_time',slotName: 'reception_time',width:200 },
{ title: '价格范围', dataIndex: 'relation', slotName: 'relation',width: 150 },
{ title: '问诊价格', dataIndex: 'status', slotName: 'status' },
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
];
// Table Data
const tableData = ref([]);
//
const modalSatus = ref('add');
// Satus
const handleAdd = () => {
modalVisible.value = true;
modalTitle.value = '新增患者';
modalSatus.value = 'add';
modalForm.patient_id = null;
};
//
const handleDetail = async (record) => {
const { code, data, message } = await getInquiryDetail(record.family_id);
if (code == 200) {
Object.assign(modalForm, data);
modalVisible.value = true;
}
};
//
const handleBatchDelete = () => {
if (batchList.length !== 0) {
proxy.$modal.warning({
title: '提示',
content: '是否批量删除以下选中的数据?',
hideCancel: false,
onOk: async () => {
const res = await removeFamily({ ids: batchList });
proxy.$message.success(res.message);
getInquiryInfo(pager);
},
onCancel: () => {
proxy.$message.info('已取消批量删除数据');
},
});
} else {
proxy.$message.error('请勾选需要删除的数据!');
}
};
/**
* 分页改变
* @param {Number} [page]
*/
const handlePageChange = (page) => {
pager.page = page;
//
currentPage.value = page;
getInquiryInfo({ ...pager, ...queryForm });
};
//
const handlepage_sizeChange = (page_size) => {
pager.page_size = page_size;
getInquiryInfo({ ...pager, ...queryForm });
};
//
const getInquiryInfo = async (params = {}) => {
console.log(params)
const { data, code, message } = await getInquiryList(params);
if (code == 200) {
tableData.value = data.data;
Object.assign(pager, { total: data.total, page: data.page, page_size: data.page_size });
}
};
//
const handleQuery = async () => {
pager.page = 1;
const params = {
page: pager.page,
page_size: pager.page_size,
...queryForm,
};
getInquiryInfo(params);
};
//
const handleResetQuery = () => {
proxy.$refs.queryFormRef.resetFields();
getInquiryInfo(queryForm);
}
onMounted(() => {
getInquiryInfo(pager);
});
</script>
<style lang="scss" scoped>
.action {
margin-bottom: 12px;
}
.okmodal div {
text-align: center;
}
.hospital_name {
width: 140px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.headImg {
margin-right: 20px;
border-radius: 50%;
width: 80px;
height: 80px;
}
.arco-form-item-layout-horizontal:first-child,
.arco-form-item-layout-horizontal:nth-child(2) {
align-items: center;
}
.cellbox{
margin-top: 35px;
}
.cellbox .cell{
width:50%;
border-bottom:1px dashed #efefef;
margin-bottom: 20px;
}
.cellbox .cell:first-child{
border: none;
}
.cell{
.arco-form-item{
margin-bottom: 10px;
}
}
.box {
display: flex;
align-items: center;
}
.cert .arco-form-item-label-col {
flex: 0 0 8px !important;
}
.red {
display: inline-block;
margin-right: 5px;
font-size: 14px;
color: red;
margin-top: 5px;
}
.cardNum {
width: 148px;
}
.codbox{
display: flex;
align-items: center;
}
.reason{
width:250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

View File

@ -0,0 +1,392 @@
<template>
<div class="app-container">
<a-form :model="queryForm" ref="queryFormRef" layout="inline">
<a-form-item field="inquiry_no" label="订单编号">
<a-input :style="{ width: '182px' }" v-model="queryForm.inquiry_no" placeholder="请输入问诊订单号" @press-enter="handleQuery" />
</a-form-item>
<a-form-item field="doctor_name" label="医生姓名">
<a-input :style="{ width: '182px' }" v-model="queryForm.doctor_name" placeholder="请输入问诊订单号" @press-enter="handleQuery" />
</a-form-item>
<a-form-item field="patient_name" label="就诊人姓名">
<a-input :style="{ width: '182px' }" v-model="queryForm.patient_name" placeholder="请输入就诊人姓名" @press-enter="handleQuery" />
</a-form-item>
<a-form-item field="mobile" label="电话号码">
<a-input :style="{ width: '182px' }" v-model="queryForm.mobile" placeholder="请输入医生或者患者电话号码" @press-enter="handleQuery" />
</a-form-item>
<a-row>
<a-form-item field="pay_range_time" label="支付时间范围">
<a-range-picker style="width: 330px;" v-model="queryForm.pay_range_time" />
</a-form-item>
<a-form-item field="complete_range_time" label="完成时间范围">
<a-range-picker style="width: 330px;" v-model="queryForm.complete_range_time" />
</a-form-item>
<a-form-item field="end_range_time" label="结束时间范围">
<a-range-picker style="width: 330px;" v-model="queryForm.end_range_time" />
</a-form-item>
<a-form-item field="cancel_range_time" label="取消时间范围">
<a-range-picker
style="width: 330px"
v-model="queryForm.cancel_range_time"
/>
</a-form-item>
<a-form-item field="reception_range_time" label="接诊时间范围">
<a-range-picker
style="width: 330px"
v-model="queryForm.reception_range_time"
/>
</a-form-item>
<a-form-item field="create_range_time" label="创建时间范围">
<a-range-picker
style="width: 330px"
v-model="queryForm.create_range_time"
/>
</a-form-item>
<a-form-item>
<a-space>
<a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
<a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
</a-space>
</a-form-item>
</a-row>
</a-form>
<a-divider />
<!-- action -->
<!-- <div class="action">
<a-space>
<a-button v-has="'admin:sysFamilyList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
<a-button v-has="'admin:sysFamilyList:remove'" type="primary" status="danger"><icon-delete /> 批量删除 </a-button>
</a-space>
</div> -->
<!-- table -->
<a-table :columns="columns" :data="tableData"
:scroll="{ x: 1400 }"
:row-selection="{ type: 'checkbox', showCheckedAll: true }"
:pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
row-key="doctor_id" @selection-change="(selection) => {deleteData = selection;console.log(selection)}"
@page-change="handlePageChange" @page-size-change="handlepage_sizeChange">
<template #doctor_id="{record,rowIndex}">
<div>{{(rowIndex+1)+(pager.page-1)*10}}</div>
</template>
<template #inquiry_type="{record}">
<div>{{formatInquiryType(record.inquiry_type)}}</div>
</template>
<template #inquiry_status="{record}">
<div>{{formatInquiryStatus(record.inquiry_status)}}</div>
</template>
<template #reception_time="{record}">
<div>{{parseTime(record.reception_time)}}</div>
</template>
<template #action="{ record }">
<a-space>
<a-button v-has="'admin:sysFamilyList:detail'" type="text"
@click="handleDetail(record)"><icon-book />详情</a-button>
<!-- <a-button v-has="'admin:sysFamilyList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
修改</a-button> -->
<!-- <a-button v-has="'admin:sysFamilyList:remove'" type="text"
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
</a-space>
</template>
</a-table>
<inquiryDetailModal :modalVisible="modalVisible" :modalForm="modalForm" @inquiryVisibleChange="()=>{modalVisible=false}"></inquiryDetailModal>
</div>
</template>
<script setup>
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
import { getInquiryList,getInquiryDetail} from '@/api/inquiry/list';
import {formatInquiryType,formatInquiryStatus} from "@/utils/format"
import { parseTime } from '@/utils/parseTime';
// Akiraka 20230210
const deleteData = ref([])
// Akiraka 20230210
const deleteVisible = ref(false)
// Akiraka 20230210
const okVisible = ref(false);
watch(() => deleteVisible.value, (value) => {
if (value == false) {
getInquiryInfo(pager);
}
});
const file = ref();
const { proxy } = getCurrentInstance();
const currentPage = ref(1);
const family_data=ref([]);
const family_columns=ref([{
title: '编号',
dataIndex: 'code',
slotName:'code'
},{
title: '就诊人姓名',
dataIndex: 'card_name_mask',
},{
title: '身份证号',
dataIndex: 'id_number_mask',
},{
title: '与账号关系',
dataIndex: 'relation',
slotName:'relation'
},{
title: '添加时间',
dataIndex: 'created_at',
slotName:'created_at'
}, { title: '操作', slotName: 'action'}])
// Pager
const pager = {
total: 0,
page: 1,
page_size: 10,
};
// form
const queryForm = reactive({
});
const modalForm = reactive({
user:{},
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png',
});
watch(()=>queryForm.end_range_time,(value)=>{
if(value){
let[startTime,endTime]=value
queryForm.finish_time=startTime+"&"+endTime;
}else{
queryForm.finish_time=''
};
console.log(queryForm.finish_time)
})
watch(()=>queryForm.pay_range_time,(value)=>{
if(value){
let[startTime,endTime]=value
queryForm.pay_time=startTime+"&"+endTime;
}else{
queryForm.pay_time=''
};
})
watch(()=>queryForm.complete_range_time,(value)=>{
if(value){
let[startTime,endTime]=value
queryForm.complete_time=startTime+"&"+endTime;
}else{
queryForm.complete_time=''
};
})
watch(()=>queryForm.cancel_range_time,(value)=>{
if(value){
let[startTime,endTime]=value
queryForm.cancel_time=startTime+"&"+endTime;
}else{
queryForm.cancel_time=''
};
})
watch(()=>queryForm.reception_range_time,(value)=>{
if(value){
let[startTime,endTime]=value
queryForm.reception_time=startTime+"&"+endTime;
}else{
queryForm.reception_time=''
};
})
watch(()=>queryForm.create_range_time,(value)=>{
if(value){
let[startTime,endTime]=value
queryForm.created_at=startTime+"&"+endTime;
}else{
queryForm.created_at=''
};
})
// Modal
const modalVisible = ref(false);
const modalTitle = ref('默认标题');
// Batch Del List
let batchList = [];
// Table Columns
const columns = [
{ title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' },
{ title: '订单编号', dataIndex: 'inquiry_no',width:200 },
{ title: '医生姓名', dataIndex: 'doctor_name',slotName: 'doctor_name', width:200 },
{ title: '就诊人', dataIndex:'patient_name_mask',slotName: 'patient_name_mask',width:100 },
{ title: '所属患者', dataIndex: 'user_name', slotName: 'user_name',width: 150 },
{ title: '问诊类型', dataIndex: 'inquiry_type', slotName: 'inquiry_type' },
{ title: '订单状态', dataIndex: 'inquiry_status', slotName: 'inquiry_status' },
{ title: '接诊时间', dataIndex: 'reception_time', slotName: 'reception_time',width:200 },
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
];
// Table Data
const tableData = ref([]);
//
const modalSatus = ref('add');
// Satus
const handleAdd = () => {
modalVisible.value = true;
modalTitle.value = '新增患者';
modalSatus.value = 'add';
modalForm.patient_id = null;
};
//
const handleDetail = async (record) => {
const { code, data, message } = await getInquiryDetail(record.order_inquiry_id);
if (code == 200) {
Object.assign(modalForm, data);
modalVisible.value = true;
}
};
//
const handleBatchDelete = () => {
if (batchList.length !== 0) {
proxy.$modal.warning({
title: '提示',
content: '是否批量删除以下选中的数据?',
hideCancel: false,
onOk: async () => {
const res = await removeFamily({ ids: batchList });
proxy.$message.success(res.message);
getInquiryInfo(pager);
},
onCancel: () => {
proxy.$message.info('已取消批量删除数据');
},
});
} else {
proxy.$message.error('请勾选需要删除的数据!');
}
};
/**
* 分页改变
* @param {Number} [page]
*/
const handlePageChange = (page) => {
pager.page = page;
//
currentPage.value = page;
getInquiryInfo({ ...pager, ...queryForm });
};
//
const handlepage_sizeChange = (page_size) => {
pager.page_size = page_size;
getInquiryInfo({ ...pager, ...queryForm });
};
//
const getInquiryInfo = async (params = {}) => {
console.log(params)
const { data, code, message } = await getInquiryList(params);
if (code == 200) {
tableData.value = data.data;
Object.assign(pager, { total: data.total, page: data.page, page_size: data.page_size });
}
};
//
const handleQuery = async () => {
pager.page = 1;
const params = {
page: pager.page,
page_size: pager.page_size,
...queryForm,
};
getInquiryInfo(params);
};
//
const handleResetQuery = () => {
proxy.$refs.queryFormRef.resetFields();
getInquiryInfo(queryForm);
}
onMounted(() => {
getInquiryInfo(pager);
});
</script>
<style lang="scss" scoped>
.action {
margin-bottom: 12px;
}
.okmodal div {
text-align: center;
}
.hospital_name {
width: 140px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.headImg {
margin-right: 20px;
border-radius: 50%;
width: 80px;
height: 80px;
}
.arco-form-item-layout-horizontal:first-child,
.arco-form-item-layout-horizontal:nth-child(2) {
align-items: center;
}
.cellbox{
margin-top: 35px;
}
.cellbox .cell{
width:50%;
border-bottom:1px dashed #efefef;
margin-bottom: 20px;
}
.cellbox .cell:first-child{
border: none;
}
.cell{
.arco-form-item{
margin-bottom: 10px;
}
}
.box {
display: flex;
align-items: center;
}
.cert .arco-form-item-label-col {
flex: 0 0 8px !important;
}
.red {
display: inline-block;
margin-right: 5px;
font-size: 14px;
color: red;
margin-top: 5px;
}
.cardNum {
width: 148px;
}
.codbox{
display: flex;
align-items: center;
}
.reason{
width:250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>

View File

@ -127,25 +127,26 @@
</a-space>
</template>
</a-table>
<familyModal :modalVisible="modalVisible" :modalForm="modalForm" @familyVisibleChange="()=>{modalVisible=false}"></familyModal>
<prescriptionModal :modalVisible="modalVisible" :modalForm="modalForm" @familyVisibleChange="()=>{modalVisible=false}"></prescriptionModal >
<!-- <familyModal :modalVisible="modalVisible" :modalForm="modalForm" @familyVisibleChange="()=>{modalVisible=false}"></familyModal> -->
<!-- Akiraka 20230223 删除与批量删除 开始 -->
<!-- <DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removePrescription"
@deleteVisibleChange="() => deleteVisible = false" /> -->
<!-- Akiraka 20230223 删除与批量删除 结束 -->
<a-modal v-model:visible="okVisible" :modal-style="{width:'320px'}" body-class="okmodal"
<!-- <a-modal v-model:visible="okVisible" :modal-style="{width:'320px'}" body-class="okmodal"
@cancel="()=>okVisible=false">
<template #title>
提示
</template>
<div>确定保存当前信息</div>
</a-modal>
</a-modal> -->
</div>
</template>
<script setup>
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
import { getPrescriptionList,getPrescriptionDetail} from '@/api/prescription/list';
import {formatPrescriptionStatus} from "@/utils/format"
// Akiraka 20230210
@ -267,7 +268,7 @@ watch(() => queryForm.expired_range_time,
const handleDetail = async (record) => {
const { code, data, message } = await getPrescriptionDetail(record.family_id);
const { code, data, message } = await getPrescriptionDetail(record.order_prescription_id);
if (code == 200) {
Object.assign(modalForm, data);