6.11更新
This commit is contained in:
parent
87bc762916
commit
994afb3549
2
components.d.ts
vendored
2
components.d.ts
vendored
@ -10,9 +10,11 @@ export {}
|
|||||||
declare module '@vue/runtime-core' {
|
declare module '@vue/runtime-core' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
AccountModal: typeof import('./src/components/accountModal.vue')['default']
|
AccountModal: typeof import('./src/components/accountModal.vue')['default']
|
||||||
|
AddHealthConfigModal: typeof import('./src/components/addHealthConfigModal.vue')['default']
|
||||||
AddHealthModal: typeof import('./src/components/addHealthModal.vue')['default']
|
AddHealthModal: typeof import('./src/components/addHealthModal.vue')['default']
|
||||||
AddInquiryConfigModal: typeof import('./src/components/addInquiryConfigModal.vue')['default']
|
AddInquiryConfigModal: typeof import('./src/components/addInquiryConfigModal.vue')['default']
|
||||||
AddSysconfigModal: typeof import('./src/components/addSysconfigModal.vue')['default']
|
AddSysconfigModal: typeof import('./src/components/addSysconfigModal.vue')['default']
|
||||||
|
AddVisitConfigModal: typeof import('./src/components/addVisitConfigModal.vue')['default']
|
||||||
ChatRecord: typeof import('./src/components/chatRecord.vue')['default']
|
ChatRecord: typeof import('./src/components/chatRecord.vue')['default']
|
||||||
ConfirmModal: typeof import('./src/components/confirmModal.vue')['default']
|
ConfirmModal: typeof import('./src/components/confirmModal.vue')['default']
|
||||||
copy: typeof import('./src/components/isOkModal copy.vue')['default']
|
copy: typeof import('./src/components/isOkModal copy.vue')['default']
|
||||||
|
|||||||
@ -24,7 +24,7 @@ export function addHealth(data){//健康包管理-获取健康包详情
|
|||||||
export function updateHealth(id,data){//健康包管理-获取健康包详情
|
export function updateHealth(id,data){//健康包管理-获取健康包详情
|
||||||
return request({
|
return request({
|
||||||
url:'/admin/inquiry/health/'+id,
|
url:'/admin/inquiry/health/'+id,
|
||||||
method: 'post',
|
method: 'put',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -51,7 +51,50 @@ export function addHealth(data){//健康包管理-获取健康包详情
|
|||||||
}
|
}
|
||||||
export function updateHealthConfig(id,data){//医生健康包配置-修改医生健康包配置
|
export function updateHealthConfig(id,data){//医生健康包配置-修改医生健康包配置
|
||||||
return request({
|
return request({
|
||||||
url:'/admin/inquiry/doctor/health'+id,
|
url:'/admin/inquiry/doctor/health/'+id,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getDoctorList(params){//医生列表
|
||||||
|
return request({
|
||||||
|
url:'/admin/doctor/list',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getHealthConfigAddList(params){//健康包管理-获取健康包列表-限制条数
|
||||||
|
return request({
|
||||||
|
url:'/admin/inquiry/health/list',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function getVisitConfigList(params){//医生随访包配置-获取开启随访包服务的医生-分页
|
||||||
|
return request({
|
||||||
|
url:'/admin/inquiry/doctor/follow',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function visitConfigDetail(id){//医生随访包配置-医生随访包配置详情
|
||||||
|
return request({
|
||||||
|
url:'/admin/inquiry/doctor/follow/'+id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function addVisitConfig(data){//医生随访包配置-新增医生随访包配置
|
||||||
|
return request({
|
||||||
|
url:'/admin/inquiry/doctor/follow',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function updateVisitConfig(id,data){//医生随访包配置-修改医生随访包配置
|
||||||
|
return request({
|
||||||
|
url:'/admin/inquiry/doctor/follow/'+id,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
|||||||
270
src/components/addHealthConfigModal.vue
Normal file
270
src/components/addHealthConfigModal.vue
Normal file
@ -0,0 +1,270 @@
|
|||||||
|
<template>
|
||||||
|
<!-- Modal -->
|
||||||
|
<a-modal
|
||||||
|
v-model:visible="modalVisible"
|
||||||
|
fullscreen
|
||||||
|
:title="title"
|
||||||
|
title-align="start"
|
||||||
|
:footer="false"
|
||||||
|
@cancel="handleClose"
|
||||||
|
>
|
||||||
|
<a-form :model="modalForm" ref="modalFormRefConfig" :auto-label-width="true" :rules="rules">
|
||||||
|
<div class="titlebox" style="margin-bottom: 35px" >
|
||||||
|
<div class="bar"></div>
|
||||||
|
<div class="name">健康包配置信息</div>
|
||||||
|
</div>
|
||||||
|
<a-row :gutter="24" v-if="modalForm.health_package_id">
|
||||||
|
<a-col :span="12" v-if="modalForm.health_package">
|
||||||
|
<a-form-item field="service_count" label="总服务数:">
|
||||||
|
<a-input-number
|
||||||
|
v-model="modalForm.health_package.service_count"
|
||||||
|
:style="{ width: '320px' }"
|
||||||
|
placeholder="请输入总服务数"
|
||||||
|
class="input-demo"
|
||||||
|
disabled
|
||||||
|
:step="1" :precision="0"
|
||||||
|
:min="1"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" v-if="modalForm.health_package_id">
|
||||||
|
<a-form-item field="monthly_frequency" label="每月次数:" v-if="modalForm.health_package">
|
||||||
|
<a-input-number
|
||||||
|
v-model="modalForm.health_package.monthly_frequency"
|
||||||
|
:style="{ width: '320px' }"
|
||||||
|
placeholder="请输入每月次数"
|
||||||
|
class="input-demo"
|
||||||
|
disabled
|
||||||
|
:step="1" :precision="0"
|
||||||
|
:min="0"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24" >
|
||||||
|
<a-col :span="12" v-if="modalForm.health_package_id">
|
||||||
|
<a-form-item field="service_rate" label="服务费率(%):" v-if="modalForm.health_package">
|
||||||
|
<a-input
|
||||||
|
v-model="modalForm.health_package.service_rate"
|
||||||
|
disabled
|
||||||
|
:style="{ width: '320px' }"
|
||||||
|
placeholder="请选择服务费率"
|
||||||
|
class="input-demo"
|
||||||
|
:step="1" :precision="0"
|
||||||
|
:min="1"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" v-if="modalForm.health_package_id">
|
||||||
|
<a-form-item field="effective_days" label="服务有效天数:" v-if="modalForm.health_package">
|
||||||
|
<a-input
|
||||||
|
v-model="modalForm.health_package.effective_days"
|
||||||
|
:style="{ width: '320px' }"
|
||||||
|
disabled
|
||||||
|
placeholder="请输入服务有效天数"
|
||||||
|
class="input-demo"
|
||||||
|
:step="1" :precision="0"
|
||||||
|
:min="0"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="package_id" label="健康包:">
|
||||||
|
<a-select v-model="modalForm.package_id" placeholder="请选择健康包" allow-search
|
||||||
|
:loading="loading" @search="healthConfig" >
|
||||||
|
<a-option v-for="item in packageList" :key="item.package_id" :value="item.package_id" :label="item.package_id">
|
||||||
|
{{ item.package_id }}
|
||||||
|
</a-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24" >
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="doctor_id" label="选择医生:">
|
||||||
|
<a-select v-model="modalForm.doctor_id" placeholder="请选择医生" allow-search
|
||||||
|
:loading="loading" @search="handleGetDoctor" >
|
||||||
|
<a-option v-for="item in doctorList" :key="item.doctor_id" :value="item.doctor_id" :label="item.user_name">
|
||||||
|
{{ item.user_name }}
|
||||||
|
</a-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24" >
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="service_price" label="服务价格(元):">
|
||||||
|
<a-input-number
|
||||||
|
v-model="modalForm.service_price"
|
||||||
|
:style="{ width: '320px' }"
|
||||||
|
placeholder="请输入服务价格"
|
||||||
|
class="input-demo"
|
||||||
|
:step="1" :precision="0"
|
||||||
|
:min="0"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24" >
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="is_enable" label="状态:">
|
||||||
|
<a-switch
|
||||||
|
v-model="modalForm.is_enable"
|
||||||
|
:checked-value="1"
|
||||||
|
:unchecked-value="0"
|
||||||
|
/>
|
||||||
|
</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 >
|
||||||
|
<a-button type="primary" @click="handleSubmit" v-has="'admin:sysDoctorconfigList:save'">保存</a-button>
|
||||||
|
</a-space>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { ref,toRefs,watch,getCurrentInstance,reactive,defineExpose} from 'vue';
|
||||||
|
import { addHealthConfig,updateHealthConfig,getDoctorList,getHealthConfigAddList} from '@/api/inquiry/service';
|
||||||
|
import { parseTime } from '@/utils/parseTime';
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const product_data=ref([]);
|
||||||
|
const props = defineProps({
|
||||||
|
// 是否显示
|
||||||
|
modalVisible: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
id:{
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
modalForm:{
|
||||||
|
type:Object,
|
||||||
|
default:{
|
||||||
|
user_id:''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const title=ref('添加问诊配置');
|
||||||
|
const loading=ref(false);
|
||||||
|
const doctorList=ref([]);
|
||||||
|
const packageList=ref([]);
|
||||||
|
const handleGetDoctor=async(name='',id='')=>{
|
||||||
|
loading.value=true;
|
||||||
|
const {code,data}=await getDoctorList({
|
||||||
|
user_name:name,
|
||||||
|
doctor_id:id
|
||||||
|
});
|
||||||
|
if(code==200){
|
||||||
|
doctorList.value=data;
|
||||||
|
}
|
||||||
|
loading.value=false;
|
||||||
|
};
|
||||||
|
const healthConfig=async()=>{
|
||||||
|
const {code,data}=await getHealthConfigAddList({
|
||||||
|
limit:100
|
||||||
|
});
|
||||||
|
if(code==200){
|
||||||
|
packageList.value=data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const reset=()=>{
|
||||||
|
product_data.value=[];
|
||||||
|
};
|
||||||
|
const {modalVisible,id,modalForm}=toRefs(props);
|
||||||
|
const emits = defineEmits(['healthVisibleChange','freshList']);
|
||||||
|
watch(()=>props.id,(newVal,oldValval)=>{
|
||||||
|
if(props.id){
|
||||||
|
title.value='修改健康包配置';
|
||||||
|
|
||||||
|
}else{
|
||||||
|
healthConfig();
|
||||||
|
title.value='添加健康包配置';
|
||||||
|
handleGetDoctor();
|
||||||
|
}
|
||||||
|
},{immediate:true})
|
||||||
|
watch(()=>props.modalForm,(newVal,oldValval)=>{
|
||||||
|
if(props.modalForm.doctor_inquiry_config){
|
||||||
|
handleGetDoctor('',props.modalForm.doctor_inquiry_config.doctor_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
},{immediate:true,deep:true})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Akiraka 20230210 关闭弹窗
|
||||||
|
const handleClose = () => {
|
||||||
|
proxy.$refs.modalFormRefConfig.resetFields();
|
||||||
|
reset();
|
||||||
|
emits('healthVisibleChange', false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSubmit=()=>{
|
||||||
|
proxy.$refs.modalFormRefConfig.validate(async (valid) => {
|
||||||
|
let data=null;
|
||||||
|
let {doctor_id,package_id,service_price,is_enable}=modalForm.value;
|
||||||
|
if (!valid) {
|
||||||
|
if(props.id){
|
||||||
|
data= await updateHealthConfig(props.id,{
|
||||||
|
doctor_id,
|
||||||
|
package_id,
|
||||||
|
service_price:String(service_price),
|
||||||
|
is_enable
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
data= await addHealthConfig({
|
||||||
|
doctor_id,
|
||||||
|
package_id,
|
||||||
|
service_price:String(service_price),
|
||||||
|
is_enable
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if(data.code==200){
|
||||||
|
props.id?proxy.$message.success('修改成功'):proxy.$message.success('添加成功');
|
||||||
|
//emits('freshList', '');
|
||||||
|
}
|
||||||
|
handleClose();
|
||||||
|
}else {
|
||||||
|
console.log(valid)
|
||||||
|
proxy.$message.error('表单校验失败');
|
||||||
|
//done(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const rules = {
|
||||||
|
package_id: [{ required: true, message: '请选择服务包' }],
|
||||||
|
doctor_id:[{ required: true, message: '请选择医生' }],
|
||||||
|
service_price: [{ required: true, message: '请输入服务价格' }],
|
||||||
|
is_enable:[{ required: true, message: '请选择状态' }],
|
||||||
|
};
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
reset
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@ -81,7 +81,7 @@
|
|||||||
<a-row :gutter="24" >
|
<a-row :gutter="24" >
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item field="" label="修改关联商品信息:" >
|
<a-form-item field="" label="修改关联商品信息:" >
|
||||||
<a-table :columns="product_columns" :data="product_data" style="width:100%;">
|
<a-table :columns="product_columns" :data="product_data" style="width:100%;" :pagination="false">
|
||||||
<template #discount_product_price="{ record }">
|
<template #discount_product_price="{ record }">
|
||||||
<a-input-number v-model="record.discount_product_price" :min="0"/>
|
<a-input-number v-model="record.discount_product_price" :min="0"/>
|
||||||
</template>
|
</template>
|
||||||
@ -156,50 +156,71 @@ const handleGetProduct=async(name='',id='')=>{
|
|||||||
const {modalVisible,id,modalForm}=toRefs(props);
|
const {modalVisible,id,modalForm}=toRefs(props);
|
||||||
const emits = defineEmits(['healthVisibleChange','freshList']);
|
const emits = defineEmits(['healthVisibleChange','freshList']);
|
||||||
watch(()=>props.id,(newVal,oldValval)=>{
|
watch(()=>props.id,(newVal,oldValval)=>{
|
||||||
|
handleGetProduct();
|
||||||
if(props.id){
|
if(props.id){
|
||||||
title.value='修改健康包';
|
title.value='修改健康包';
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
title.value='添加健康包';
|
title.value='添加健康包';
|
||||||
}
|
}
|
||||||
|
},{immediate:true});
|
||||||
},{immediate:true})
|
|
||||||
watch(()=>props.modalForm,()=>{
|
|
||||||
handleGetProduct();
|
|
||||||
if(id.value){
|
|
||||||
let product=modalForm.value.health_package_product;
|
|
||||||
initData=modalForm.value.health_package_product;
|
|
||||||
if(product && product.length>0){
|
|
||||||
|
|
||||||
modalForm.value.my_package_product=product.map((item)=>item.product_id);
|
// watch(()=>props.modalForm,()=>{
|
||||||
product_data.value=product;
|
// if(id.value){
|
||||||
}
|
// let product=modalForm.value.health_package_product;
|
||||||
}
|
// initData=modalForm.value.health_package_product;
|
||||||
|
// if(product && product.length>0){
|
||||||
},{immediate:true})
|
// modalForm.value.my_package_product=product.map((item)=>item.product_id);
|
||||||
|
// product_data.value=product;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// },{immediate:true})
|
||||||
|
|
||||||
|
|
||||||
|
const getData=()=>{
|
||||||
|
let product=modalForm.value.health_package_product;
|
||||||
|
initData=modalForm.value.health_package_product;
|
||||||
|
if(product && product.length>0){
|
||||||
|
modalForm.value.my_package_product=product.map((item)=>item.product_id);
|
||||||
|
product_data.value=product;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const changeProduct=(val)=>{
|
const changeProduct=(val)=>{
|
||||||
console.log(val);
|
|
||||||
product_data.value=[];
|
product_data.value=[];
|
||||||
|
let json={};
|
||||||
|
let count=0;
|
||||||
|
console.log(initData)
|
||||||
for (let i = 0; i < val.length; i++) {
|
for (let i = 0; i < val.length; i++) {
|
||||||
if(initData.length>0){
|
if(initData.length>0){
|
||||||
for (let j = 0; j < initData.length; j++) {
|
for (let j = 0; j < initData.length; j++) {
|
||||||
|
count++;
|
||||||
if (val[i]=== initData[j].product_id){
|
if (val[i]=== initData[j].product_id){
|
||||||
product_data.value.push({
|
if(!json[initData[j].product_id]){
|
||||||
product_id:initData[j].product_id,
|
json[initData[j].product_id]=count;
|
||||||
product_name:initData[j].product_name,
|
product_data.value.push({
|
||||||
quantity:initData[j].quantity,
|
product_id:initData[j].product_id,
|
||||||
discount_product_price:initData[j].discount_product_price
|
product_name:initData[j].product_name,
|
||||||
})
|
quantity:initData[j].quantity,
|
||||||
continue;
|
discount_product_price:initData[j].discount_product_price
|
||||||
|
})
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
let arr=productList.value.filter((item)=>item.product_id==val[i]);
|
let arr=productList.value.filter((item)=>item.product_id==val[i]);
|
||||||
product_data.value.push({
|
if(!json[arr[0].product_id]){
|
||||||
product_id:arr[0].product_id,
|
json[arr[0].product_id]=count;
|
||||||
product_name:arr[0].product_name,
|
product_data.value.push({
|
||||||
quantity:1,
|
product_id:arr[0].product_id,
|
||||||
discount_product_price:10
|
product_name:arr[0].product_name,
|
||||||
})
|
quantity:1,
|
||||||
|
discount_product_price:10
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
let arr=productList.value.filter((item)=>item.product_id==val[i]);
|
let arr=productList.value.filter((item)=>item.product_id==val[i]);
|
||||||
product_data.value.push({
|
product_data.value.push({
|
||||||
@ -211,7 +232,6 @@ const handleGetProduct=async(name='',id='')=>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -231,6 +251,17 @@ const handleGetProduct=async(name='',id='')=>{
|
|||||||
const handleSubmit=()=>{
|
const handleSubmit=()=>{
|
||||||
proxy.$refs.modalFormRefConfig.validate(async (valid) => {
|
proxy.$refs.modalFormRefConfig.validate(async (valid) => {
|
||||||
let data=null;
|
let data=null;
|
||||||
|
for (let i = 0; i < product_data.value.length; i++) {
|
||||||
|
if(!product_data.value[i].quantity){
|
||||||
|
proxy.$message.warning('商品数量不能为空');
|
||||||
|
return false
|
||||||
|
};
|
||||||
|
if(!product_data.value[i].discount_product_price ){
|
||||||
|
proxy.$message.warning('商品折后价格不能为空');
|
||||||
|
return false
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
let obj=Object.assign({},modalForm.value,{health_package_product:product_data.value});
|
let obj=Object.assign({},modalForm.value,{health_package_product:product_data.value});
|
||||||
|
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
@ -281,7 +312,8 @@ const handleGetProduct=async(name='',id='')=>{
|
|||||||
|
|
||||||
]
|
]
|
||||||
defineExpose({
|
defineExpose({
|
||||||
reset
|
reset,
|
||||||
|
getData
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
368
src/components/addVisitConfigModal.vue
Normal file
368
src/components/addVisitConfigModal.vue
Normal file
@ -0,0 +1,368 @@
|
|||||||
|
<template>
|
||||||
|
<!-- Modal -->
|
||||||
|
<a-modal
|
||||||
|
v-model:visible="modalVisible"
|
||||||
|
fullscreen
|
||||||
|
:title="title"
|
||||||
|
title-align="start"
|
||||||
|
:footer="false"
|
||||||
|
@cancel="handleClose"
|
||||||
|
>
|
||||||
|
<a-form
|
||||||
|
:model="modalForm"
|
||||||
|
ref="modalFormRefConfig"
|
||||||
|
:auto-label-width="true"
|
||||||
|
:rules="rules"
|
||||||
|
>
|
||||||
|
<div class="titlebox" style="margin-bottom: 35px">
|
||||||
|
<div class="bar"></div>
|
||||||
|
<div class="name">随访包配置信息</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="doctor_id" label="选择医生:">
|
||||||
|
<a-select
|
||||||
|
v-model="modalForm.doctor_id"
|
||||||
|
placeholder="请选择医生"
|
||||||
|
allow-search
|
||||||
|
:loading="loading"
|
||||||
|
@search="handleGetDoctor"
|
||||||
|
>
|
||||||
|
<a-option
|
||||||
|
v-for="item in doctorList"
|
||||||
|
:key="item.doctor_id"
|
||||||
|
:value="item.doctor_id"
|
||||||
|
:label="item.user_name"
|
||||||
|
>
|
||||||
|
{{ item.user_name }}
|
||||||
|
</a-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="monthly_frequency" label="每月次数:">
|
||||||
|
<div class="row">
|
||||||
|
<a-input-number
|
||||||
|
v-model="modalForm.monthly_frequency"
|
||||||
|
:style="{ width: '320px' }"
|
||||||
|
placeholder="请输入每月次数"
|
||||||
|
class="input-demo-num"
|
||||||
|
:step="1"
|
||||||
|
:precision="0"
|
||||||
|
:min="0"
|
||||||
|
/>
|
||||||
|
<span>0表示不限次数</span>
|
||||||
|
</div>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="service_rounds" label="每次问诊回合数:">
|
||||||
|
<div class="row">
|
||||||
|
<a-input-number
|
||||||
|
v-model="modalForm.service_rounds"
|
||||||
|
:style="{ width: '320px' }"
|
||||||
|
placeholder="请输入每次问诊回合数"
|
||||||
|
class="input-demo-num "
|
||||||
|
:step="1"
|
||||||
|
:precision="0"
|
||||||
|
:min="0"
|
||||||
|
/>
|
||||||
|
<span>0表示不限回合数</span>
|
||||||
|
</div>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item
|
||||||
|
field="doctor_config_follow_package_item"
|
||||||
|
label="服务包明细:"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<a-space style="margin-bottom: 10px" v-if="package_data.length<4">
|
||||||
|
<a-button type="primary" @click="addPackage">添加</a-button>
|
||||||
|
</a-space>
|
||||||
|
<a-table
|
||||||
|
:columns="package_columns"
|
||||||
|
:data="package_data"
|
||||||
|
style="width: 100%"
|
||||||
|
:pagination="false"
|
||||||
|
>
|
||||||
|
<template #service_period="{ record }">
|
||||||
|
<a-select
|
||||||
|
|
||||||
|
v-model="record.service_period"
|
||||||
|
placeholder="请选择周期"
|
||||||
|
|
||||||
|
>
|
||||||
|
<a-option :key="30" :value="30" label="30" :disabled="selectData.includes(30)">30 </a-option>
|
||||||
|
<a-option :key="90" :value="90" label="90" :disabled="selectData.includes(90)">90 </a-option>
|
||||||
|
<a-option :key="180" :value="180" label="180" :disabled="selectData.includes(180)">180 </a-option>
|
||||||
|
<a-option :key="360" :value="360" label="360" :disabled="selectData.includes(360)">360 </a-option>
|
||||||
|
</a-select>
|
||||||
|
</template>
|
||||||
|
<template #service_price="{ record }">
|
||||||
|
<a-input-number v-model="record.service_price" :min="0" />
|
||||||
|
</template>
|
||||||
|
<template #action="{ record }">
|
||||||
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
status="danger"
|
||||||
|
@click="removePackage(record.follow_package_item_id)"
|
||||||
|
>删除</a-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :span="12">
|
||||||
|
<a-form-item field="is_enable" label="状态:">
|
||||||
|
<a-switch
|
||||||
|
v-model="modalForm.is_enable"
|
||||||
|
:checked-value="1"
|
||||||
|
:unchecked-value="0"
|
||||||
|
/>
|
||||||
|
</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>
|
||||||
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
@click="handleSubmit"
|
||||||
|
v-has="'admin:sysDoctorconfigList:save'"
|
||||||
|
>保存</a-button
|
||||||
|
>
|
||||||
|
</a-space>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import {
|
||||||
|
ref,
|
||||||
|
toRefs,
|
||||||
|
watch,
|
||||||
|
getCurrentInstance,
|
||||||
|
reactive,
|
||||||
|
computed,
|
||||||
|
defineExpose,
|
||||||
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
addVisitConfig,
|
||||||
|
updateVisitConfig,
|
||||||
|
getDoctorList,
|
||||||
|
} from '@/api/inquiry/service';
|
||||||
|
import { parseTime } from '@/utils/parseTime';
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const package_data = ref([]);
|
||||||
|
const props = defineProps({
|
||||||
|
// 是否显示
|
||||||
|
modalVisible: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
modalForm: {
|
||||||
|
type: Object,
|
||||||
|
default: {
|
||||||
|
user_id: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const title = ref('添加问诊配置');
|
||||||
|
const loading = ref(false);
|
||||||
|
const doctorList = ref([]);
|
||||||
|
const slectData=ref([]);
|
||||||
|
const handleGetDoctor = async (name = '', id = '') => {
|
||||||
|
loading.value = true;
|
||||||
|
const { code, data } = await getDoctorList({
|
||||||
|
user_name: name,
|
||||||
|
doctor_id: id,
|
||||||
|
});
|
||||||
|
if (code == 200) {
|
||||||
|
doctorList.value = data;
|
||||||
|
}
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
const selectData= computed(() => {
|
||||||
|
return package_data.value.map(item=>item.service_period)
|
||||||
|
})
|
||||||
|
const addPackage = () => {
|
||||||
|
package_data.value.push({
|
||||||
|
service_period: null,
|
||||||
|
service_price: 10,
|
||||||
|
follow_package_item_id: new Date().getTime(),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const removePackage = (id) => {
|
||||||
|
let arr = package_data.value;
|
||||||
|
for (let i = 0; i < arr.length; i++) {
|
||||||
|
if (arr[i].follow_package_item_id == id) {
|
||||||
|
package_data.value.splice(i, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const reset = () => {
|
||||||
|
package_data.value = [];
|
||||||
|
};
|
||||||
|
const package_columns = [
|
||||||
|
// {
|
||||||
|
// title: '服务包名称',
|
||||||
|
// dataIndex: 'name',
|
||||||
|
// slotName: 'name'
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
title: '服务包周期(天)',
|
||||||
|
dataIndex: 'service_period',
|
||||||
|
slotName: 'service_period',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '服务价格(元)',
|
||||||
|
dataIndex: 'service_price',
|
||||||
|
slotName: 'service_price',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
|
slotName: 'action',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const { modalVisible, id, modalForm } = toRefs(props);
|
||||||
|
const emits = defineEmits(['healthVisibleChange', 'freshList']);
|
||||||
|
watch(
|
||||||
|
() => props.id,
|
||||||
|
(newVal, oldValval) => {
|
||||||
|
if (props.id) {
|
||||||
|
title.value = '修改随访包配置';
|
||||||
|
} else {
|
||||||
|
title.value = '添加随访包配置';
|
||||||
|
handleGetDoctor();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
);
|
||||||
|
watch(
|
||||||
|
() => props.modalForm,
|
||||||
|
(newVal, oldValval) => {
|
||||||
|
if (props.modalForm.doctor_inquiry_config) {
|
||||||
|
handleGetDoctor('', props.modalForm.doctor_inquiry_config.doctor_id);
|
||||||
|
}
|
||||||
|
let item = props.modalForm.doctor_config_follow_package_item;
|
||||||
|
if (item) {
|
||||||
|
package_data.value = item.map((item) => {
|
||||||
|
return {
|
||||||
|
service_period: item.service_period,
|
||||||
|
service_price: item.service_price,
|
||||||
|
follow_package_item_id: item.follow_package_item_id,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true, deep: true }
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Akiraka 20230210 关闭弹窗
|
||||||
|
const handleClose = () => {
|
||||||
|
proxy.$refs.modalFormRefConfig.resetFields();
|
||||||
|
reset();
|
||||||
|
emits('healthVisibleChange', false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSubmit = () => {
|
||||||
|
proxy.$refs.modalFormRefConfig.validate(async (valid) => {
|
||||||
|
let data = null;
|
||||||
|
if(package_data.value.length==0){
|
||||||
|
proxy.$message.warning('请添加服务包明细');
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
for (let i = 0; i < package_data.value.length; i++) {
|
||||||
|
if(!package_data.value[i].service_period){
|
||||||
|
proxy.$message.warning('服务周期不能为空');
|
||||||
|
return false
|
||||||
|
};
|
||||||
|
if(!package_data.value[i].service_price){
|
||||||
|
proxy.$message.warning('服务价格不能为空');
|
||||||
|
return false
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
let { doctor_id, monthly_frequency, service_rounds, is_enable } =
|
||||||
|
modalForm.value;
|
||||||
|
let obj = {
|
||||||
|
doctor_id,
|
||||||
|
monthly_frequency,
|
||||||
|
service_rounds,
|
||||||
|
is_enable,
|
||||||
|
doctor_config_follow_package_item: package_data.value,
|
||||||
|
};
|
||||||
|
if (!valid) {
|
||||||
|
if (props.id) {
|
||||||
|
data = await updateVisitConfig(props.id, obj);
|
||||||
|
} else {
|
||||||
|
data = await addVisitConfig(obj);
|
||||||
|
}
|
||||||
|
if (data.code == 200) {
|
||||||
|
props.id
|
||||||
|
? proxy.$message.success('修改成功')
|
||||||
|
: proxy.$message.success('添加成功');
|
||||||
|
//emits('freshList', '');
|
||||||
|
}
|
||||||
|
handleClose();
|
||||||
|
} else {
|
||||||
|
console.log(valid);
|
||||||
|
proxy.$message.error('表单校验失败');
|
||||||
|
//done(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const rules = {
|
||||||
|
monthly_frequency: [{ required: true, message: '请选择每月次数' }],
|
||||||
|
doctor_id: [{ required: true, message: '请选择医生' }],
|
||||||
|
service_rounds: [{ required: true, message: '请输入服务回合数' }],
|
||||||
|
is_enable: [{ required: true, message: '请选择状态' }],
|
||||||
|
//doctor_config_follow_package_item:[{type:Array, required: true, message: '请添加服务包明细' }]
|
||||||
|
};
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
reset,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.row{
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.row span{
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
color:#999;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@ -149,11 +149,14 @@
|
|||||||
|
|
||||||
//详情
|
//详情
|
||||||
const handleDetail = async (record) => {
|
const handleDetail = async (record) => {
|
||||||
|
handleAdd();
|
||||||
package_id.value=record.package_id;
|
package_id.value=record.package_id;
|
||||||
modalVisible.value = true;
|
modalVisible.value = true;
|
||||||
const {code,data}=await healthDetail(record.package_id);
|
const {code,data}=await healthDetail(record.package_id);
|
||||||
if(code==200){
|
if(code==200){
|
||||||
Object.assign(modalForm,data)
|
|
||||||
|
Object.assign(modalForm,data);
|
||||||
|
addChild.value.getData();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -10,8 +10,6 @@
|
|||||||
|
|
||||||
<!-- table -->
|
<!-- table -->
|
||||||
<a-table :columns="columns" :data="tableData"
|
<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 }"
|
:pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
|
||||||
row-key="package_id" @selection-change="(selection) => {deleteData = selection;console.log(selection)}"
|
row-key="package_id" @selection-change="(selection) => {deleteData = selection;console.log(selection)}"
|
||||||
@page-change="handlePageChange" @page-size-change="handlepage_sizeChange">
|
@page-change="handlePageChange" @page-size-change="handlepage_sizeChange">
|
||||||
@ -22,14 +20,21 @@
|
|||||||
<div v-if="record.doctor_inquiry_config.inquiry_mode==8">健康包</div>
|
<div v-if="record.doctor_inquiry_config.inquiry_mode==8">健康包</div>
|
||||||
<div v-else-if="record.doctor_inquiry_config.inquiry_mode==9">随访包</div>
|
<div v-else-if="record.doctor_inquiry_config.inquiry_mode==9">随访包</div>
|
||||||
</template>
|
</template>
|
||||||
<!-- <template #monthly_frequency="{ record }">
|
<template #monthly_frequency="{ record }">
|
||||||
<div v-if="record.monthly_frequency==0">不限次</div>
|
<div v-if="record.health_package.monthly_frequency==0">不限次</div>
|
||||||
<div v-else>{{ record.monthly_frequency}}</div>
|
<div v-else>{{ record.health_package.monthly_frequency}}</div>
|
||||||
|
</template>
|
||||||
|
<template #effective_days="{ record }">
|
||||||
|
<div>{{record.health_package.effective_days}}</div>
|
||||||
|
</template>
|
||||||
|
<template #status="{ record }">
|
||||||
|
<div v-if="record.doctor_inquiry_config.is_enable==1">开启</div>
|
||||||
|
<div v-else-if="record.doctor_inquiry_config.is_enable==0">关闭</div>
|
||||||
</template>
|
</template>
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<template #service_rate="{ record }">
|
||||||
|
<div>{{record.health_package.service_rate+"%"}}</div>
|
||||||
|
</template>
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button v-has="'admin:sysDoctorconfigList:edit'" type="text"
|
<a-button v-has="'admin:sysDoctorconfigList:edit'" type="text"
|
||||||
@ -42,7 +47,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
|
|
||||||
<addHealthModal ref="addChild" :modalVisible="modalVisible" :id="package_id" :modalForm="modalForm" @freshList="getInquiryInfo(pager);" @healthVisibleChange="()=>{modalVisible=false;package_id='';}"></addHealthModal>
|
<addHealthConfigModal ref="addChild" :modalVisible="modalVisible" :id="health_package_id" :modalForm="modalForm" @freshList="getInquiryInfo(pager);" @healthVisibleChange="()=>{modalVisible=false;health_package_id='';}"></addHealthConfigModal>
|
||||||
<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">
|
@cancel="()=>okVisible=false">
|
||||||
<template #title>
|
<template #title>
|
||||||
@ -56,15 +61,13 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
||||||
import { getHealthConfigList,healthConfigDetail} from '@/api/inquiry/service';
|
import { getHealthConfigList,healthConfigDetail} from '@/api/inquiry/service';
|
||||||
import {formatDoctorTitle,formatInquiryType,formatMultipoint,formatMode} from "@/utils/format"
|
|
||||||
|
|
||||||
// Akiraka 20230210 删除数据
|
// Akiraka 20230210 删除数据
|
||||||
const deleteData = ref([])
|
const deleteData = ref([])
|
||||||
// Akiraka 20230210 删除对话框
|
// Akiraka 20230210 删除对话框
|
||||||
const deleteVisible = ref(false)
|
const deleteVisible = ref(false)
|
||||||
// Akiraka 20230210 监听删除事件
|
// Akiraka 20230210 监听删除事件
|
||||||
const okVisible = ref(false);
|
const okVisible = ref(false);
|
||||||
const package_id=ref("");
|
const health_package_id=ref("");
|
||||||
watch(() => deleteVisible.value, (value) => {
|
watch(() => deleteVisible.value, (value) => {
|
||||||
if (value == false) {
|
if (value == false) {
|
||||||
getInquiryInfo(pager);
|
getInquiryInfo(pager);
|
||||||
@ -119,10 +122,10 @@
|
|||||||
{ title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' },
|
{ title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' },
|
||||||
{ title: '服务名称', dataIndex: 'inquiry_mode',slotName:'inquiry_mode',width:180 },
|
{ title: '服务名称', dataIndex: 'inquiry_mode',slotName:'inquiry_mode',width:180 },
|
||||||
{ title: '每月次数', dataIndex: 'monthly_frequency',slotName:'monthly_frequency', width:130 },
|
{ title: '每月次数', dataIndex: 'monthly_frequency',slotName:'monthly_frequency', width:130 },
|
||||||
{ title: '服务有效天数', dataIndex: 'effective_days', width: 150 },
|
{ title: '服务有效天数', dataIndex: 'effective_days', slotName:'effective_days', width: 150 },
|
||||||
{ title: '服务费率', dataIndex: 'service_rate', slotName: 'service_rate',width:80 },
|
{ title: '服务费率', dataIndex: 'service_rate', slotName: 'service_rate',width:80 },
|
||||||
{ title: '服务价格(元)', dataIndex: 'service_price',width:80 },
|
{ title: '服务价格(元)', dataIndex: 'service_price',width:80 },
|
||||||
{ title: '关联商品', dataIndex: 'health_package_product',slotName:'health_package_product',width:200 },
|
{ title: '状态', dataIndex: 'status',slotName:'status',width:80 },
|
||||||
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -134,23 +137,26 @@
|
|||||||
// 新增Satus
|
// 新增Satus
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
modalVisible.value = true;
|
modalVisible.value = true;
|
||||||
package_id.value='';
|
health_package_id.value='';
|
||||||
modalForm.service_count=null;
|
modalForm.health_package_id='';
|
||||||
modalForm.monthly_frequency=null;
|
modalForm.package_id='';
|
||||||
modalForm.effective_days=null;
|
modalForm.doctor_id=null;
|
||||||
modalForm.health_package_product=[];
|
modalForm.service_price=null;
|
||||||
modalForm.my_package_product=[];
|
modalForm.is_enable=1;
|
||||||
addChild.value.reset();
|
addChild.value.reset();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//详情
|
//详情
|
||||||
const handleDetail = async (record) => {
|
const handleDetail = async (record) => {
|
||||||
package_id.value=record.package_id;
|
health_package_id.value=record.health_package_id;
|
||||||
modalVisible.value = true;
|
modalVisible.value = true;
|
||||||
const {code,data}=await healthConfigDetail(record.package_id);
|
const {code,data}=await healthConfigDetail(record.health_package_id);
|
||||||
if(code==200){
|
if(code==200){
|
||||||
Object.assign(modalForm,data)
|
Object.assign(modalForm,data);
|
||||||
|
if(data.doctor_inquiry_config){
|
||||||
|
modalForm.is_enable=data.doctor_inquiry_config.is_enable
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
268
src/views/inquiry/visitconfig/index.vue
Normal file
268
src/views/inquiry/visitconfig/index.vue
Normal file
@ -0,0 +1,268 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!-- action -->
|
||||||
|
<div class="action">
|
||||||
|
<a-space>
|
||||||
|
<a-button v-has="'admin:sysDoctorconfigList: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"
|
||||||
|
:pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
|
||||||
|
row-key="package_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)*pager.page_size}}</div>
|
||||||
|
</template>
|
||||||
|
<template #inquiry_mode="{ record }">
|
||||||
|
|
||||||
|
<div>随访包</div>
|
||||||
|
</template>
|
||||||
|
<template #monthly_frequency="{ record }">
|
||||||
|
<div v-if="record.monthly_frequency==0">不限次</div>
|
||||||
|
<div v-else>{{record.monthly_frequency}}</div>
|
||||||
|
</template>
|
||||||
|
<template #service_rounds="{ record }">
|
||||||
|
<div v-if="record.service_rounds==0">
|
||||||
|
不限回合
|
||||||
|
</div>
|
||||||
|
<div v-else>{{ record.service_rounds}}</div>
|
||||||
|
</template>
|
||||||
|
<template #status="{ record }">
|
||||||
|
<div v-if="record.doctor_inquiry_config && record.doctor_inquiry_config.is_enable==1">开启</div>
|
||||||
|
<div v-else-if="record.doctor_inquiry_config && record.doctor_inquiry_config.is_enable==0">关闭</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- <template #service_price="{ record }">
|
||||||
|
<div v-if="record.doctor_inquiry_config">{{record.doctor_inquiry_config.inquiry_price}}</div>
|
||||||
|
</template> -->
|
||||||
|
<template #action="{ record }">
|
||||||
|
<a-space>
|
||||||
|
<a-button v-has="'admin:sysDoctorconfigList:edit'" type="text"
|
||||||
|
@click="handleDetail(record)"><icon-edit />修改</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>
|
||||||
|
|
||||||
|
<addVisitConfigModal ref="addChild" :modalVisible="modalVisible" :id="follow_package_id" :modalForm="modalForm" @freshList="getInquiryInfo(pager);" @healthVisibleChange="()=>{modalVisible=false;follow_package_id='';}"></addVisitConfigModal>
|
||||||
|
<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 { getVisitConfigList,visitConfigDetail} from '@/api/inquiry/service';
|
||||||
|
// Akiraka 20230210 删除数据
|
||||||
|
const deleteData = ref([])
|
||||||
|
// Akiraka 20230210 删除对话框
|
||||||
|
const deleteVisible = ref(false)
|
||||||
|
// Akiraka 20230210 监听删除事件
|
||||||
|
const okVisible = ref(false);
|
||||||
|
const follow_package_id=ref("");
|
||||||
|
watch(() => deleteVisible.value, (value) => {
|
||||||
|
if (value == false) {
|
||||||
|
getInquiryInfo(pager);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const addChild = ref(null);
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const currentPage = ref(1);
|
||||||
|
// Pager
|
||||||
|
const pager = {
|
||||||
|
total: 0,
|
||||||
|
page: 1,
|
||||||
|
page_size: 10,
|
||||||
|
};
|
||||||
|
// form
|
||||||
|
const queryForm = reactive({
|
||||||
|
|
||||||
|
});
|
||||||
|
const modalForm = reactive({
|
||||||
|
|
||||||
|
});
|
||||||
|
// 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_mode',slotName:'inquiry_mode',width:180 },
|
||||||
|
{ title: '每月次数', dataIndex: 'monthly_frequency',slotName:'monthly_frequency', width:130 },
|
||||||
|
{ title: '服务回合数', dataIndex: 'service_rounds', slotName:'service_rounds', width: 150 },
|
||||||
|
// { title: '服务价格(元)', dataIndex: 'service_price',slotName:'service_price',width:80 },
|
||||||
|
{ title: '状态', dataIndex: 'status',slotName:'status',width:80 },
|
||||||
|
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
||||||
|
];
|
||||||
|
|
||||||
|
// Table Data
|
||||||
|
const tableData = ref([]);
|
||||||
|
//弹框状态
|
||||||
|
const modalSatus = ref('add');
|
||||||
|
|
||||||
|
// 新增Satus
|
||||||
|
const handleAdd = () => {
|
||||||
|
modalVisible.value = true;
|
||||||
|
follow_package_id.value='';
|
||||||
|
modalForm.follow_package_id='';
|
||||||
|
modalForm.doctor_config_follow_package_item=[];
|
||||||
|
modalForm.doctor_id=null;
|
||||||
|
modalForm.monthly_frequency=null;
|
||||||
|
modalForm.service_rounds=null;
|
||||||
|
modalForm.is_enable=1;
|
||||||
|
addChild.value.reset();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
//详情
|
||||||
|
const handleDetail = async (record) => {
|
||||||
|
follow_package_id.value=record.follow_package_id;
|
||||||
|
modalVisible.value = true;
|
||||||
|
const {code,data}=await visitConfigDetail(record.follow_package_id);
|
||||||
|
if(code==200){
|
||||||
|
Object.assign(modalForm,data);
|
||||||
|
if(data.doctor_inquiry_config){
|
||||||
|
modalForm.is_enable=data.doctor_inquiry_config.is_enable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页改变
|
||||||
|
* @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 = {}) => {
|
||||||
|
const { data, code, message } = await getVisitConfigList(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);
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getInquiryInfo(pager);
|
||||||
|
});
|
||||||
|
// 重置搜索
|
||||||
|
const handleResetQuery = () => {
|
||||||
|
proxy.$refs.queryFormRef.resetFields();
|
||||||
|
getInquiryInfo(queryForm);
|
||||||
|
}
|
||||||
|
|
||||||
|
</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>
|
||||||
Loading…
x
Reference in New Issue
Block a user