更新
This commit is contained in:
parent
68a48230fa
commit
b46fd9b9b3
@ -86,7 +86,7 @@
|
|||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item field="doctor_id" label="选择医生:">
|
<a-form-item field="doctor_id" label="选择医生:">
|
||||||
<a-select v-model="modalForm.doctor_id" placeholder="请选择医生" allow-search
|
<a-select v-model="modalForm.doctor_id" placeholder="请选择医生" allow-search
|
||||||
:loading="loading" @search="handleGetDoctor" >
|
:loading="loading" @search="handleGetDoctor" @change="changeDoctor">
|
||||||
<a-option v-for="item in doctorList" :key="item.doctor_id" :value="item.doctor_id" :label="item.user_name">
|
<a-option v-for="item in doctorList" :key="item.doctor_id" :value="item.doctor_id" :label="item.user_name">
|
||||||
{{ item.user_name }}
|
{{ item.user_name }}
|
||||||
</a-option>
|
</a-option>
|
||||||
@ -99,7 +99,7 @@
|
|||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item field="service_price" label="服务价格(元):">
|
<a-form-item field="service_price" label="服务价格(元):">
|
||||||
<a-input-number
|
<a-input-number
|
||||||
:disabled="id?true:false"
|
disabled
|
||||||
v-model="modalForm.service_price"
|
v-model="modalForm.service_price"
|
||||||
:style="{ width: '320px' }"
|
:style="{ width: '320px' }"
|
||||||
placeholder="请输入服务价格"
|
placeholder="请输入服务价格"
|
||||||
@ -143,6 +143,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref,toRefs,watch,getCurrentInstance,reactive,defineExpose} from 'vue';
|
import { ref,toRefs,watch,getCurrentInstance,reactive,defineExpose} from 'vue';
|
||||||
import { addHealthConfig,updateHealthConfig,getDoctorList,getHealthConfigAddList} from '@/api/inquiry/service';
|
import { addHealthConfig,updateHealthConfig,getDoctorList,getHealthConfigAddList} from '@/api/inquiry/service';
|
||||||
|
import {getInquiryconfigDetail} from "@/api/inquiry/config"
|
||||||
import { parseTime } from '@/utils/parseTime';
|
import { parseTime } from '@/utils/parseTime';
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const product_data=ref([]);
|
const product_data=ref([]);
|
||||||
@ -190,6 +191,28 @@ const healthConfig=async()=>{
|
|||||||
const reset=()=>{
|
const reset=()=>{
|
||||||
product_data.value=[];
|
product_data.value=[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const configDetail=async()=>{
|
||||||
|
const {code,data}=await getInquiryconfigDetail({
|
||||||
|
inquiry_config_id:'',
|
||||||
|
inquiry_type:1,
|
||||||
|
inquiry_mode:1,
|
||||||
|
doctor_id:modalForm.doctor_id
|
||||||
|
});
|
||||||
|
if(code==200){
|
||||||
|
if(data.inquiry_price){
|
||||||
|
emits('setPrice',data.inquiry_price*0.6*5)
|
||||||
|
}else{
|
||||||
|
proxy.$message.warning('该医生需要开启图文问诊,才能开通此服务');
|
||||||
|
}
|
||||||
|
if(data.multi_point_status!=1){
|
||||||
|
proxy.$message.warning('本服务需开处方,该医生需要做多点执业认证');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const changeDoctor=(val)=>{
|
||||||
|
configDetail();
|
||||||
|
}
|
||||||
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)=>{
|
||||||
@ -200,6 +223,7 @@ const reset=()=>{
|
|||||||
healthConfig();
|
healthConfig();
|
||||||
title.value='添加健康包配置';
|
title.value='添加健康包配置';
|
||||||
handleGetDoctor();
|
handleGetDoctor();
|
||||||
|
|
||||||
}
|
}
|
||||||
},{immediate:true})
|
},{immediate:true})
|
||||||
watch(()=>props.modalForm,(newVal,oldValval)=>{
|
watch(()=>props.modalForm,(newVal,oldValval)=>{
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
allow-search
|
allow-search
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@search="handleGetDoctor"
|
@search="handleGetDoctor"
|
||||||
|
@change="changeDoctor"
|
||||||
>
|
>
|
||||||
<a-option
|
<a-option
|
||||||
v-for="item in doctorList"
|
v-for="item in doctorList"
|
||||||
@ -107,7 +108,17 @@
|
|||||||
</a-select>
|
</a-select>
|
||||||
</template>
|
</template>
|
||||||
<template #service_price="{ record }">
|
<template #service_price="{ record }">
|
||||||
<a-input-number v-model="record.service_price" :min="0" />
|
<div class="box" >
|
||||||
|
<a-input-number v-model="record.service_price" :min="0" />
|
||||||
|
<span class="tips" >建议价格设置为:
|
||||||
|
<span v-if="record.service_period==30">{{tuwenPrice*10*0.5.toFixed(2)}}</span>
|
||||||
|
<span v-else-if="record.service_period==90">{{tuwenPrice*30*0.4.toFixed(2)}}</span>
|
||||||
|
<span v-else-if="record.service_period==180">{{tuwenPrice*60*0.3.toFixed(2)}}</span>
|
||||||
|
<span v-else-if="record.service_period==360">{{ tuwenPrice*120*0.2.toFixed(2) }}</span>
|
||||||
|
<span v-else>单次图文*10次*0.5</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<a-button
|
<a-button
|
||||||
@ -171,8 +182,10 @@ import {
|
|||||||
getDoctorList,
|
getDoctorList,
|
||||||
} from '@/api/inquiry/service';
|
} from '@/api/inquiry/service';
|
||||||
import { parseTime } from '@/utils/parseTime';
|
import { parseTime } from '@/utils/parseTime';
|
||||||
|
import {getInquiryconfigDetail} from "@/api/inquiry/config"
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const package_data = ref([]);
|
const package_data = ref([]);
|
||||||
|
const tuwenPrice=ref(null);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 是否显示
|
// 是否显示
|
||||||
modalVisible: {
|
modalVisible: {
|
||||||
@ -210,9 +223,13 @@ const selectData= computed(() => {
|
|||||||
return package_data.value.map(item=>item.service_period)
|
return package_data.value.map(item=>item.service_period)
|
||||||
})
|
})
|
||||||
const addPackage = () => {
|
const addPackage = () => {
|
||||||
|
if(!modalForm.value.doctor_id){
|
||||||
|
proxy.$message.warning('请先选择医生');
|
||||||
|
return false
|
||||||
|
}
|
||||||
package_data.value.push({
|
package_data.value.push({
|
||||||
service_period: null,
|
service_period: null,
|
||||||
service_price: 10,
|
service_price:null,
|
||||||
follow_package_item_id: new Date().getTime(),
|
follow_package_item_id: new Date().getTime(),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -229,6 +246,21 @@ const removePackage = (id) => {
|
|||||||
const reset = () => {
|
const reset = () => {
|
||||||
package_data.value = [];
|
package_data.value = [];
|
||||||
};
|
};
|
||||||
|
const configDetail=async()=>{
|
||||||
|
const {code,data}=await getInquiryconfigDetail({
|
||||||
|
inquiry_config_id:'',
|
||||||
|
inquiry_type:1,
|
||||||
|
inquiry_mode:1,
|
||||||
|
doctor_id:modalForm.doctor_id
|
||||||
|
});
|
||||||
|
if(code==200){
|
||||||
|
if(data.inquiry_price){
|
||||||
|
tuwenPrice.value=data.inquiry_price;
|
||||||
|
}else{
|
||||||
|
proxy.$message.warning('该医生需要开启图文问诊,才能开通此服务');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
const package_columns = [
|
const package_columns = [
|
||||||
// {
|
// {
|
||||||
// title: '服务包名称',
|
// title: '服务包名称',
|
||||||
@ -340,7 +372,9 @@ const handleSubmit = () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const changeDoctor=()=>{
|
||||||
|
configDetail();
|
||||||
|
}
|
||||||
const rules = {
|
const rules = {
|
||||||
monthly_frequency: [{ required: true, message: '请选择每月次数' }],
|
monthly_frequency: [{ required: true, message: '请选择每月次数' }],
|
||||||
doctor_id: [{ required: true, message: '请选择医生' }],
|
doctor_id: [{ required: true, message: '请选择医生' }],
|
||||||
@ -364,5 +398,15 @@ defineExpose({
|
|||||||
|
|
||||||
color:#999;
|
color:#999;
|
||||||
}
|
}
|
||||||
|
.box{
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
.box.active{
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tips{
|
||||||
|
color:red;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -79,7 +79,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
|
|
||||||
<addHealthConfigModal ref="addChild" :modalVisible="modalVisible" :id="health_package_id" :modalForm="modalForm" @freshList="getInquiryInfo(pager);" @healthVisibleChange="()=>{modalVisible=false;health_package_id='';}"></addHealthConfigModal>
|
<addHealthConfigModal ref="addChild" :modalVisible="modalVisible" :id="health_package_id" :modalForm="modalForm" @freshList="getInquiryInfo(pager);" @healthVisibleChange="()=>{modalVisible=false;health_package_id='';}" @setPrice="setPrice"></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>
|
||||||
@ -184,7 +184,9 @@
|
|||||||
addChild.value.reset();
|
addChild.value.reset();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
const setPrice=(data)=>{
|
||||||
|
modalForm.service_price=data;
|
||||||
|
}
|
||||||
//详情
|
//详情
|
||||||
const handleDetail = async (record) => {
|
const handleDetail = async (record) => {
|
||||||
health_package_id.value=record.health_package_id;
|
health_package_id.value=record.health_package_id;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user