From f13aacd58f88b9dd292fe557af328890202f4cf0 Mon Sep 17 00:00:00 2001 From: zoujiandong <10130823232@qq.com> Date: Fri, 21 Jun 2024 11:06:51 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 3 --- src/components/addHealthConfigModal.vue | 24 ++++++++++++++++++++---- src/layout/components/Menu/Menu.vue | 1 + src/router/index.js | 1 + 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/components.d.ts b/components.d.ts index 7029145..9c9cf27 100644 --- a/components.d.ts +++ b/components.d.ts @@ -17,14 +17,11 @@ declare module '@vue/runtime-core' { AddVisitConfigModal: typeof import('./src/components/addVisitConfigModal.vue')['default'] ChatRecord: typeof import('./src/components/chatRecord.vue')['default'] ConfirmModal: typeof import('./src/components/confirmModal.vue')['default'] - copy: typeof import('./src/components/medinceDetailModal copy.vue')['default'] CouponDetail: typeof import('./src/components/couponDetail.vue')['default'] DeleteModal: typeof import('./src/components/DeleteModal.vue')['default'] DoctorModal: typeof import('./src/components/doctorModal.vue')['default'] - ElButton: typeof import('element-plus/es')['ElButton'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] - ElTree: typeof import('element-plus/es')['ElTree'] FamilyModal: typeof import('./src/components/familyModal.vue')['default'] GiveCouponModal: typeof import('./src/components/giveCouponModal.vue')['default'] HospitalDetailModal: typeof import('./src/components/hospitalDetailModal.vue')['default'] diff --git a/src/components/addHealthConfigModal.vue b/src/components/addHealthConfigModal.vue index 81ac587..e161cf3 100644 --- a/src/components/addHealthConfigModal.vue +++ b/src/components/addHealthConfigModal.vue @@ -73,7 +73,7 @@ + :loading="loading" @search="healthConfig" :disabled="id?true:false" @change="changePackage"> {{ item.package_id }} @@ -85,7 +85,7 @@ + :loading="loading" @search="handleGetDoctor" @change="changeDoctor" :disabled="(id || !packagePrice)?true:false" @click="isSelectPackage"> {{ item.user_name }} @@ -105,7 +105,7 @@ class="input-demo" :step="1" :precision="0" :min="0" - />  提示:问诊金额{{tuwenPrice}}元,健康包金额{{modalForm.service_price}}元 + />  提示:问诊金额{{tuwenPrice*6*.5}}元,健康包金额{{packagePrice}}元 @@ -180,6 +180,15 @@ const handleGetDoctor=async(name='',id='')=>{ } loading.value=false; }; +const packagePrice=ref(null); +const changePackage=(val)=>{ + packageList.value.forEach(item=>{ + if(item.package_id==val){ + packagePrice.value=item.discount_product_total_amount; + } + }) + +} const healthConfig=async()=>{ const {code,data}=await getHealthConfigAddList({ limit:100 @@ -190,6 +199,8 @@ const healthConfig=async()=>{ } const reset=()=>{ product_data.value=[]; + packagePrice.value=null; + tuwenPrice.value=''; }; let multi_point_status=null; @@ -204,7 +215,7 @@ const configDetail=async()=>{ if(code==200){ if(data.inquiry_price){ tuwenPrice.value=data.inquiry_price; - emits('setPrice',data.inquiry_price*0.6*5) + emits('setPrice',data.inquiry_price*0.6*5+packagePrice.value) }else{ proxy.$message.warning('该医生需要开启图文问诊,才能开通此服务'); } @@ -216,6 +227,11 @@ const configDetail=async()=>{ } const changeDoctor=(val)=>{ configDetail(); +} +const isSelectPackage=()=>{ + if(packagePrice.value==null && !id.value){ + proxy.$message.warning('请先选择健康包'); + } } const {modalVisible,id,modalForm}=toRefs(props); const emits = defineEmits(['healthVisibleChange','freshList']); diff --git a/src/layout/components/Menu/Menu.vue b/src/layout/components/Menu/Menu.vue index 03e53b1..e249bf0 100644 --- a/src/layout/components/Menu/Menu.vue +++ b/src/layout/components/Menu/Menu.vue @@ -33,6 +33,7 @@ const props = defineProps({ }, }); const {menuList} = storeToRefs(permissionStore); + const route = useRoute(); const router = useRouter(); diff --git a/src/router/index.js b/src/router/index.js index 1837141..b1def9f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -80,6 +80,7 @@ router.beforeEach(async(to, from, next) => { if (store.token && permissionStore.addRouters.length==0) { await permissionStore.getButtonRole(); const menuResult = await permissionStore.getMenuRole(); + console.log( permissionStore.addRouters) permissionStore.addRouters.forEach((route) => { router.addRoute('/', route); }); From 2614ef3add115617f8d762c292a1d3788e0e925a Mon Sep 17 00:00:00 2001 From: zoujiandong <10130823232@qq.com> Date: Fri, 21 Jun 2024 11:25:10 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=81=A5=E5=BA=B7=E5=8C=85id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/addHealthConfigModal.vue | 5 ++++- src/views/inquiry/health/index.vue | 1 + src/views/inquiry/healthconfig/index.vue | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/addHealthConfigModal.vue b/src/components/addHealthConfigModal.vue index e161cf3..5769085 100644 --- a/src/components/addHealthConfigModal.vue +++ b/src/components/addHealthConfigModal.vue @@ -213,12 +213,15 @@ const configDetail=async()=>{ doctor_id:modalForm.doctor_id }); if(code==200){ - if(data.inquiry_price){ + if(!id.value){ + if(data.inquiry_price){ tuwenPrice.value=data.inquiry_price; emits('setPrice',data.inquiry_price*0.6*5+packagePrice.value) }else{ proxy.$message.warning('该医生需要开启图文问诊,才能开通此服务'); } + } + // if(data.multi_point_status!=1){ // multi_point_status=data.multi_point_status; // proxy.$message.warning('本服务需开处方,该医生需要做多点执业认证'); diff --git a/src/views/inquiry/health/index.vue b/src/views/inquiry/health/index.vue index b1c61d3..b950791 100644 --- a/src/views/inquiry/health/index.vue +++ b/src/views/inquiry/health/index.vue @@ -120,6 +120,7 @@ // Table Columns const columns = [ { title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' }, + { title: '健康包id', dataIndex: 'package_id',width:190 }, { title: '总服务次数', dataIndex: 'service_count',width:180 }, { title: '每月次数', dataIndex: 'monthly_frequency',slotName:'monthly_frequency', width:130 }, { title: '服务有效天数', dataIndex: 'effective_days', width: 150 }, diff --git a/src/views/inquiry/healthconfig/index.vue b/src/views/inquiry/healthconfig/index.vue index 54caed7..b1f2b52 100644 --- a/src/views/inquiry/healthconfig/index.vue +++ b/src/views/inquiry/healthconfig/index.vue @@ -153,7 +153,7 @@ // Table Columns const columns = [ { title: '编号', dataIndex: 'doctor_id', slotName: 'doctor_id', width: '90' }, - // { title: '服务名称', dataIndex: 'inquiry_mode',slotName:'inquiry_mode',width:180 }, + { title: '健康包id', dataIndex: 'package_id',slotName:'package_id',width:180 }, { title: '医生姓名', dataIndex: 'doctor_name',slotName:'doctor_name',width:180 }, { title: '医生科室', dataIndex: 'department_custom_name',slotName:'department_custom_name',width:180 }, { title: '职称', dataIndex: 'doctor_title',slotName:'doctor_title',width:180 }, From 1aeb74a3a85860a1eecd7fbe0e24af711768ef8a Mon Sep 17 00:00:00 2001 From: zoujiandong <10130823232@qq.com> Date: Fri, 21 Jun 2024 11:47:16 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/addHealthConfigModal.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/addHealthConfigModal.vue b/src/components/addHealthConfigModal.vue index 5769085..967af7c 100644 --- a/src/components/addHealthConfigModal.vue +++ b/src/components/addHealthConfigModal.vue @@ -213,14 +213,15 @@ const configDetail=async()=>{ doctor_id:modalForm.doctor_id }); if(code==200){ - if(!id.value){ if(data.inquiry_price){ tuwenPrice.value=data.inquiry_price; - emits('setPrice',data.inquiry_price*0.6*5+packagePrice.value) + if(!id.value){ + emits('setPrice',data.inquiry_price*0.6*5+packagePrice.value) + } }else{ proxy.$message.warning('该医生需要开启图文问诊,才能开通此服务'); } - } + // if(data.multi_point_status!=1){ // multi_point_status=data.multi_point_status; From af2159474ff75cc7e192f511cc36ddc1827062cc Mon Sep 17 00:00:00 2001 From: zoujiandong <10130823232@qq.com> Date: Fri, 21 Jun 2024 11:47:41 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=9B=BE=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/addHealthConfigModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/addHealthConfigModal.vue b/src/components/addHealthConfigModal.vue index 967af7c..eea785f 100644 --- a/src/components/addHealthConfigModal.vue +++ b/src/components/addHealthConfigModal.vue @@ -213,7 +213,7 @@ const configDetail=async()=>{ doctor_id:modalForm.doctor_id }); if(code==200){ - if(data.inquiry_price){ + if(data.inquiry_price){ tuwenPrice.value=data.inquiry_price; if(!id.value){ emits('setPrice',data.inquiry_price*0.6*5+packagePrice.value)