Merge branch 'dev'
This commit is contained in:
commit
c81aaf1d52
@ -587,6 +587,30 @@
|
||||
|
||||
if (code == 200) {
|
||||
Object.assign(modalForm, data);
|
||||
if (!data.user_doctor_info) {
|
||||
data.user_doctor_info = {};
|
||||
modalForm.user_doctor_info = {};
|
||||
}
|
||||
if (!data.hospital) {
|
||||
modalForm.hospital = {};
|
||||
}
|
||||
if (!data.doctor_bank_card) {
|
||||
modalForm.doctor_bank_card = {
|
||||
province_id: '',
|
||||
city_id: '',
|
||||
county_id: '',
|
||||
bank_id: ''
|
||||
}
|
||||
};
|
||||
if(data.doctor_title==0){
|
||||
modalForm.doctor_title='';
|
||||
}
|
||||
if(data.hospital_id==0){
|
||||
modalForm.hospital_id='';
|
||||
}
|
||||
if(data.department_custom_id==0){
|
||||
modalForm.department_custom_id=''
|
||||
}
|
||||
if (data.doctor_expertise && data.doctor_expertise.length > 0) {
|
||||
let arr = [];
|
||||
data.doctor_expertise.forEach((item) => {
|
||||
|
||||
@ -57,12 +57,11 @@
|
||||
</div>
|
||||
|
||||
<!-- table -->
|
||||
<a-table :columns="columns" :data="tableData" :scroll="{ x: 1500 }"
|
||||
<a-table :columns="columns" :data="tableData" :scroll="{ x: 1500 }"
|
||||
: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">
|
||||
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>
|
||||
@ -89,12 +88,12 @@
|
||||
<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>
|
||||
<!-- 身份认证状态(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 }">
|
||||
<!-- 身份认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败) -->
|
||||
<a-tag v-if="record.is_recommend == 0" color="gray">否</a-tag>
|
||||
@ -110,7 +109,8 @@
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysDoctorList: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>
|
||||
<a-button v-has="'admin:sysDoctorList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
||||
修改</a-button>
|
||||
<!-- <a-button v-has="'admin:sysDoctorList:remove'" type="text"
|
||||
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
|
||||
</a-space>
|
||||
@ -125,13 +125,12 @@
|
||||
<div class="name">医生信息</div>
|
||||
</div>
|
||||
<a-form :model="modalForm" :disabled="modalSatus=='detail' || modalForm.iden_auth_status==2
|
||||
" :rules="rules" ref="modalFormRef"
|
||||
:auto-label-width="true">
|
||||
" :rules="rules" ref="modalFormRef" :auto-label-width="true">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="avatar" label="医生头像:">
|
||||
<a-space size="large">
|
||||
<a-image width="80" height="80" class="headImg" :src="modalForm.avatar">
|
||||
<a-image width="80" height="80" class="headImg" :src="modalForm.avatar">
|
||||
</a-image>
|
||||
</a-space>
|
||||
<a-upload action="/" :fileList="file ? [file] : []" class="upload" :auto-upload="false"
|
||||
@ -184,18 +183,19 @@
|
||||
<a-col :span="12">
|
||||
<a-form-item field="hospital_id" label="医院名称:">
|
||||
<a-space direction="vertical" size="large">
|
||||
<a-select :style="{width:'400px'}" allow-search placeholder="请选择所在医院" v-model="hospital_name" :loading="loading" @change="changeHospital" @search="handleHospitalList" >
|
||||
<a-option size="large" style="max-width:500px" v-for="item in hospitalData" :key="item.hospital_id" :value="item.hospital_id"
|
||||
:label="item.hospital_name">
|
||||
{{item.hospital_name+'('+item.province+item.city+item.county+')'}}
|
||||
</a-option>
|
||||
</a-select>
|
||||
</a-space>
|
||||
<a-select :style="{width:'400px'}" allow-search placeholder="请选择所在医院" v-model="hospital_name"
|
||||
:loading="loading" @change="changeHospital" @search="handleHospitalList">
|
||||
<a-option size="large" style="max-width:500px" v-for="item in hospitalData" :key="item.hospital_id"
|
||||
:value="item.hospital_id" :label="item.hospital_name">
|
||||
{{item.hospital_name+'('+item.province+item.city+item.county+')'}}
|
||||
</a-option>
|
||||
</a-select>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="hospital.address" label="医院地址:">
|
||||
<a-input v-model="modalForm.hospital.address" placeholder="请输入医院地址" :disabled="true"/>
|
||||
<a-input v-model="modalForm.hospital.address" placeholder="请输入医院地址" :disabled="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@ -255,15 +255,17 @@
|
||||
<a-col :span="24">
|
||||
<a-form-item field="be_good_at" label="擅长信息:">
|
||||
<a-textarea :auto-size="{minRows:2}" :max-length="{length:1000,errorOnly:true}" allow-clear
|
||||
show-word-limit v-model="modalForm.be_good_at" placeholder="请填写医生擅长信息。内容为医生专业领域、擅长疾病、研究方法等信息(字数在10-1000字)" />
|
||||
</a-form-item>
|
||||
show-word-limit v-model="modalForm.be_good_at"
|
||||
placeholder="请填写医生擅长信息。内容为医生专业领域、擅长疾病、研究方法等信息(字数在10-1000字)" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="brief_introduction" label="个人简介:">
|
||||
<a-textarea :auto-size="{minRows:2}" :max-length="{length:1000,errorOnly:true}" allow-clear
|
||||
show-word-limit v-model="modalForm.brief_introduction" placeholder="请填写医生从业经历,职称和所获荣誉等信息(字数在10-1000字)" />
|
||||
show-word-limit v-model="modalForm.brief_introduction"
|
||||
placeholder="请填写医生从业经历,职称和所获荣誉等信息(字数在10-1000字)" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@ -320,31 +322,33 @@
|
||||
<a-col :span="12">
|
||||
<a-form-item field="doctor_bank_card.province_id" label="开户银行所在地:">
|
||||
<a-space size="large" style="margin-right: 12px;">
|
||||
省<a-select placeholder="请选择省份" v-model="modalForm.doctor_bank_card.province_id" @change="changeProvice">
|
||||
省<a-select placeholder="请选择省份" v-model="modalForm.doctor_bank_card.province_id" @change="changeProvice">
|
||||
<a-option v-for="item in provinceData" :key="item.area_id" :value="Number(item.area_id)"
|
||||
:label="item.area_name">{{item.area_name}}</a-option>
|
||||
:label="item.area_name">{{item.area_name}}</a-option>
|
||||
</a-select>
|
||||
</a-space>
|
||||
<a-space size="large" style="margin-right: 12px;">
|
||||
市<a-select placeholder="请选择城市" :style="{minWidth:'140px'}" v-model="modalForm.doctor_bank_card.city_id" @change="changeCity">
|
||||
市<a-select placeholder="请选择城市" :style="{minWidth:'140px'}" v-model="modalForm.doctor_bank_card.city_id"
|
||||
@change="changeCity">
|
||||
<a-option v-for="item in cityData" :key="item.area_id" :value="Number(item.area_id)"
|
||||
:label="item.area_name">{{item.area_name}}</a-option>
|
||||
:label="item.area_name">{{item.area_name}}</a-option>
|
||||
</a-select>
|
||||
</a-space>
|
||||
<a-space size="large">
|
||||
区<a-select placeholder="请选择地区" :style="{minWidth:'140px'}" v-model="modalForm.doctor_bank_card.county_id">
|
||||
区<a-select placeholder="请选择地区" :style="{minWidth:'140px'}"
|
||||
v-model="modalForm.doctor_bank_card.county_id">
|
||||
<a-option v-for="item in countryData" :key="item.area_id" :value="Number(item.area_id)"
|
||||
:label="item.area_name">{{item.area_name}}</a-option>
|
||||
:label="item.area_name">{{item.area_name}}</a-option>
|
||||
</a-select>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="doctor_bank_card.bank_id" label="开户银行:">
|
||||
<a-space size="large" >
|
||||
<a-select v-model="modalForm.doctor_bank_card.bank_id" :style="{width:'220px'}">
|
||||
<a-space size="large">
|
||||
<a-select v-model="modalForm.doctor_bank_card.bank_id" :style="{width:'220px'}">
|
||||
<a-option v-for="item in bankData" :key="item.bank_id" :value="item.bank_id"
|
||||
:label="item.bank_name"></a-option>
|
||||
:label="item.bank_name"></a-option>
|
||||
</a-select>
|
||||
</a-space>
|
||||
|
||||
@ -354,7 +358,7 @@
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="bank_card_code" label="银行卡号:">
|
||||
<a-input v-model="modalForm.bank_card_code" placeholder="请输入银行卡号" />
|
||||
<a-input v-model="modalForm.bank_card_code" placeholder="请输入银行卡号" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@ -516,18 +520,19 @@
|
||||
<DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removeDoctor"
|
||||
@deleteVisibleChange="() => deleteVisible = false" />
|
||||
<!-- Akiraka 20230223 删除与批量删除 结束 -->
|
||||
<a-modal v-model:visible="okVisible" :modal-style="{width:'320px'}" body-class="okmodal" @ok="handleSubmit" @cancel="()=>okVisible=false">
|
||||
<a-modal v-model:visible="okVisible" :modal-style="{width:'320px'}" body-class="okmodal" @ok="handleSubmit"
|
||||
@cancel="()=>okVisible=false">
|
||||
<template #title>
|
||||
提示
|
||||
</template>
|
||||
<div >确定保存当前信息?</div>
|
||||
<div>确定保存当前信息?</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<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 { 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 { ossSign, ossUpload } from '@/api/oss';
|
||||
import dayjs from 'dayjs'
|
||||
// Akiraka 20230210 删除数据
|
||||
@ -535,7 +540,7 @@
|
||||
// Akiraka 20230210 删除对话框
|
||||
const deleteVisible = ref(false)
|
||||
// Akiraka 20230210 监听删除事件
|
||||
const okVisible=ref(false);
|
||||
const okVisible = ref(false);
|
||||
|
||||
watch(() => deleteVisible.value, (value) => {
|
||||
if (value == false) {
|
||||
@ -544,11 +549,11 @@
|
||||
});
|
||||
|
||||
const file = ref();
|
||||
const oldFrontImg=ref(''),oldBackImg=ref(''),oldSignImg=ref('');
|
||||
const oldFrontImg = ref(''), oldBackImg = ref(''), oldSignImg = ref('');
|
||||
const { proxy } = getCurrentInstance();
|
||||
const currentPage = ref(1);
|
||||
const loading = ref(false);
|
||||
|
||||
|
||||
// Pager
|
||||
const pager = {
|
||||
total: 0,
|
||||
@ -560,15 +565,19 @@
|
||||
inquiry_service: ''
|
||||
});
|
||||
const modalForm = reactive({
|
||||
hospital: {},
|
||||
hospital: {
|
||||
address: '',
|
||||
hospital_name: '',
|
||||
hospital_id: ''
|
||||
},
|
||||
user_doctor_info: {
|
||||
|
||||
},
|
||||
doctor_bank_card:{
|
||||
bank_card_province_id:'',
|
||||
bank_card_city_id:'',
|
||||
bank_card_county_id:'',
|
||||
bank_id:''
|
||||
doctor_bank_card: {
|
||||
bank_card_province_id: '',
|
||||
bank_card_city_id: '',
|
||||
bank_card_county_id: '',
|
||||
bank_id: ''
|
||||
},
|
||||
user: {},
|
||||
doctor_id: '',
|
||||
@ -584,17 +593,17 @@
|
||||
card_num: null,
|
||||
cur_doctor_expertise: [],
|
||||
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/doctor_avatar.png',
|
||||
bank_card_code:'',
|
||||
bank_card_code: '',
|
||||
});
|
||||
const hospital_name=ref('');
|
||||
watch(()=>modalForm.hospital,()=>{
|
||||
if(modalForm.hospital.hospital_name){
|
||||
hospital_name.value= modalForm.hospital.hospital_name+'('+modalForm.hospital.province+modalForm.hospital.city+modalForm.hospital.county+')'
|
||||
}else{
|
||||
hospital_name.value=''
|
||||
const hospital_name = ref('');
|
||||
watch(() => modalForm.hospital, () => {
|
||||
if (modalForm.hospital && modalForm.hospital.hospital_name) {
|
||||
hospital_name.value = modalForm.hospital.hospital_name + '(' + modalForm.hospital.province + modalForm.hospital.city + modalForm.hospital.county + ')'
|
||||
} else {
|
||||
hospital_name.value = ''
|
||||
}
|
||||
},{
|
||||
deep:true
|
||||
}, {
|
||||
deep: true
|
||||
})
|
||||
//const doctor_expertise=ref([]);
|
||||
//证书计算
|
||||
@ -684,7 +693,7 @@
|
||||
value.forEach((item) => {
|
||||
arr.push(item.url)
|
||||
});
|
||||
|
||||
|
||||
modalForm.license_cert = arr;
|
||||
|
||||
}, { deep: true });
|
||||
@ -757,8 +766,8 @@
|
||||
}],
|
||||
'hospital.address': [{ required: true, message: '请输入医院地址' }],
|
||||
'hospital_id': [{ required: true, message: '请选择医院名称' }],
|
||||
'department_custom_mobile':[{
|
||||
required: true, message: '请输入科室电话'
|
||||
'department_custom_mobile': [{
|
||||
required: true, message: '请输入科室电话'
|
||||
}],
|
||||
department_custom_id: [{ required: true, message: '请选择所在科室' }],
|
||||
department_custom_name: [{ required: true, message: '请输入科室名称' }],
|
||||
@ -768,9 +777,9 @@
|
||||
{ type: 'array', required: true, message: '请选择专长' },
|
||||
{
|
||||
validator: (value, cb) => {
|
||||
if (value.length>10) {
|
||||
cb("专长不能超过10项")
|
||||
}
|
||||
if (value.length > 10) {
|
||||
cb("专长不能超过10项")
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -781,7 +790,7 @@
|
||||
validator: (value, cb) => {
|
||||
return new Promise(resolve => {
|
||||
window.setTimeout(() => {
|
||||
if (license_cert_list.value.length<2) {
|
||||
if (license_cert_list.value.length < 2) {
|
||||
cb("至少上传2张医师执业证照片")
|
||||
}
|
||||
resolve()
|
||||
@ -790,7 +799,7 @@
|
||||
|
||||
}
|
||||
}],
|
||||
qualification_cert: [
|
||||
qualification_cert: [
|
||||
{
|
||||
validator: (value, cb) => {
|
||||
return new Promise(resolve => {
|
||||
@ -864,17 +873,17 @@
|
||||
const columns = [
|
||||
{ title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' },
|
||||
{ title: '医生名字', dataIndex: 'user_name' },
|
||||
{ title: '手机号码', dataIndex: 'mobile',width:125 },
|
||||
{ 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: 'multi_point_status', slotName: 'multi_point_status', width: 140 },
|
||||
{ title: '是否推荐', dataIndex: 'is_recommend', slotName: 'is_recommend' },
|
||||
{ title: '申请人', dataIndex: 'user_name' },
|
||||
{ title: '审核状态', dataIndex: 'iden_auth_status', slotName: 'iden_auth_status' },
|
||||
{ title: '状态', dataIndex: 'status', slotName: 'status' },
|
||||
// { title: '创建时间', dataIndex: 'created_at', slotName: 'created_at' },
|
||||
{ title: '操作', slotName: 'action',fixed:"right",width:180 },
|
||||
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
||||
];
|
||||
|
||||
// Table Data
|
||||
@ -895,17 +904,24 @@
|
||||
modalTitle.value = '新增医生';
|
||||
modalSatus.value = 'add';
|
||||
modalForm.doctor_id = null;
|
||||
modalForm.hospital = {};
|
||||
modalForm.hospital = {
|
||||
address: '',
|
||||
hospital_name: '',
|
||||
hospital_id: ''
|
||||
};
|
||||
modalForm.user = {};
|
||||
modalForm.license_cert='';
|
||||
modalForm.qualification_cert='';
|
||||
modalForm.work_cert='';
|
||||
modalForm.user_doctor_info={};
|
||||
modalForm.id_card_front='';
|
||||
modalForm.id_card_back='';
|
||||
modalForm.sign_image='';
|
||||
modalForm.doctor_bank_card={
|
||||
|
||||
modalForm.license_cert = '';
|
||||
modalForm.qualification_cert = '';
|
||||
modalForm.work_cert = '';
|
||||
modalForm.user_doctor_info = {};
|
||||
modalForm.id_card_front = '';
|
||||
modalForm.id_card_back = '';
|
||||
modalForm.sign_image = '';
|
||||
modalForm.doctor_bank_card = {
|
||||
bank_card_province_id: '',
|
||||
bank_card_city_id: '',
|
||||
bank_card_county_id: '',
|
||||
bank_id: ''
|
||||
}
|
||||
//$refs.modalFormRef.resetFields();
|
||||
};
|
||||
@ -919,25 +935,49 @@
|
||||
|
||||
if (code == 200) {
|
||||
Object.assign(modalForm, data);
|
||||
if (!data.hospital) {
|
||||
modalForm.hospital = {};
|
||||
}
|
||||
if(data.doctor_title==0){
|
||||
modalForm.doctor_title='';
|
||||
}
|
||||
if(data.hospital_id==0){
|
||||
modalForm.hospital_id='';
|
||||
}
|
||||
if(data.department_custom_id==0){
|
||||
modalForm.department_custom_id=''
|
||||
}
|
||||
if (!data.user_doctor_info) {
|
||||
data.user_doctor_info = {};
|
||||
modalForm.user_doctor_info = {};
|
||||
}
|
||||
if (data.doctor_expertise && data.doctor_expertise.length > 0) {
|
||||
let arr = [];
|
||||
data.doctor_expertise.forEach((item) => {
|
||||
arr.push(item.expertise_id)
|
||||
})
|
||||
handleDecryptBank();
|
||||
if(data.doctor_bank_card && data.doctor_bank_card.province_id){
|
||||
handelAreaList('',data.doctor_bank_card.province_id,3);
|
||||
}else{
|
||||
modalForm.doctor_bank_card = {
|
||||
bank_card_province_id: '',
|
||||
bank_card_city_id: '',
|
||||
bank_card_county_id: '',
|
||||
if (data.doctor_bank_card && data.doctor_bank_card.province_id) {
|
||||
handelAreaList('', data.doctor_bank_card.province_id, 3);
|
||||
} else {
|
||||
modalForm.doctor_bank_card = {
|
||||
province_id: '',
|
||||
city_id: '',
|
||||
county_id: '',
|
||||
bank_id: ''
|
||||
}
|
||||
};
|
||||
if(data.doctor_bank_card && data.doctor_bank_card.city_id){
|
||||
handelAreaList('',data.doctor_bank_card.city_id,4);
|
||||
}
|
||||
};
|
||||
if (data.doctor_bank_card && data.doctor_bank_card.city_id) {
|
||||
handelAreaList('', data.doctor_bank_card.city_id, 4);
|
||||
}
|
||||
if (!data.doctor_bank_card) {
|
||||
modalForm.doctor_bank_card = {
|
||||
province_id: '',
|
||||
city_id: '',
|
||||
county_id: '',
|
||||
bank_id: ''
|
||||
}
|
||||
}
|
||||
modalForm.cur_doctor_expertise = arr;
|
||||
}
|
||||
}
|
||||
@ -951,34 +991,48 @@
|
||||
if (code == 200) {
|
||||
Object.assign(modalForm, data);
|
||||
handleDecryptBank();
|
||||
if(data.doctor_bank_card && data.doctor_bank_card.province_id){
|
||||
handelAreaList('',data.doctor_bank_card.province_id,3);
|
||||
}else{
|
||||
|
||||
if (data.doctor_bank_card && data.doctor_bank_card.province_id) {
|
||||
handelAreaList('', data.doctor_bank_card.province_id, 3);
|
||||
}
|
||||
if (data.doctor_bank_card && data.doctor_bank_card.city_id) {
|
||||
handelAreaList('', data.doctor_bank_card.city_id, 4);
|
||||
}
|
||||
if (!data.user_doctor_info) {
|
||||
data.user_doctor_info = {};
|
||||
modalForm.user_doctor_info = {};
|
||||
}
|
||||
if (!data.hospital) {
|
||||
modalForm.hospital = {};
|
||||
}
|
||||
if (!data.doctor_bank_card) {
|
||||
modalForm.doctor_bank_card = {
|
||||
bank_card_province_id: '',
|
||||
bank_card_city_id: '',
|
||||
bank_card_county_id: '',
|
||||
bank_id: ''
|
||||
}
|
||||
province_id: '',
|
||||
city_id: '',
|
||||
county_id: '',
|
||||
bank_id: ''
|
||||
}
|
||||
};
|
||||
if(data.doctor_bank_card && data.doctor_bank_card.city_id){
|
||||
handelAreaList('',data.doctor_bank_card.city_id,4);
|
||||
}
|
||||
if(!data.user_doctor_info){
|
||||
data.user_doctor_info={};
|
||||
modalForm.user_doctor_info={};
|
||||
}
|
||||
let { license_cert, qualification_cert, work_cert, id_card_front, id_card_back, sign_image} = data.user_doctor_info;
|
||||
if(data.doctor_title==0){
|
||||
modalForm.doctor_title='';
|
||||
}
|
||||
if(data.hospital_id==0){
|
||||
modalForm.hospital_id='';
|
||||
}
|
||||
if(data.department_custom_id==0){
|
||||
modalForm.department_custom_id=''
|
||||
}
|
||||
let { license_cert, qualification_cert, work_cert, id_card_front, id_card_back, sign_image } = data.user_doctor_info;
|
||||
license_cert_list.value = transArr(license_cert);
|
||||
qualification_cert_list.value = transArr(qualification_cert);
|
||||
work_cert_list.value = transArr(work_cert);
|
||||
id_card_front_list.value = id_card_front && transArr(id_card_front);
|
||||
id_card_back_list.value = id_card_back && transArr(id_card_back);
|
||||
sign_image_list.value = sign_image && transArr(sign_image);
|
||||
oldFrontImg.value=id_card_front;
|
||||
oldBackImg.value=id_card_back;
|
||||
oldSignImg.value=sign_image;
|
||||
if(modalForm.iden_auth_status==2){
|
||||
id_card_front_list.value = id_card_front ? transArr(id_card_front) : [];
|
||||
id_card_back_list.value = id_card_back ? transArr(id_card_back) : [];
|
||||
sign_image_list.value = sign_image ? transArr(sign_image) : [];
|
||||
oldFrontImg.value = id_card_front;
|
||||
oldBackImg.value = id_card_back;
|
||||
oldSignImg.value = sign_image;
|
||||
if (modalForm.iden_auth_status == 2) {
|
||||
proxy.$message.warning('正在审核中,暂时不能修改');
|
||||
}
|
||||
if (data.doctor_expertise && data.doctor_expertise.length > 0) {
|
||||
@ -1048,12 +1102,37 @@
|
||||
is_platform_deep_cooperation: modalForm.is_platform_deep_cooperation,
|
||||
is_sys_diagno_cooperation: modalForm.is_sys_diagno_cooperation,
|
||||
bank_card_code: modalForm.bank_card_code,
|
||||
bank_card_province_id:modalForm.doctor_bank_card.province_id,
|
||||
bank_card_city_id:modalForm.doctor_bank_card.city_id,
|
||||
bank_card_county_id:modalForm.doctor_bank_card.county_id,
|
||||
bank_id:modalForm.doctor_bank_card.bank_id
|
||||
bank_card_province_id: modalForm.doctor_bank_card.province_id,
|
||||
bank_card_city_id: modalForm.doctor_bank_card.city_id,
|
||||
bank_card_county_id: modalForm.doctor_bank_card.county_id,
|
||||
bank_id: modalForm.doctor_bank_card.bank_id
|
||||
}
|
||||
if (!modalForm.doctor_id) {
|
||||
if (modalForm.id_card_front && modalForm.id_card_back && modalForm.sign_image) {
|
||||
if (modalForm.doctor_bank_card) {
|
||||
if (!modalForm.doctor_bank_card.province_id || !modalForm.doctor_bank_card.city_id || !modalForm.doctor_bank_card.county_id) {
|
||||
proxy.$notification.error("请选择开户银行所在地省市区信息");
|
||||
return false
|
||||
};
|
||||
if (!modalForm.doctor_bank_card.bank_id) {
|
||||
proxy.$notification.error("请选择开户银行");
|
||||
return false
|
||||
};
|
||||
|
||||
};
|
||||
if (!modalForm.bank_card_code) {
|
||||
proxy.$notification.error("请输入银行卡号");
|
||||
return false
|
||||
}
|
||||
if (modalForm.bank_card_code) {
|
||||
const reg = /^([1-9]{1})(\d{15}|\d{18})$/;
|
||||
if (!reg.test(modalForm.bank_card_code)) {
|
||||
proxy.$notification.error("请输入正确的银行卡号");
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
proxy.$loading.show();
|
||||
const { code, message } = await addDoctor(modalData);
|
||||
if (code == 200) {
|
||||
@ -1062,42 +1141,42 @@
|
||||
}
|
||||
proxy.$loading.hide();
|
||||
} else {
|
||||
if(oldFrontImg.value && !modalForm.id_card_front){
|
||||
if (oldFrontImg.value && !modalForm.id_card_front) {
|
||||
proxy.$notification.error("请上传医师身份证正面照片");
|
||||
return false
|
||||
};
|
||||
if(oldBackImg.value && !modalForm.id_card_back){
|
||||
if (oldBackImg.value && !modalForm.id_card_back) {
|
||||
proxy.$notification.error("请上传医师身份证反面照片");
|
||||
return false
|
||||
};
|
||||
if(oldSignImg.value && !modalForm.sign_image){
|
||||
if (oldSignImg.value && !modalForm.sign_image) {
|
||||
proxy.$notification.error("请上传医师手写签名照片");
|
||||
return false
|
||||
};
|
||||
if(modalForm.id_card_front && modalForm.id_card_back && modalForm.sign_image){
|
||||
if(modalForm.doctor_bank_card){
|
||||
if(!modalForm.doctor_bank_card.province_id || !modalForm.doctor_bank_card.city_id || !modalForm.doctor_bank_card.county_id){
|
||||
proxy.$notification.error("请选择开户银行所在地省市区信息");
|
||||
return false
|
||||
};
|
||||
if(!modalForm.doctor_bank_card.bank_id){
|
||||
proxy.$notification.error("请选择开户银行");
|
||||
return false
|
||||
if (modalForm.id_card_front && modalForm.id_card_back && modalForm.sign_image) {
|
||||
if (modalForm.doctor_bank_card) {
|
||||
if (!modalForm.doctor_bank_card.province_id || !modalForm.doctor_bank_card.city_id || !modalForm.doctor_bank_card.county_id) {
|
||||
proxy.$notification.error("请选择开户银行所在地省市区信息");
|
||||
return false
|
||||
};
|
||||
|
||||
};
|
||||
if(!modalForm.bank_card_code){
|
||||
proxy.$notification.error("请输入银行卡号");
|
||||
return false
|
||||
}
|
||||
if(modalForm.bank_card_code){
|
||||
if (!modalForm.doctor_bank_card.bank_id) {
|
||||
proxy.$notification.error("请选择开户银行");
|
||||
return false
|
||||
};
|
||||
|
||||
};
|
||||
if (!modalForm.bank_card_code) {
|
||||
proxy.$notification.error("请输入银行卡号");
|
||||
return false
|
||||
}
|
||||
if (modalForm.bank_card_code) {
|
||||
const reg = /^([1-9]{1})(\d{15}|\d{18})$/;
|
||||
if (!reg.test(modalForm.bank_card_code)) {
|
||||
proxy.$notification.error("请输入正确的银行卡号");
|
||||
return false
|
||||
proxy.$notification.error("请输入正确的银行卡号");
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
proxy.$loading.show();
|
||||
const { code, message } = await updateDoctor(modalData, modalForm.doctor_id);
|
||||
@ -1109,7 +1188,7 @@
|
||||
}
|
||||
//done();
|
||||
getDoctorInfo(pager);
|
||||
|
||||
|
||||
} else {
|
||||
console.log(valid)
|
||||
proxy.$message.error('表单校验失败');
|
||||
@ -1168,7 +1247,7 @@
|
||||
|
||||
// 查询医生信息
|
||||
const handleQuery = async () => {
|
||||
pager.page=1;
|
||||
pager.page = 1;
|
||||
const params = {
|
||||
page: pager.page,
|
||||
page_size: pager.page_size,
|
||||
@ -1185,7 +1264,7 @@
|
||||
const { data, code, message } = res;
|
||||
if (code == 200) {
|
||||
departmentData.value = data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//切换小眼睛
|
||||
@ -1193,7 +1272,7 @@
|
||||
const id_card_num = ref('');
|
||||
//解密身份证号码
|
||||
const handelDecryptCard = async (user_id) => {
|
||||
showEye.value=true;
|
||||
showEye.value = true;
|
||||
const { data, code, message } = await decryptCard({
|
||||
user_id
|
||||
});
|
||||
@ -1202,23 +1281,23 @@
|
||||
}
|
||||
};
|
||||
const hospitalData = ref([]);
|
||||
const changeHospital=(value)=>{
|
||||
let arr=hospitalData.value.filter((item)=>item.hospital_id==value);
|
||||
modalForm.hospital_id=arr[0].hospital_id;
|
||||
modalForm.hospital=arr[0];
|
||||
const changeHospital = (value) => {
|
||||
let arr = hospitalData.value.filter((item) => item.hospital_id == value);
|
||||
modalForm.hospital_id = arr[0].hospital_id;
|
||||
modalForm.hospital = arr[0];
|
||||
}
|
||||
//获取医院列表
|
||||
const handleHospitalList = (value) => {
|
||||
loading.value = true;
|
||||
hospitalList({
|
||||
hospital_name:value,
|
||||
hospital_name: value,
|
||||
}).then((res) => {
|
||||
const { data, code, message } = res;
|
||||
if (code == 200) {
|
||||
|
||||
hospitalData.value =data;
|
||||
|
||||
hospitalData.value = data;
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
@ -1232,59 +1311,59 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
const provinceData=ref([]);
|
||||
const cityData=ref([]);
|
||||
const countryData=ref([]);
|
||||
const provinceData = ref([]);
|
||||
const cityData = ref([]);
|
||||
const countryData = ref([]);
|
||||
//获取区域列表
|
||||
const handelAreaList=(area_id='',parent_id='',area_type)=>{
|
||||
const handelAreaList = (area_id = '', parent_id = '', area_type) => {
|
||||
areaList({
|
||||
area_id,
|
||||
area_type,
|
||||
parent_id
|
||||
}).then((res)=>{
|
||||
}).then((res) => {
|
||||
const { data, code, message } = res;
|
||||
if (code == 200) {
|
||||
if(area_type==2){
|
||||
provinceData.value = data;
|
||||
}
|
||||
if(area_type==3){
|
||||
cityData.value=data;
|
||||
};
|
||||
if(area_type==4){
|
||||
countryData.value=data;
|
||||
};
|
||||
if (area_type == 2) {
|
||||
provinceData.value = data;
|
||||
}
|
||||
if (area_type == 3) {
|
||||
cityData.value = data;
|
||||
};
|
||||
if (area_type == 4) {
|
||||
countryData.value = data;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
//切换省份
|
||||
const changeProvice=(value)=>{
|
||||
modalForm.doctor_bank_card.city_id='';
|
||||
modalForm.doctor_bank_card.county_id='';
|
||||
handelAreaList('',value,3);
|
||||
const changeProvice = (value) => {
|
||||
modalForm.doctor_bank_card.city_id = '';
|
||||
modalForm.doctor_bank_card.county_id = '';
|
||||
handelAreaList('', value, 3);
|
||||
};
|
||||
//切换省份
|
||||
const changeCity=(value)=>{
|
||||
modalForm.doctor_bank_card.county_id='';
|
||||
handelAreaList("",value,4);
|
||||
|
||||
const changeCity = (value) => {
|
||||
modalForm.doctor_bank_card.county_id = '';
|
||||
handelAreaList("", value, 4);
|
||||
|
||||
}
|
||||
const handleDecryptBank=()=>{
|
||||
decryptBank(modalForm.doctor_id).then((res)=>{
|
||||
const { data, code, message } = res;
|
||||
if(code==200){
|
||||
modalForm.bank_card_code=data;
|
||||
}
|
||||
})
|
||||
}
|
||||
const bankData=ref([])
|
||||
const handleBankList=()=>{
|
||||
bankList().then((res)=>{
|
||||
const handleDecryptBank = () => {
|
||||
decryptBank(modalForm.doctor_id).then((res) => {
|
||||
const { data, code, message } = res;
|
||||
if(code==200){
|
||||
bankData.value=data;
|
||||
}
|
||||
if (code == 200) {
|
||||
modalForm.bank_card_code = data;
|
||||
}
|
||||
})
|
||||
}
|
||||
const bankData = ref([])
|
||||
const handleBankList = () => {
|
||||
bankList().then((res) => {
|
||||
const { data, code, message } = res;
|
||||
if (code == 200) {
|
||||
bankData.value = data;
|
||||
}
|
||||
})
|
||||
}
|
||||
// 重置搜索
|
||||
@ -1308,7 +1387,7 @@
|
||||
formData.append('policy', policy);
|
||||
formData.append('signature', signature);
|
||||
formData.append('key', dir + time + filename);
|
||||
formData.append('success_action_status',200);
|
||||
formData.append('success_action_status', 200);
|
||||
formData.append('file', File, filename);
|
||||
ossUpload(host, formData).then((res) => {
|
||||
modalForm.avatar = host + "/" + dir + time + filename;
|
||||
@ -1327,8 +1406,8 @@
|
||||
}
|
||||
});
|
||||
};
|
||||
const filterOption=(value,options)=>{
|
||||
console.log(value,options)
|
||||
const filterOption = (value, options) => {
|
||||
console.log(value, options)
|
||||
}
|
||||
//上传文件
|
||||
const onChangeFile = (fileList) => {
|
||||
@ -1340,9 +1419,9 @@
|
||||
handleHospitalList();
|
||||
getDepartmentList();
|
||||
handlExpertiseList();
|
||||
handelAreaList("","",2);
|
||||
handelAreaList("", "", 2);
|
||||
handleBankList();
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -1350,9 +1429,11 @@
|
||||
.action {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.okmodal div{
|
||||
|
||||
.okmodal div {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hospital_name {
|
||||
width: 140px;
|
||||
white-space: nowrap;
|
||||
@ -1363,8 +1444,8 @@
|
||||
.headImg {
|
||||
margin-right: 20px;
|
||||
border-radius: 50%;
|
||||
width:80px;
|
||||
height:80px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.arco-form-item-layout-horizontal:first-child,
|
||||
@ -1398,7 +1479,8 @@
|
||||
color: red;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.cardNum{
|
||||
|
||||
.cardNum {
|
||||
width: 148px;
|
||||
}
|
||||
</style>
|
||||
@ -381,6 +381,30 @@
|
||||
|
||||
if (code == 200) {
|
||||
Object.assign(modalForm, data);
|
||||
if(data.doctor_title==0){
|
||||
modalForm.doctor_title='';
|
||||
}
|
||||
if(data.hospital_id==0){
|
||||
modalForm.hospital_id='';
|
||||
}
|
||||
if(data.department_custom_id==0){
|
||||
modalForm.department_custom_id=''
|
||||
}
|
||||
if (!data.user_doctor_info) {
|
||||
data.user_doctor_info = {};
|
||||
modalForm.user_doctor_info = {};
|
||||
}
|
||||
if (!data.hospital) {
|
||||
modalForm.hospital = {};
|
||||
}
|
||||
if (!data.doctor_bank_card) {
|
||||
modalForm.doctor_bank_card = {
|
||||
province_id: '',
|
||||
city_id: '',
|
||||
county_id: '',
|
||||
bank_id: ''
|
||||
}
|
||||
};
|
||||
if (data.doctor_expertise && data.doctor_expertise.length > 0) {
|
||||
let arr = [];
|
||||
data.doctor_expertise.forEach((item) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user