添加服务类型

This commit is contained in:
zoujiandong 2023-09-19 09:53:37 +08:00
parent a3117d8b3f
commit e1d26f6b15
4 changed files with 59 additions and 159 deletions

View File

@ -11,13 +11,6 @@ export function getPatientList(params){
})
}
export function addPatient(data) {
return request({
url,
method: 'post',
data
})
}
export function removePatient(data) {
return request({
@ -36,7 +29,7 @@ export function updatePatient(data, id) {
}
export function getPatientDetail(id){
return request({
url:'/admin/doctor/'+id,
url:'/admin/patient/'+id,
method: 'get'
})
}

View File

@ -19,10 +19,14 @@ service.interceptors.request.use(
// Store 必须在拦截器内部导入,在外部导入会显示 Pinia 未初始化
const store = useUserStore();
// 设置请求头部 Authorization
if(config.method=="put"){
config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
}
if (store.token) {
config.headers['Authorization'] = 'Bearer ' + store.token;
//config.headers['Content-Type'] = 'multipart/form-data'
}
return config;
},
(error) => {

View File

@ -123,6 +123,9 @@
<div class="ta-patient" :title="record.patient_name">{{record.patient_name}}({{record.patient_sex==1?'男,':'女,'}}{{record.patient_age}})</div>
</template>
<template #inquiry_type="{ record }">
{{ formatInquiryType(record.inquiry_type) }}
</template>
<template #pay_time="{ record }">
{{ parseTime(record.pay_time) }}
</template>
@ -516,6 +519,7 @@ const columns = [
{ title: '联系电话', dataIndex: 'patient_mobile',width: 130 },
{ title: '订单金额', dataIndex: 'amount_total',slotName:'amount_total',width:100 },
{ title: '实付金额', dataIndex: 'payment_amount_total',slotName:'payment_amount_total',width:100 },
{ title: '服务类型', dataIndex: 'inquiry_type',slotName:'inquiry_type',width:100 },
{ title: '支付方式', dataIndex: 'inquiry_pay_channel',slotName: 'inquiry_pay_channel'},
{ title: '订单状态', dataIndex: 'inquiry_status', slotName:'inquiry_status' },
{ title: '支付时间', dataIndex: 'pay_time', slotName: 'pay_time',width:200 },

View File

@ -2,79 +2,12 @@
<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 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="hospital_name" label="所属医院">
<a-input :style="{ width: '182px' }" v-model="queryForm.hospital_name" placeholder="请输入所属医院" @press-enter="handleQuery" />
</a-form-item>
<!-- <a-form-item field="department_custom_name" label="科室名称">
<a-input v-model="queryForm.department_custom_name" placeholder="请输入科室名称" @press-enter="handleQuery" />
</a-form-item> -->
<a-form-item field="doctor_title" label="医生职称">
<a-select v-model="queryForm.doctor_title" placeholder="请选择医生职称" :style="{ width: '182px' }">
<!-- 医生职称1:主任医师 2:主任中医师 3:副主任医师 4:副主任中医师 5:主治医师 6:住院医师 -->
<a-option :value="1">主任医师</a-option>
<a-option :value="2">主任中医师</a-option>
<a-option :value="3">副主任医师</a-option>
<a-option :value="4">副主任中医师</a-option>
<a-option :value="5">主治医师</a-option>
<a-option :value="6">住院医师</a-option>
</a-select>
</a-form-item>
<a-form-item field="inquiry_service" label="服务类型">
<a-select v-model="queryForm.inquiry_service" placeholder="请选择服务类型" :style="{ width: '182px' }">
<!-- 1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药 -->
<a-option :value="1">专家问诊</a-option>
<a-option :value="2">快速问诊</a-option>
<a-option :value="3">公益问诊</a-option>
<a-option :value="4">问诊购药</a-option>
</a-select>
</a-form-item>
<a-form-item field="multi_point_status" label="多点认证">
<a-select v-model="queryForm.multi_point_status" placeholder="请选择多点认证状态" :style="{ width: '182px' }">
<!-- 医生多点执业认证状态0:未认证 1:认证通过 2:审核中 3:认证失败 -->
<a-option :value="0">未认证</a-option>
<a-option :value="1">认证通过</a-option>
<a-option :value="2">审核中</a-option>
<a-option :value="3">认证失败</a-option>
</a-select>
</a-form-item>
<a-form-item field="iden_auth_status" label="审核状态">
<a-select v-model="queryForm.iden_auth_status" placeholder="请选择审核状态" :style="{ width: '182px' }">
<!-- 医生多点执业认证状态0:未认证 1:认证通过 2:审核中 3:认证失败 -->
<a-option :value="0">未认证</a-option>
<a-option :value="1">认证通过</a-option>
<a-option :value="2">审核中</a-option>
<a-option :value="3">认证失败</a-option>
</a-select>
</a-form-item>
<a-form-item field="idcard_status" label="实名认证">
<a-select v-model="queryForm.idcard_status" placeholder="请选择实名认证状态" :style="{ width: '182px' }">
<!-- 实名认证状态0:未认证 1:认证通过 2:认证失败 -->
<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="is_recommend" label="首页推荐">
<a-select v-model="queryForm.is_recommend" placeholder="请选择是否首页推荐" :style="{ width: '182px' }">
<!-- 实名认证状态0:未认证 1:认证通过 2:认证失败 -->
<a-option :value="0"></a-option>
<a-option :value="1"></a-option>
</a-select>
</a-form-item>
<a-form-item field="is_platform_deep_cooperation" label="深度合作">
<a-select v-model="queryForm.is_platform_deep_cooperation" placeholder="请选择是否是平台深度合作" :style="{ width: '182px' }">
<!-- 实名认证状态0:未认证 1:认证通过 2:认证失败 -->
<a-option :value="0"></a-option>
<a-option :value="1"></a-option>
</a-select>
</a-form-item>
<a-form-item>
<a-space>
<a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
@ -88,13 +21,13 @@
<!-- action -->
<div class="action">
<a-space>
<a-button v-has="'admin:sysDoctorList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
<!-- <a-button v-has="'admin:sysDoctorList:remove'" type="primary" status="danger"><icon-delete /> 批量删除 </a-button> -->
<a-button v-has="'admin:sysPatientList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
<!-- <a-button v-has="'admin:sysPatientList:remove'" type="primary" status="danger"><icon-delete /> 批量删除 </a-button> -->
</a-space>
</div>
<!-- table -->
<a-table :columns="columns" :data="tableData" :scroll="{ x: 1700 }"
<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)}"
@ -102,64 +35,32 @@
<template #doctor_id="{record,rowIndex}">
<div>{{(rowIndex+1)+(pager.page-1)*10}}</div>
</template>
<template #doctor_title="{ record }">
<!-- 医生职称1:主任医师 2:主任中医师 3:副主任医师 4:副主任中医师 5:主治医师 6:住院医师 -->
<div v-if="record.doctor_title==1">主任医师</div>
<div v-else-if="record.doctor_title==2">主任中医师</div>
<div v-else-if="record.doctor_title==3">副主任医师</div>
<div v-else-if="record.doctor_title==4">副主任中医师</div>
<div v-else-if="record.doctor_title==5">主治医师</div>
<div v-else-if="record.doctor_title==6">住院医师</div>
</template>
<template #hospital_name="{record}">
<div class="hospital_name" :title="record.hospital_name">{{record.hospital_name}}</div>
</template>
<template #inquiry_service="{ record }">
<span>{{filterService(record)}}</span>
</template>
<template #iden_auth_status="{ record }">
<!-- 身份认证状态0:未认证 1:认证通过 2:审核中 3:认证失败 -->
<a-tag v-if="record.iden_auth_status == 0" color="gray">未认证</a-tag>
<a-tag v-else-if="record.iden_auth_status == 1" color="green">认证通过</a-tag>
<a-tag v-else-if="record.iden_auth_status == 2" color="#ffb400">审核中</a-tag>
<a-tag v-else color="red">认证失败</a-tag>
</template>
<template #multi_point_status="{ record }">
<!-- 身份认证状态0:未认证 1:认证通过 2:审核中 3:认证失败 -->
<a-tag v-if="record.multi_point_status == 0" color="gray">未认证</a-tag>
<a-tag v-else-if="record.multi_point_status == 1" color="green">认证通过</a-tag>
<a-tag v-else-if="record.multi_point_status == 2" color="#ffb400">审核中</a-tag>
<a-tag v-else-if="record.multi_point_status == 3" color="red">认证失败</a-tag>
</template>
<template #is_recommend="{ record }">
<a-tag v-if="record.is_recommend == 0" color="gray"></a-tag>
<a-tag v-else color="green"></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 #idcard_status="{ record }">
<!-- 实名认证状态0:未认证 1:认证通过2:认证失败 -->
<a-tag v-if="record.idcard_status == 0" color="gray">未认证</a-tag>
<a-tag v-else-if="record.idcard_status == 1" color="green">认证通过</a-tag>
<a-tag v-else-if="record.idcard_status == 2" color="red">认证失败</a-tag>
</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 #patient_family_count="{record}">
<div>绑定了{{ record.patient_family_count}}</div>
</template>
<template #action="{ record }">
<a-space>
<a-button v-has="'admin:sysDoctorList:detail'" type="text"
<a-button v-has="'admin:sysPatientList:detail'" type="text"
@click="handleDetail(record)"><icon-book />详情</a-button>
<a-button v-has="'admin:sysDoctorList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
<a-button v-has="'admin:sysPatientList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
修改</a-button>
<!-- <a-button v-has="'admin:sysDoctorList:remove'" type="text"
<!-- <a-button v-has="'admin:sysPatientList:remove'" type="text"
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
</a-space>
</template>
@ -573,7 +474,7 @@
</a-modal>
<!-- Akiraka 20230223 删除与批量删除 开始 -->
<DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removeDoctor"
<DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removePatient"
@deleteVisibleChange="() => deleteVisible = false" />
<!-- Akiraka 20230223 删除与批量删除 结束 -->
<a-modal v-model:visible="okVisible" :modal-style="{width:'320px'}" body-class="okmodal" @ok="handleSubmit"
@ -588,7 +489,7 @@
<script setup>
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
import { getDoctorList, addDoctor, removeDoctor, updateDoctor, getDoctorDetail, departmentList, decryptCard, hospitalList, expertiseList, areaList, bankList, decryptBank } from '@/api/doctor/list';
import { getPatientList, removePatient, updatePatient, getPatientDetail, departmentList, decryptCard, hospitalList, expertiseList, areaList, bankList, decryptBank } from '@/api/patient/list';
import { ossSign, ossUpload } from '@/api/oss';
import dayjs from 'dayjs'
// Akiraka 20230210
@ -600,7 +501,7 @@
watch(() => deleteVisible.value, (value) => {
if (value == false) {
getDoctorInfo(pager);
getPatientInfo(pager);
}
});
@ -928,20 +829,12 @@
// Table Columns
const columns = [
{ title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' },
{ title: '医生名字', dataIndex: 'user_name' },
{ title: '手机号码', dataIndex: 'mobile', width: 125 },
{ title: '医院', dataIndex: 'hospital_name', width: '150', slotName: 'hospital_name' },
{ title: '职称', dataIndex: 'doctor_title', slotName: 'doctor_title' },
{ title: '开启服务', dataIndex: 'inquiry_service', slotName: 'inquiry_service' },
{ 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: 'iden_auth_status', slotName: 'iden_auth_status' },
{ title: '实名认证', dataIndex: 'idcard_status', slotName: 'iden_auth_status' },
{ title: '状态', dataIndex: 'status', slotName: 'status' },
// { title: '', dataIndex: 'created_at', slotName: 'created_at' },
{ title: '患者名字', dataIndex: 'user_name' },
{ title: '联系号码', dataIndex: 'mobile', width: 125 },
{ title: '就诊人', dataIndex: 'patient_family_count', slotName: 'patient_family_count' },
{ title: '注册时间', dataIndex: 'created_at', slotName: 'created_at' },
{ title: '启用状态', dataIndex: 'status', slotName: 'status' },
{ title: '禁用理由', dataIndex: 'disable_reason', slotName: 'disable_reason' },
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
];
@ -987,7 +880,7 @@
modalVisible.value = true;
modalTitle.value = '医生详情';
modalSatus.value = 'detail';
const { code, data, message } = await getDoctorDetail(record.doctor_id);
const { code, data, message } = await getPatientDetail(record.doctor_id);
if (code == 200) {
Object.assign(modalForm, data);
@ -1037,7 +930,7 @@
modalVisible.value = true;
modalTitle.value = '修改医生';
modalSatus.value = 'edit';
const { code, data, message } = await getDoctorDetail(record.doctor_id);
const { code, data, message } = await getPatientDetail(record.doctor_id);
if (code == 200) {
Object.assign(modalForm, data);
handleDecryptBank();
@ -1185,7 +1078,7 @@
}
proxy.$loading.show();
const { code, message } = await addDoctor(modalData);
const { code, message } = await addPatient(modalData);
if (code == 200) {
proxy.$notification.success('新增成功');
modalVisible.value = false;
@ -1230,7 +1123,7 @@
}
proxy.$loading.show();
const { code, message } = await updateDoctor(modalData, modalForm.doctor_id);
const { code, message } = await updatePatient(modalData, modalForm.doctor_id);
if (code == 200) {
proxy.$notification.success('更新成功');
modalVisible.value = false;
@ -1238,7 +1131,7 @@
proxy.$loading.hide();
}
//done();
getDoctorInfo(pager);
getPatientInfo(pager);
} else {
console.log(valid)
@ -1256,9 +1149,9 @@
content: '是否批量删除以下选中的数据?',
hideCancel: false,
onOk: async () => {
const res = await removeDoctor({ ids: batchList });
const res = await removePatient({ ids: batchList });
proxy.$message.success(res.message);
getDoctorInfo(pager);
getPatientInfo(pager);
},
onCancel: () => {
proxy.$message.info('已取消批量删除数据');
@ -1278,18 +1171,18 @@
//
currentPage.value = page;
getDoctorInfo({ ...pager, ...queryForm });
getPatientInfo({ ...pager, ...queryForm });
};
//
const handlepage_sizeChange = (page_size) => {
pager.page_size = page_size;
getDoctorInfo({ ...pager, ...queryForm });
getPatientInfo({ ...pager, ...queryForm });
};
//
const getDoctorInfo = async (params = {}) => {
const { data, code, message } = await getDoctorList(params);
const getPatientInfo = async (params = {}) => {
const { data, code, message } = await getPatientList(params);
if (code == 200) {
tableData.value = data.data;
Object.assign(pager, { total: data.total, page: data.page, page_size: data.page_size });
@ -1305,7 +1198,7 @@
...queryForm,
};
getDoctorInfo(params);
getPatientInfo(params);
};
const departmentData = ref([]);
@ -1420,7 +1313,7 @@
//
const handleResetQuery = () => {
proxy.$refs.queryFormRef.resetFields();
getDoctorInfo(queryForm);
getPatientInfo(queryForm);
}
//oss
const getOssSign = async (scene, File) => {
@ -1466,7 +1359,7 @@
getOssSign(1, fileList[0].file);
}
onMounted(() => {
getDoctorInfo(pager);
getPatientInfo(pager);
handleHospitalList();
getDepartmentList();
handlExpertiseList();
@ -1538,4 +1431,10 @@
display: flex;
align-items: center;
}
.reason{
width:250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>