Merge branch 'dev'
This commit is contained in:
commit
d180a4fe41
13
components.d.ts
vendored
13
components.d.ts
vendored
@ -10,19 +10,32 @@ export {}
|
||||
declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
AccountModal: typeof import('./src/components/accountModal.vue')['default']
|
||||
AddHealthConfigModal: typeof import('./src/components/addHealthConfigModal.vue')['default']
|
||||
AddHealthModal: typeof import('./src/components/addHealthModal.vue')['default']
|
||||
AddInquiryConfigModal: typeof import('./src/components/addInquiryConfigModal.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']
|
||||
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']
|
||||
InquiryDetailModal: typeof import('./src/components/inquiryDetailModal.vue')['default']
|
||||
InquiryDetailMoneyModal: typeof import('./src/components/inquiryDetailMoneyModal.vue')['default']
|
||||
IsOkCouponModal: typeof import('./src/components/isOkCouponModal.vue')['default']
|
||||
IsOkModal: typeof import('./src/components/isOkModal.vue')['default']
|
||||
Loading: typeof import('./src/components/loading/loading.vue')['default']
|
||||
MedinceDetailModal: typeof import('./src/components/medinceDetailModal.vue')['default']
|
||||
MedinceModal: typeof import('./src/components/medinceModal.vue')['default']
|
||||
MedinceOrderModal: typeof import('./src/components/medinceOrderModal.vue')['default']
|
||||
NumberModal: typeof import('./src/components/numberModal.vue')['default']
|
||||
PatientModal: typeof import('./src/components/patientModal.vue')['default']
|
||||
Prescription: typeof import('./src/components/prescription.vue')['default']
|
||||
|
||||
51
src/api/basic/list.js
Normal file
51
src/api/basic/list.js
Normal file
@ -0,0 +1,51 @@
|
||||
import request from '../../utils/request'
|
||||
export function getHospitalList(data){
|
||||
return request({
|
||||
url:'/admin/basic/hospital/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getHospitalDetail(id){
|
||||
return request({
|
||||
url:'/admin/basic/hospital/'+id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function addHospital(data){//新增医院
|
||||
return request({
|
||||
url:'/admin/basic/hospital',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function updateHospital(id,data){//修改医院
|
||||
return request({
|
||||
url:'/admin/basic/hospital/'+id,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getAreaList(params){
|
||||
return request({
|
||||
url:'/admin/basic/area',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function addArea(data){//新增医院
|
||||
return request({
|
||||
url:'/admin/basic/area',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function updateArea(id,data){//修改医院
|
||||
return request({
|
||||
url:'/admin/basic/area/'+id,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
65
src/api/coupon/list.js
Normal file
65
src/api/coupon/list.js
Normal file
@ -0,0 +1,65 @@
|
||||
import request from '../../utils/request'
|
||||
export function getSystemCouponList(data){
|
||||
return request({
|
||||
url:'/admin/coupon/system/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getCouponDetail(id){
|
||||
return request({
|
||||
url:'/admin/coupon/system/'+id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function addCoupon(data){//系统-新增系统优惠卷
|
||||
return request({
|
||||
url:'/admin/coupon/system',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function updateCoupon(id,data){//系统-修改系统优惠卷
|
||||
return request({
|
||||
url:'/admin/coupon/system/'+id,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function updateCouponStatus(id,data){//系统-修改系统优惠卷
|
||||
return request({
|
||||
url:'/admin/coupon/system/status/'+id,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getUserCouponList(data){//用户优惠卷列表
|
||||
return request({
|
||||
url:'/admin/coupon/user/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getPatientList(params){
|
||||
return request({
|
||||
url:'/admin/patient/list',
|
||||
method:'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function giveCoupon(id,data){//系统-发放系统优惠卷
|
||||
return request({
|
||||
url:'/admin/coupon/system/grant/'+id,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getProduct(params){//系统-发放系统优惠卷
|
||||
return request({
|
||||
url:'admin/product/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ export function getDoctorDetail(id){
|
||||
}
|
||||
export function areaList(params){ //获取银行列表
|
||||
return request({
|
||||
url:'/basic/area/list',
|
||||
url:'/admin/basic/area',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import request from '../../utils/request'
|
||||
|
||||
const url = '/admin/inquiry/config/doctor';
|
||||
const url = '/admin/inquiry/doctor';
|
||||
|
||||
|
||||
export function getInquiryconfigList(params){
|
||||
return request({
|
||||
url:'/admin/inquiry/config/doctor',
|
||||
url:'/admin/inquiry/doctor/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
@ -13,22 +13,23 @@ export function getInquiryconfigList(params){
|
||||
|
||||
export function addInquiryconfig(data){//添加配置
|
||||
return request({
|
||||
url:'/admin/inquiry/config/doctor',
|
||||
url:'/admin/inquiry/doctor',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function editInquiryconfig(data,id){//添加配置
|
||||
return request({
|
||||
url:'/admin/inquiry/config/doctor/'+id,
|
||||
url:'/admin/inquiry/doctor/'+id,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getInquiryconfigDetail(id){
|
||||
export function getInquiryconfigDetail(params){
|
||||
return request({
|
||||
url:'/admin/inquiry/config/doctor/'+id,
|
||||
method: 'get'
|
||||
url:'/admin/inquiry/doctor',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function getDoctorList(params){//获取医生列表
|
||||
@ -41,7 +42,7 @@ export function getInquiryconfigDetail(id){
|
||||
|
||||
export function inquiryPriceAndTime(params){//获取问诊价格和问诊时间
|
||||
return request({
|
||||
url:'/admin/inquiry/config/system/detail',
|
||||
url:'/admin/inquiry/system/detail',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
|
||||
101
src/api/inquiry/service.js
Normal file
101
src/api/inquiry/service.js
Normal file
@ -0,0 +1,101 @@
|
||||
import request from '../../utils/request'
|
||||
|
||||
export function getHealthList(data){//健康包管理-获取健康包列表-分页
|
||||
return request({
|
||||
url:'/admin/inquiry/health/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function healthDetail(id){//健康包管理-获取健康包详情
|
||||
return request({
|
||||
url:'/admin/inquiry/health/'+id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function addHealth(data){//健康包管理-获取健康包详情
|
||||
return request({
|
||||
url:'/admin/inquiry/health',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function updateHealth(id,data){//健康包管理-获取健康包详情
|
||||
return request({
|
||||
url:'/admin/inquiry/health/'+id,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getHealthConfigList(params){//医生健康包配置-获取开启健康包服务的医生-分页
|
||||
return request({
|
||||
url:'/admin/inquiry/doctor/health',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function healthConfigDetail(id){//医生健康包配置-获取开启健康包服务的医生-分页
|
||||
return request({
|
||||
url:'/admin/inquiry/doctor/health/'+id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function addHealthConfig(data){//医生健康包配置-新增医生健康包配置
|
||||
return request({
|
||||
url:'/admin/inquiry/doctor/health',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function updateHealthConfig(id,data){//医生健康包配置-修改医生健康包配置
|
||||
return request({
|
||||
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',
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -1,11 +1,11 @@
|
||||
import request from '../../utils/request'
|
||||
|
||||
const url = '/admin/inquiry/config/system';
|
||||
const url = '/admin/inquiry/system';
|
||||
|
||||
|
||||
export function getSysconfigList(params){
|
||||
return request({
|
||||
url:'/admin/inquiry/config/system',
|
||||
url:'/admin/inquiry/system',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
@ -13,21 +13,21 @@ export function getSysconfigList(params){
|
||||
|
||||
export function addSysconfig(data){//添加配置
|
||||
return request({
|
||||
url:'/admin/inquiry/config/system',
|
||||
url:'/admin/inquiry/system',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function editSysconfig(data,id){//添加配置
|
||||
return request({
|
||||
url:'/admin/inquiry/config/system/'+id,
|
||||
url:'/admin/inquiry/system/'+id,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getSysconfigDetail(id){
|
||||
return request({
|
||||
url:'/admin/inquiry/config/system/'+id,
|
||||
url:'/admin/inquiry/system/'+id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@ -14,11 +14,11 @@ export function getMedinceDetail(id){//商品详情-平台
|
||||
method: 'get'
|
||||
})
|
||||
};
|
||||
export function getSysMedinceList(params){//获取商品列表-分页-系统
|
||||
export function getSysMedinceList(data){//获取商品列表-分页-系统
|
||||
return request({
|
||||
url:'/admin/product',
|
||||
method: 'get',
|
||||
params
|
||||
url:'/admin/product/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
};
|
||||
|
||||
@ -55,4 +55,11 @@ export function getMedinceDetail(id){//商品详情-平台
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export function exportProduct(data){//导出
|
||||
return request({
|
||||
url:`/admin/export/product`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -88,4 +88,37 @@ export function exportProduct(data){//导出药品订单
|
||||
})
|
||||
}
|
||||
|
||||
export function getServiceList(data){//服务列表
|
||||
return request({
|
||||
url:'/admin/order/service/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function serviceDetail(id){//服务包详情
|
||||
return request({
|
||||
url:`/admin/order/service/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function serviceRightDetail(id){//服务包权益详情
|
||||
return request({
|
||||
url:`/admin/order/service/detail/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function cancelService(id,data){//取消服务包-取消订单
|
||||
return request({
|
||||
url:`/admin/order/service/cancel/${id}`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function exportService(data){//导出服务包
|
||||
return request({
|
||||
url:'/admin/export/order/service',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
306
src/components/addHealthConfigModal.vue
Normal file
306
src/components/addHealthConfigModal.vue
Normal file
@ -0,0 +1,306 @@
|
||||
<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" :disabled="id?true:false" >
|
||||
<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" @change="changeDoctor" :disabled="id?true:false">
|
||||
<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="13">
|
||||
<a-form-item field="service_price" label="服务价格(元):">
|
||||
<a-input-number
|
||||
disabled
|
||||
v-model="modalForm.service_price"
|
||||
:style="{ width: '320px' }"
|
||||
placeholder="请输入服务价格"
|
||||
class="input-demo"
|
||||
:step="1" :precision="0"
|
||||
:min="0"
|
||||
/><span class="tips" v-if="!id && modalForm.doctor_id"> 提示:<span>问诊金额{{tuwenPrice}}元,</span><span v-if="modalForm.service_price">健康包金额{{modalForm.service_price}}元</span></span>
|
||||
</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:sysHealthconfigList: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 {getInquiryconfigDetail} from "@/api/inquiry/config"
|
||||
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,
|
||||
multi_point_status:1
|
||||
});
|
||||
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=[];
|
||||
};
|
||||
|
||||
let multi_point_status=null;
|
||||
const tuwenPrice=ref('');
|
||||
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;
|
||||
emits('setPrice',data.inquiry_price*0.6*5)
|
||||
}else{
|
||||
proxy.$message.warning('该医生需要开启图文问诊,才能开通此服务');
|
||||
}
|
||||
// if(data.multi_point_status!=1){
|
||||
// multi_point_status=data.multi_point_status;
|
||||
// proxy.$message.warning('本服务需开处方,该医生需要做多点执业认证');
|
||||
// }
|
||||
}
|
||||
}
|
||||
const changeDoctor=(val)=>{
|
||||
configDetail();
|
||||
}
|
||||
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;
|
||||
if(tuwenPrice.value ===''){
|
||||
proxy.$message.warning('该医生需要开启图文问诊,才能开通此服务');
|
||||
return false;
|
||||
}
|
||||
// if(multi_point_status!=1){
|
||||
// proxy.$message.warning('本服务需开处方,该医生需要做多点执业认证');
|
||||
// return false;
|
||||
// };
|
||||
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,
|
||||
changeDoctor
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
321
src/components/addHealthModal.vue
Normal file
321
src/components/addHealthModal.vue
Normal file
@ -0,0 +1,321 @@
|
||||
<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">
|
||||
<div class="bar"></div>
|
||||
<div class="name">健康包信息</div>
|
||||
</div>
|
||||
<a-row :gutter="24" style="margin-top: 35px">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="service_count" label="总服务数:">
|
||||
<a-input-number
|
||||
v-model="modalForm.service_count"
|
||||
:style="{ width: '320px' }"
|
||||
placeholder="请输入总服务数"
|
||||
class="input-demo"
|
||||
:step="1" :precision="0"
|
||||
:min="1"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="monthly_frequency" label="每月次数:">
|
||||
<a-input-number
|
||||
v-model="modalForm.monthly_frequency"
|
||||
: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="service_rate" label="服务费率(%):">
|
||||
<a-input
|
||||
v-model="modalForm.service_rate"
|
||||
|
||||
:style="{ width: '320px' }"
|
||||
placeholder="请选择服务费率"
|
||||
class="input-demo"
|
||||
:step="1" :precision="0"
|
||||
:min="1"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="effective_days" label="服务有效天数:">
|
||||
<a-input
|
||||
v-model="modalForm.effective_days"
|
||||
: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="my_package_product" label="关联商品:" >
|
||||
<a-select multiple v-model="modalForm.my_package_product" placeholder="请选择关联商品" allow-search
|
||||
:loading="loading" @search="handleGetProduct" @change="changeProduct" >
|
||||
<a-option v-for="item in productList" :key="item.product_id" :value="item.product_id" :label="item.product_name">
|
||||
{{ item.product_name }}
|
||||
</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" >
|
||||
<a-col :span="12">
|
||||
<a-form-item field="" label="修改关联商品信息:" >
|
||||
<a-table :columns="product_columns" :data="product_data" style="width:100%;" :pagination="false">
|
||||
<template #discount_product_price="{ record }">
|
||||
<a-input-number v-model="record.discount_product_price" :min="0"/>
|
||||
</template>
|
||||
<template #quantity="{ record }">
|
||||
<a-input-number v-model="record.quantity" :step="1" :precision="0" :min="1"/>
|
||||
</template>
|
||||
|
||||
</a-table>
|
||||
</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:sysHealthList: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 { addHealth,updateHealth} from '@/api/inquiry/service';
|
||||
import { parseTime } from '@/utils/parseTime';
|
||||
import {getProduct} from '@/api/coupon/list';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const product_data=ref([]);
|
||||
const props = defineProps({
|
||||
// 是否显示
|
||||
modalVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
id:{
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
modalForm:{
|
||||
type:Object,
|
||||
default:{}
|
||||
}
|
||||
});
|
||||
|
||||
const title=ref('添加问诊配置');
|
||||
const productList=ref([]);
|
||||
const loading=ref(false);
|
||||
let initData=[];
|
||||
const reset=()=>{
|
||||
product_data.value=[];
|
||||
};
|
||||
const handleGetProduct=async(name='',id='')=>{
|
||||
loading.value=true;
|
||||
const {code,data}=await getProduct({
|
||||
product_name:'',
|
||||
product_id:'',
|
||||
limit:100
|
||||
});
|
||||
if(code==200){
|
||||
productList.value=data;
|
||||
}
|
||||
loading.value=false;
|
||||
}
|
||||
|
||||
const {modalVisible,id,modalForm}=toRefs(props);
|
||||
const emits = defineEmits(['healthVisibleChange','freshList']);
|
||||
watch(()=>props.id,(newVal,oldValval)=>{
|
||||
handleGetProduct();
|
||||
if(props.id){
|
||||
title.value='修改健康包';
|
||||
|
||||
}else{
|
||||
title.value='添加健康包';
|
||||
}
|
||||
},{immediate:true});
|
||||
|
||||
// watch(()=>props.modalForm,()=>{
|
||||
// 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);
|
||||
// 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)=>{
|
||||
product_data.value=[];
|
||||
let json={};
|
||||
let count=0;
|
||||
console.log(initData)
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
if(initData.length>0){
|
||||
for (let j = 0; j < initData.length; j++) {
|
||||
count++;
|
||||
if (val[i]=== initData[j].product_id){
|
||||
if(!json[initData[j].product_id]){
|
||||
json[initData[j].product_id]=count;
|
||||
product_data.value.push({
|
||||
product_id:initData[j].product_id,
|
||||
product_name:initData[j].product_name,
|
||||
quantity:initData[j].quantity,
|
||||
discount_product_price:initData[j].discount_product_price
|
||||
})
|
||||
}
|
||||
}else{
|
||||
let arr=productList.value.filter((item)=>item.product_id==val[i]);
|
||||
if(!json[arr[0].product_id]){
|
||||
json[arr[0].product_id]=count;
|
||||
product_data.value.push({
|
||||
product_id:arr[0].product_id,
|
||||
product_name:arr[0].product_name,
|
||||
quantity:1,
|
||||
discount_product_price:10
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
let arr=productList.value.filter((item)=>item.product_id==val[i]);
|
||||
product_data.value.push({
|
||||
product_id:arr[0].product_id,
|
||||
product_name:arr[0].product_name,
|
||||
quantity:1,
|
||||
discount_product_price:10
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Akiraka 20230210 关闭弹窗
|
||||
const handleClose = () => {
|
||||
proxy.$refs.modalFormRefConfig.resetFields();
|
||||
reset();
|
||||
emits('healthVisibleChange', false);
|
||||
};
|
||||
|
||||
const handleSubmit=()=>{
|
||||
proxy.$refs.modalFormRefConfig.validate(async (valid) => {
|
||||
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});
|
||||
|
||||
if (!valid) {
|
||||
if(props.id){
|
||||
data= await updateHealth(props.id,obj)
|
||||
}else{
|
||||
data= await addHealth(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 = {
|
||||
service_count: [{ required: true, message: '请输入总服务天数' }],
|
||||
monthly_frequency:[{ required: true, message: '请输入每月次数' }],
|
||||
effective_days: [{ required: true, message: '请输入服务有效天数' }],
|
||||
service_rate:[{ required: true, message: '请输入服务费率' }],
|
||||
my_package_product: {type: 'array',required: true,message:'请选择关联商品'}
|
||||
|
||||
};
|
||||
const product_columns=[
|
||||
{
|
||||
title: '商品id',
|
||||
dataIndex: 'product_id',
|
||||
},
|
||||
{
|
||||
title: '商品名称',
|
||||
dataIndex: 'product_name',
|
||||
},
|
||||
{
|
||||
title: '商品数量',
|
||||
dataIndex: 'quantity',
|
||||
slotName: 'quantity'
|
||||
},
|
||||
{
|
||||
title: '商品打折后价格',
|
||||
dataIndex: 'discount_product_price',
|
||||
slotName: 'discount_product_price'
|
||||
}
|
||||
|
||||
]
|
||||
defineExpose({
|
||||
reset,
|
||||
getData
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@ -45,10 +45,10 @@
|
||||
:disabled="inquiry_config_id?true:false"
|
||||
v-model="modalForm.inquiry_mode"
|
||||
placeholder="请选择问诊类型"
|
||||
@change="changeType"
|
||||
@change="changeMode"
|
||||
:style="{ width: '320px' }"
|
||||
>
|
||||
<!-- 1:图文 2:视频 3:语音 4:电话 5:会员 -->
|
||||
<!-- 1:'图文',2:'视频', 3:'语音', 4:'电话',5:'会员',6:'疑难会诊',7:'附赠沟通',8:'健康包',9:'服务包' -->
|
||||
<a-option :value="1">图文问诊</a-option>
|
||||
<a-option :value="2">视频问诊</a-option>
|
||||
<a-option :value="3">语音问诊</a-option>
|
||||
@ -288,8 +288,14 @@ const {modalVisible,inquiry_config_id}=toRefs(props);
|
||||
const emits = defineEmits(['familyVisibleChange','freshList']);
|
||||
// Rules
|
||||
const doctorData=ref([]);
|
||||
const handleDetail=(id)=>{
|
||||
getInquiryconfigDetail(id).then(data=>{
|
||||
const handleDetail=()=>{
|
||||
getInquiryconfigDetail({
|
||||
inquiry_config_id:inquiry_config_id.value,
|
||||
inquiry_type:modalForm.inquiry_type,
|
||||
inquiry_mode:modalForm.inquiry_mode,
|
||||
doctor_id:modalForm.doctor_id
|
||||
|
||||
}).then(data=>{
|
||||
if(data.code==200){
|
||||
let result=data.data;
|
||||
Object.assign(modalForm,result);
|
||||
@ -344,7 +350,7 @@ const handleDoctorList=(value)=>{
|
||||
watch(()=>props.inquiry_config_id,(newVal,oldValval)=>{
|
||||
if(newVal){
|
||||
title.value='修改医生问诊配置'
|
||||
handleDetail(newVal)
|
||||
handleDetail()
|
||||
}else{
|
||||
//handleDoctorList();
|
||||
title.value='添加医生问诊配置';
|
||||
@ -459,6 +465,9 @@ const changeType=(value)=>{
|
||||
proxy.$refs.modalFormRefConfig.clearValidate();
|
||||
handleInquiryPriceAndTime()
|
||||
}
|
||||
const changeMode=(value)=>{
|
||||
handleInquiryPriceAndTime();
|
||||
}
|
||||
const inquiry_price_list=ref([]);
|
||||
const handleInquiryPriceAndTime=()=>{
|
||||
inquiryPriceAndTime({
|
||||
|
||||
412
src/components/addVisitConfigModal.vue
Normal file
412
src/components/addVisitConfigModal.vue
Normal file
@ -0,0 +1,412 @@
|
||||
<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"
|
||||
@change="changeDoctor"
|
||||
>
|
||||
<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 }">
|
||||
<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 #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:sysVisitconfigList: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';
|
||||
import {getInquiryconfigDetail} from "@/api/inquiry/config"
|
||||
const { proxy } = getCurrentInstance();
|
||||
const package_data = ref([]);
|
||||
const tuwenPrice=ref(null);
|
||||
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 = () => {
|
||||
if(!modalForm.value.doctor_id){
|
||||
proxy.$message.warning('请先选择医生');
|
||||
return false
|
||||
}
|
||||
package_data.value.push({
|
||||
service_period: null,
|
||||
service_price:null,
|
||||
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 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('该医生需要开启图文问诊,才能开通此服务');
|
||||
}
|
||||
let itemname = props.modalForm.doctor_config_follow_package_item;
|
||||
if (itemname) {
|
||||
package_data.value = itemname.map((item) => {
|
||||
return {
|
||||
service_period: item.service_period,
|
||||
service_price: item.service_price,
|
||||
follow_package_item_id: item.follow_package_item_id,
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
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 changeDoctor=()=>{
|
||||
configDetail();
|
||||
}
|
||||
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);
|
||||
}
|
||||
},
|
||||
{ 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,
|
||||
changeDoctor
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.row{
|
||||
display: flex;
|
||||
|
||||
flex-direction: column;
|
||||
}
|
||||
.row span{
|
||||
font-size: 12px;
|
||||
|
||||
color:#999;
|
||||
}
|
||||
.box{
|
||||
margin-top: 20px;
|
||||
}
|
||||
.box.active{
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.tips{
|
||||
color:red;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
@ -4,12 +4,20 @@
|
||||
<template #title>
|
||||
提示
|
||||
</template>
|
||||
<a-form :model="form" :rules="rules" ref="modalFormRef" size="medium" label-align="left" auto-label-width>
|
||||
<a-form-item field="cancel_remarks" label="理由" >
|
||||
<a-form :model="form" :rules="rules" ref="modalFormRef" size="medium" label-align="right" auto-label-width>
|
||||
<a-form-item field="cancel_remarks" label="理由:" >
|
||||
<a-textarea v-model.trim="form.cancel_remarks" allow-clear placeholder="请输入取消订单理由"></a-textarea>
|
||||
</a-form-item>
|
||||
<a-form-item field="refund_amount" label="退款金额(元)" >
|
||||
<a-input-number v-model="form.refund_amount" placeholder="请输入退款金额" size="large" class="input-demo" />
|
||||
<a-form-item field="refund_amount" label="退款金额(元):" >
|
||||
<a-input-number v-model="form.refund_amount" placeholder="请输入退款金额" size="large" class="input-demo" :min="0" :max="payment_amount_total"/>
|
||||
</a-form-item>
|
||||
<a-form-item field="" label="温馨提示:" v-if="type=='service'">
|
||||
温馨提示:退款金额不可大于实际付款金额,请谨慎填写;<br>
|
||||
退款理由请认真填写,会显示给患者(本单实付金额:{{payment_amount_total}}元)。
|
||||
</a-form-item>
|
||||
<a-form-item field="" label="注:" v-if="type=='service'">
|
||||
当前订单已超过3个月,无法在线上进行自动退款,请线下联系患者进行退款。沟通后,也要填写退款金额和理由。<br>
|
||||
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<template #footer>
|
||||
@ -33,13 +41,17 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
type:{
|
||||
type: String,
|
||||
default:'',
|
||||
},
|
||||
|
||||
id:{
|
||||
type: String,
|
||||
default:'',
|
||||
},
|
||||
payment_amount_total:{
|
||||
type:Number,
|
||||
default:''
|
||||
type:Number
|
||||
},
|
||||
dealType:{
|
||||
type: String,
|
||||
@ -54,7 +66,7 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
const emits = defineEmits(['closeChange']);
|
||||
const {okVisible,title,id,api,payment_amount_total} = toRefs(props);
|
||||
const {okVisible,title,id,api,payment_amount_total,type} = toRefs(props);
|
||||
|
||||
// Akiraka 20230210 关闭弹窗
|
||||
const handleClose = () => {
|
||||
@ -62,7 +74,10 @@ const handleClose = () => {
|
||||
// alert(flag)
|
||||
}
|
||||
watch(()=>props.payment_amount_total,(newVal,oldVal)=>{
|
||||
form.refund_amount=newVal;
|
||||
if(!props.type){
|
||||
form.refund_amount=Number(newVal);
|
||||
}
|
||||
//
|
||||
},{immediate:true})
|
||||
// Akiraka 20230210 删除数据校验
|
||||
const rules = reactive({
|
||||
|
||||
906
src/components/couponDetail.vue
Normal file
906
src/components/couponDetail.vue
Normal file
@ -0,0 +1,906 @@
|
||||
<template>
|
||||
<!-- Modal -->
|
||||
<a-modal
|
||||
v-model:visible="modalVisible"
|
||||
fullscreen
|
||||
:title="modalForm.coupon_id ? '编辑优惠劵' : '创建优惠劵'"
|
||||
title-align="start"
|
||||
:auto-label-width="true"
|
||||
:footer="false"
|
||||
@cancel="handleClose"
|
||||
>
|
||||
<div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">优惠劵信息</div>
|
||||
</div>
|
||||
<a-form
|
||||
:model="modalForm"
|
||||
ref="modalFormRef"
|
||||
:auto-label-width="true"
|
||||
:rules="rules"
|
||||
>
|
||||
<a-row :gutter="24" style="margin-top: 35px">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="coupon_name" label="优惠劵名称:">
|
||||
<a-input
|
||||
placeholder="请输入优惠劵名称"
|
||||
v-model="modalForm.coupon_name"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="coupon_client" label="使用平台:">
|
||||
<a-select
|
||||
:disabled="modalForm.coupon_id?true:false"
|
||||
placeholder="请选择使用平台"
|
||||
v-model="modalForm.coupon_client"
|
||||
>
|
||||
<a-option :key="1" :value="1" label="小程序">小程序</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="application_scope" label="使用范围:">
|
||||
<a-select
|
||||
:disabled="modalForm.coupon_id?true:false"
|
||||
@change="changeScope"
|
||||
placeholder="请选择使用范围"
|
||||
v-model="modalForm.application_scope"
|
||||
>
|
||||
<!-- 1:全场通用 2:问诊 3:按品牌适用 4:按类别适用 5:单品使用 6:全品类药品 -->
|
||||
<a-option :key="1" :value="1" label="全场通用">全场通用</a-option>
|
||||
<a-option :key="2" :value="2" label="问诊">问诊</a-option>
|
||||
<a-option :key="3" :value="3" label="按品牌适用"
|
||||
>按品牌适用</a-option
|
||||
>
|
||||
<a-option :key="4" :value="4" label="按类别适用"
|
||||
>按类别适用</a-option
|
||||
>
|
||||
<a-option :key="5" :value="5" label="单品使用">单品使用</a-option>
|
||||
<a-option :key="6" :value="6" label="全品类药品"
|
||||
>全品类药品</a-option
|
||||
>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="coupon_type" label="发放类型:">
|
||||
<a-select
|
||||
:disabled="modalForm.coupon_id ? true: false"
|
||||
placeholder="请选择发放类型"
|
||||
v-model="modalForm.coupon_type"
|
||||
@change="changeType"
|
||||
>
|
||||
<!-- 1 :无门槛 2:满减 3:数量 -->
|
||||
<a-option :key="1" :value="1" label="无门槛">无门槛</a-option>
|
||||
<a-option :key="2" :value="2" label="满减">满减</a-option>
|
||||
<a-option :key="3" :value="3" label="数量">数量</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="distribution_object" label="发放对象:">
|
||||
<a-select
|
||||
placeholder="请选择发放对象"
|
||||
v-model="modalForm.distribution_object"
|
||||
@change="changeObject"
|
||||
>
|
||||
<!-- 1:全部用户 2:新注册用户 3:会员 4:近期消费 5:近期购药 6:存量用户 7:健康包服务用户 -->
|
||||
<a-option :key="1" :value="1" label="全部用户">全部用户</a-option>
|
||||
<a-option :key="2" :value="2" label="新注册用户"
|
||||
>新注册用户</a-option
|
||||
>
|
||||
<a-option :key="3" :value="3" label="会员">会员</a-option>
|
||||
<a-option :key="4" :value="4" label="近期消费">近期消费</a-option>
|
||||
<a-option :key="5" :value="5" label="近期购药">近期购药</a-option>
|
||||
<a-option :key="6" :value="6" label="存量用户">存量用户</a-option>
|
||||
<a-option :key="7" :value="7" label="健康包服务用户"
|
||||
>健康包服务用户</a-option
|
||||
>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="valid_type" label="有效类型:">
|
||||
<a-select
|
||||
:disabled="modalForm.coupon_id ? true: false"
|
||||
placeholder="请选择有效类型"
|
||||
v-model="modalForm.valid_type"
|
||||
@change="changeValidType"
|
||||
>
|
||||
<!-- 有效类型(1:绝对时效,xxx-xxx时间段有效 2:相对时效 n天内有效) -->
|
||||
<a-option :key="1" :value="1" label="绝对时效">绝对时效</a-option>
|
||||
<a-option :key="2" :value="2" label="相对时效">相对时效</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="showConnectType">
|
||||
<a-col a-col :span="24">
|
||||
<a-form-item field="inquiry_type" label="问诊类型:">
|
||||
<a-select
|
||||
:style="{ width: '320px' }"
|
||||
multiple
|
||||
placeholder="请选择问诊类型"
|
||||
v-model="modalForm.inquiry_type"
|
||||
>
|
||||
<!-- 1:'专家问诊', 2:'快速问诊', 3:'公益问诊', 4:'问诊购药',5:'糖组检测') -->
|
||||
<a-option key="1" value="1" label="专家问诊">专家问诊</a-option>
|
||||
<a-option key="2" value="2" label="快速问诊">快速问诊</a-option>
|
||||
<a-option key="3" value="3" label="公益问诊">公益问诊</a-option>
|
||||
<a-option key="4" value="4" label="问诊购药">问诊购药</a-option>
|
||||
<a-option key="5" value="5" label="糖组检测">糖组检测</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col a-col :span="24">
|
||||
<a-form-item field="coupon_count" label="发放数量:">
|
||||
<a-input-number
|
||||
v-model="modalForm.coupon_count"
|
||||
:style="{ width: '320px' }"
|
||||
:step="1"
|
||||
:precision="0"
|
||||
placeholder="请输入发放数量"
|
||||
class="input-demo"
|
||||
:min="1"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="modalForm.coupon_id">
|
||||
<a-col a-col :span="24">
|
||||
<a-form-item field="coupon_count" label="已发放数量:">
|
||||
<a-input-number
|
||||
disabled
|
||||
v-model="modalForm.coupon_take_count"
|
||||
:style="{ width: '320px' }"
|
||||
:step="1"
|
||||
:precision="0"
|
||||
placeholder="请输入已发放数量"
|
||||
class="input-demo"
|
||||
:min="1"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="modalForm.coupon_id">
|
||||
<a-col a-col :span="24">
|
||||
<a-form-item field="coupon_count" label="已领取数量:">
|
||||
<a-input-number
|
||||
disabled
|
||||
v-model="modalForm.coupon_used_count"
|
||||
:style="{ width: '320px' }"
|
||||
:step="1"
|
||||
:precision="0"
|
||||
placeholder="请输入已已领取数量"
|
||||
class="input-demo"
|
||||
:min="1"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col a-col :span="24">
|
||||
<a-form-item field="coupon_price" label="优惠劵金额:">
|
||||
<a-input-number
|
||||
v-model="modalForm.coupon_price"
|
||||
:style="{ width: '320px' }"
|
||||
placeholder="请输入优惠劵金额"
|
||||
class="input-demo"
|
||||
:min="1"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="showTimeRange">
|
||||
<a-col :span="12">
|
||||
<a-form-item
|
||||
field="valid_start_time"
|
||||
:validate-trigger="['input']"
|
||||
label="有效时间:"
|
||||
:rules="[{ required: true, message: '请选择有效时间' }]"
|
||||
>
|
||||
<a-range-picker
|
||||
v-model="rangeValue"
|
||||
style="width: 360px"
|
||||
show-time
|
||||
:defaultValue="defaultValue"
|
||||
:disabled-date="disabledDate"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
value-format="YYYY-MM-DD HH:mm"
|
||||
@ok="onOk"
|
||||
@clear="clearDate"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="showValidDay">
|
||||
<a-col a-col :span="24">
|
||||
<a-form-item
|
||||
:disabled="modalForm.coupon_id?true:false"
|
||||
field="valid_days"
|
||||
label="领取之日起有效天数:"
|
||||
:validate-trigger="['blur']"
|
||||
:rules="[{ required: true, message: '请输入领取之日起有效天数' }]"
|
||||
>
|
||||
<a-input-number
|
||||
v-model="modalForm.valid_days"
|
||||
:style="{ width: '320px' }"
|
||||
placeholder="请输入有效天数"
|
||||
:step="1"
|
||||
:precision="0"
|
||||
class="input-demo"
|
||||
:min="1"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="showManjian">
|
||||
<a-col a-col :span="24">
|
||||
<a-form-item
|
||||
field="with_amount"
|
||||
label="满减金额(元):"
|
||||
:rules="[{ required: true, message: '请输入满减金额' }]"
|
||||
>
|
||||
<a-input-number
|
||||
v-model="modalForm.with_amount"
|
||||
:style="{ width: '320px' }"
|
||||
placeholder="请输入满减金额"
|
||||
class="input-demo"
|
||||
:min="0"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="showMinNumber">
|
||||
<a-col a-col :span="24">
|
||||
<a-form-item
|
||||
field="min_usable_number"
|
||||
label="单商品最小可使用数量:"
|
||||
:rules="[{ required: true, message: '请输入单商品最小可使用数量' }]"
|
||||
>
|
||||
<a-input-number
|
||||
v-model="modalForm.min_usable_number"
|
||||
:style="{ width: '320px' }"
|
||||
placeholder="请输入单商品最小可使用数量"
|
||||
class="input-demo"
|
||||
:min="1"
|
||||
:step="1"
|
||||
:precision="0"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="showDistributionDay">
|
||||
<a-col a-col :span="24">
|
||||
<a-form-item field="distribution_with_day" label="发放关联天数:">
|
||||
<a-input-number
|
||||
v-model="modalForm.distribution_with_day"
|
||||
:style="{ width: '320px' }"
|
||||
placeholder="请输入发放关联天数"
|
||||
class="input-demo"
|
||||
:step="1"
|
||||
:precision="0"
|
||||
:min="1"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<!-- <a-row :gutter="24">
|
||||
<a-col a-col :span="24">
|
||||
<a-form-item field="brand_id" label="关联品牌:">
|
||||
<a-input-number v-model="modalForm.brand_id" :style="{width:'320px'}" placeholder="请选择关联品牌" class="input-demo" :min="1" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row> -->
|
||||
<a-row :gutter="24" v-if="showProduct">
|
||||
<a-col a-col :span="12">
|
||||
<a-form-item
|
||||
field="product_id"
|
||||
label="关联商品:"
|
||||
:rules="[{ required: true, message: '请选择关联商品' }]"
|
||||
>
|
||||
<a-select
|
||||
multiple
|
||||
v-model="modalForm.product_id"
|
||||
placeholder="请选择关联商品"
|
||||
allow-search
|
||||
:loading="loading"
|
||||
@search="handleGetProduct"
|
||||
>
|
||||
<a-option
|
||||
v-for="item in productList"
|
||||
:key="item.product_id"
|
||||
:value="item.product_id"
|
||||
:label="item.product_name"
|
||||
>
|
||||
{{ item.product_name }}
|
||||
</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col a-col :span="24">
|
||||
<a-form-item field="is_display" label="是否展示:">
|
||||
<a-switch
|
||||
v-model="modalForm.is_display"
|
||||
:checked-value="1"
|
||||
:unchecked-value="0"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col a-col :span="24">
|
||||
<a-form-item field="is_mutex" label="是否互斥:">
|
||||
<a-switch
|
||||
v-model="modalForm.is_mutex"
|
||||
:checked-value="1"
|
||||
:unchecked-value="0"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col a-col :span="24">
|
||||
<a-form-item
|
||||
field="is_reissuable_after_expire"
|
||||
label="过期再次发放:"
|
||||
>
|
||||
<a-switch
|
||||
v-model="modalForm.is_reissuable_after_expire"
|
||||
:checked-value="1"
|
||||
:unchecked-value="0"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="modalForm.coupon_id">
|
||||
<a-col a-col :span="12">
|
||||
<a-form-item
|
||||
field="inquiry_type"
|
||||
label="状态:"
|
||||
:style="{ width: '320px' }"
|
||||
>
|
||||
<a-select
|
||||
placeholder="请选择状态"
|
||||
:disabled="modalForm.coupon_id?true:false"
|
||||
v-model="modalForm.coupon_status"
|
||||
>
|
||||
<!-- 1:正常 2:强制失效 3:结束 4:删除-->
|
||||
<a-option :key="1" :value="1" label="正常">正常</a-option>
|
||||
<a-option :key="2" :value="2" label="强制失效">强制失效</a-option>
|
||||
<a-option :key="3" :value="3" label="结束">结束</a-option>
|
||||
<a-option :key="4" :value="4" label="删除">删除</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col a-col :span="24">
|
||||
<a-form-item field="is_popup" label="是否弹窗:">
|
||||
<a-switch
|
||||
v-model="modalForm.is_popup"
|
||||
:checked-value="1"
|
||||
:unchecked-value="0"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col a-col :span="12">
|
||||
<a-form-item field="coupon_desc" label="优惠劵描述:">
|
||||
<a-textarea
|
||||
v-model="modalForm.coupon_desc"
|
||||
placeholder="请输入优惠劵描述"
|
||||
allow-clear
|
||||
:style="{ minHeight: '100px' }"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="record_data.length>0 && modalForm.coupon_id">
|
||||
<a-col a-col :span="18">
|
||||
<a-form-item field="coupon_desc" label="发放记录:">
|
||||
<a-table
|
||||
:columns="record_columns"
|
||||
:data="record_data"
|
||||
:pagination="false"
|
||||
>
|
||||
<template #grant_type="{ record }">
|
||||
<div v-if="record.grant_type==1">具体用户 </div>
|
||||
<div v-else>未拥有用户 </div>
|
||||
</template>
|
||||
<template #grant_result="{ record }">
|
||||
<!-- 1:成功 2:发放中 3:失败 -->
|
||||
<div v-if="record.grant_result==1">成功 </div>
|
||||
<div v-else-if="record.grant_result==2">发放中</div>
|
||||
<div v-else>失败</div>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
<a-divider />
|
||||
<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 style="margin-right: 8px" v-if="!modalForm.coupon_id">
|
||||
<a-button
|
||||
type="primary"
|
||||
v-has="'admin:sysCouponList:add'"
|
||||
@click="handleAddCoupon"
|
||||
>添加</a-button
|
||||
>
|
||||
</a-space>
|
||||
|
||||
<a-space style="margin-right: 8px" v-else>
|
||||
<a-button
|
||||
type="primary"
|
||||
v-has="'admin:sysCouponList:edit'"
|
||||
|
||||
:disabled="modalForm.coupon_status == 2"
|
||||
@click="handleUpdateCoupon"
|
||||
>修改</a-button
|
||||
>
|
||||
</a-space>
|
||||
<a-space
|
||||
style="margin-right: 8px"
|
||||
v-if="modalForm.coupon_id && modalForm.coupon_status == 1"
|
||||
>
|
||||
<a-button
|
||||
type="primary"
|
||||
v-has="'admin:sysCouponList:force'"
|
||||
status="danger"
|
||||
@click="showCoupon"
|
||||
>强制失效</a-button
|
||||
>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-modal>
|
||||
<isOkCouponModal
|
||||
:isVisible="isVisible"
|
||||
:api="updateCouponStatus"
|
||||
:title="okTitle"
|
||||
:dealType="'status'"
|
||||
:id="modalForm.coupon_id"
|
||||
@closeChangeOk="closeChangeOk"
|
||||
></isOkCouponModal>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, toRefs, watch, getCurrentInstance, defineExpose } from 'vue';
|
||||
import {
|
||||
addCoupon,
|
||||
updateCoupon,
|
||||
getProduct,
|
||||
updateCouponStatus,
|
||||
} from '@/api/coupon/list';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
import dayjs from 'dayjs';
|
||||
const emits = defineEmits(['closeChange', 'changeTimeRange', 'freshDetail','changeValue']);
|
||||
const props = defineProps({
|
||||
// 是否显示
|
||||
modalVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
modalForm: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
});
|
||||
const valid_start_time = ref('');
|
||||
const valid_end_time = ref('');
|
||||
const { modalVisible, modalForm } = toRefs(props);
|
||||
const showManjian = ref(false);
|
||||
const showMinNumber = ref(false);
|
||||
const showConnectType = ref(false);
|
||||
const showProduct = ref(false);
|
||||
const showTimeRange = ref(false);
|
||||
const showValidDay = ref(false);
|
||||
const showDistributionDay = ref(false);
|
||||
const defaultValue = ref([]);
|
||||
const rangeValue = ref([]);
|
||||
const productList = ref([]);
|
||||
const loading = ref(false);
|
||||
const okTitle = ref('');
|
||||
const isVisible = ref(false);
|
||||
const showCoupon = () => {
|
||||
okTitle.value = '确定强制失效吗?';
|
||||
isVisible.value = true;
|
||||
};
|
||||
const record_data = ref([]);
|
||||
const record_columns = [
|
||||
{
|
||||
title: '用户名称',
|
||||
dataIndex: 'user_name',
|
||||
},
|
||||
{
|
||||
title: '操作人',
|
||||
dataIndex: 'useradmin_user_name_name',
|
||||
},
|
||||
{
|
||||
title: '发放类型',
|
||||
dataIndex: 'grant_type',
|
||||
slotName: 'grant_type',
|
||||
},
|
||||
{
|
||||
title: '目标发放数量',
|
||||
dataIndex: 'total_quantity',
|
||||
},
|
||||
{
|
||||
title: '已发放数量',
|
||||
dataIndex: 'grant_quantity',
|
||||
},
|
||||
{
|
||||
title: '发放结果',
|
||||
dataIndex: 'grant_result',
|
||||
slotName: 'grant_result',
|
||||
},
|
||||
{
|
||||
title: '操作时间',
|
||||
dataIndex: 'created_at',
|
||||
slotName: 'created_at',
|
||||
},
|
||||
];
|
||||
const clearDate = () => {
|
||||
valid_start_time.value = '';
|
||||
valid_end_time.value = '';
|
||||
emits('changeTimeRange', {
|
||||
valid_start_time: '',
|
||||
valid_end_time: '',
|
||||
});
|
||||
};
|
||||
//关闭启用弹框
|
||||
const closeChangeOk = () => {
|
||||
isVisible.value = false;
|
||||
modalVisible.value = false;
|
||||
handleClose();
|
||||
emits('freshDetail', {
|
||||
coupon_id: modalForm.value.coupon_id,
|
||||
});
|
||||
};
|
||||
const handleGetProduct = async (name = '', id = '') => {
|
||||
loading.value = true;
|
||||
const { code, data } = await getProduct({
|
||||
product_name: '',
|
||||
product_id: '',
|
||||
limit: 100,
|
||||
});
|
||||
if (code == 200) {
|
||||
productList.value = data;
|
||||
}
|
||||
loading.value = false;
|
||||
};
|
||||
const changeType = (val,flag=true) => {
|
||||
showManjian.value = false;
|
||||
showMinNumber.value = false;
|
||||
if(flag){
|
||||
emits('changeValue','with_amount');
|
||||
emits('changeValue','min_usable_number');
|
||||
}
|
||||
|
||||
if (val == 2) {
|
||||
showManjian.value = true;
|
||||
} else if (val == 3) {
|
||||
showMinNumber.value = true;
|
||||
}
|
||||
};
|
||||
const changeValidType = (val,flag=true) => {
|
||||
showTimeRange.value = false;
|
||||
|
||||
showValidDay.value = false;
|
||||
if(flag){
|
||||
clearDate();
|
||||
emits('changeValue','valid_days');
|
||||
}
|
||||
if (val == 1) {
|
||||
showTimeRange.value = true;
|
||||
if (modalForm.value.valid_start_time) {
|
||||
rangeValue.value = [
|
||||
modalForm.value.valid_start_time,
|
||||
modalForm.value.valid_end_time,
|
||||
];
|
||||
}
|
||||
} else {
|
||||
showValidDay.value = true;
|
||||
}
|
||||
};
|
||||
const changeScope = (val,flag=true) => {
|
||||
showConnectType.value = false;
|
||||
|
||||
showProduct.value = false;
|
||||
|
||||
showManjian.value = false;
|
||||
|
||||
showMinNumber.value = false;
|
||||
|
||||
if(flag){
|
||||
emits('changeValue','inquiry_type');
|
||||
emits('changeValue','product_id');
|
||||
emits('changeValue','with_amount');
|
||||
emits('changeValue','min_usable_number');
|
||||
}
|
||||
if (val == 1) {
|
||||
modalForm.coupon_type == 2 && (showManjian.value = true);
|
||||
modalForm.coupon_type == 3 && (showMinNumber.value = true);
|
||||
} else if (val == 2) {
|
||||
showConnectType.value = true;
|
||||
} else if (val == 5) {
|
||||
showProduct.value = true;
|
||||
handleGetProduct('', modalForm.value.product_id);
|
||||
}
|
||||
};
|
||||
const changeObject = (val,flag=true) => {
|
||||
showDistributionDay.value = false;
|
||||
if(flag){
|
||||
emits('changeValue','distribution_with_day');
|
||||
}
|
||||
|
||||
if (val == 4) {
|
||||
showDistributionDay.value = true;
|
||||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.modalForm,
|
||||
() => {
|
||||
//console.log(props.modalForm);
|
||||
if (props.modalForm.coupon_id) {
|
||||
changeType(props.modalForm.coupon_type,false);
|
||||
changeScope(props.modalForm.application_scope,false);
|
||||
changeObject(props.modalForm.distribution_object,false);
|
||||
changeValidType(props.modalForm.valid_type,false);
|
||||
if (props.modalForm.valid_start_time && props.modalForm.valid_end_time) {
|
||||
defaultValue.value = [
|
||||
props.modalForm.valid_start_time,
|
||||
props.modalForm.valid_end_time,
|
||||
];
|
||||
}
|
||||
if (
|
||||
props.modalForm.coupon_grant &&
|
||||
props.modalForm.coupon_grant.length > 0
|
||||
) {
|
||||
record_data.value = props.modalForm.coupon_grant;
|
||||
}
|
||||
}
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
const onOk = (dateString, date) => {
|
||||
[valid_start_time.value, valid_end_time.value] = dateString;
|
||||
rangeValue.value = [valid_start_time.value, valid_end_time.value];
|
||||
emits('changeTimeRange', {
|
||||
valid_start_time: valid_start_time.value,
|
||||
valid_end_time: valid_end_time.value,
|
||||
});
|
||||
proxy.$refs.modalFormRef.validateField('valid_start_time', (valid) => {
|
||||
if (!valid) {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
const changeStatus = () => {
|
||||
showConnectType.value = false;
|
||||
//emits('changeValue','inquiry_type');
|
||||
showProduct.value = false;
|
||||
//emits('changeValue','product_id');
|
||||
showManjian.value = false;
|
||||
//emits('changeValue','with_amount');
|
||||
showMinNumber.value = false;
|
||||
//emits('changeValue','min_usable_number');
|
||||
showDistributionDay.value = false;
|
||||
//emits('changeValue','distribution_with_day');
|
||||
showTimeRange.value = false;
|
||||
//clearDate();
|
||||
showValidDay.value = false;
|
||||
//emits('changeValue','valid_days');
|
||||
};
|
||||
const handleClose = () => {
|
||||
emits('closeChange', (modalVisible.value = false));
|
||||
proxy.$refs.modalFormRef.resetFields();
|
||||
};
|
||||
const disabledDate = (time) => {
|
||||
return time.getTime() < Date.now() - 8.64e7;
|
||||
};
|
||||
const handleAddCoupon = () => {
|
||||
proxy.$refs.modalFormRef.validate(async (valid) => {
|
||||
if (!valid) {
|
||||
let {
|
||||
coupon_name,
|
||||
coupon_client,
|
||||
coupon_type,
|
||||
distribution_object,
|
||||
application_scope,
|
||||
inquiry_type,
|
||||
is_mutex,
|
||||
is_display,
|
||||
distribution_with_day,
|
||||
min_usable_number,
|
||||
coupon_count,
|
||||
coupon_price,
|
||||
with_amount,
|
||||
valid_type,
|
||||
valid_days,
|
||||
valid_start_time,
|
||||
valid_end_time,
|
||||
product_id,
|
||||
reissue_interval_days,
|
||||
is_reissuable_after_expire,
|
||||
is_popup,
|
||||
coupon_desc,
|
||||
} = props.modalForm;
|
||||
let product_id_arr = [];
|
||||
if (product_id && typeof product_id === 'string') {
|
||||
product_id_arr = product_id.split(',');
|
||||
} else if (product_id && product_id instanceof Array) {
|
||||
product_id_arr = product_id;
|
||||
}
|
||||
let basicObj = {
|
||||
coupon_name,
|
||||
coupon_client,
|
||||
coupon_type,
|
||||
distribution_object,
|
||||
application_scope,
|
||||
coupon_count,
|
||||
coupon_price,
|
||||
reissue_interval_days,
|
||||
is_reissuable_after_expire,
|
||||
is_popup,
|
||||
coupon_desc,
|
||||
valid_type,
|
||||
is_mutex,
|
||||
is_display,
|
||||
};
|
||||
if (showManjian.value) {
|
||||
basicObj.with_amount = with_amount;
|
||||
}
|
||||
if (showMinNumber.value) {
|
||||
basicObj.min_usable_number = min_usable_number;
|
||||
}
|
||||
if (showDistributionDay.value) {
|
||||
basicObj.distribution_with_day = distribution_with_day;
|
||||
}
|
||||
if (showConnectType.value) {
|
||||
basicObj.inquiry_type = inquiry_type;
|
||||
}
|
||||
if (showProduct.value) {
|
||||
basicObj.product_id = product_id_arr;
|
||||
}
|
||||
if (showValidDay.value) {
|
||||
basicObj.valid_days = valid_days;
|
||||
}
|
||||
if (showTimeRange.value) {
|
||||
basicObj.valid_start_time = dayjs(valid_start_time).format(
|
||||
'YYYY-MM-DD HH:mm:ss'
|
||||
);
|
||||
basicObj.valid_end_time = dayjs(valid_end_time).format(
|
||||
'YYYY-MM-DD HH:mm:ss'
|
||||
);
|
||||
}
|
||||
const { code } = await addCoupon(basicObj);
|
||||
if (code == 200) {
|
||||
Message.success('添加成功');
|
||||
handleClose();
|
||||
} else {
|
||||
proxy.$notification.error(response.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const handleUpdateCoupon = async () => {
|
||||
proxy.$refs.modalFormRef.validate(async (valid) => {
|
||||
if (!valid) {
|
||||
let {
|
||||
coupon_id,
|
||||
coupon_name,
|
||||
coupon_client,
|
||||
coupon_type,
|
||||
distribution_object,
|
||||
application_scope,
|
||||
inquiry_type,
|
||||
is_mutex,
|
||||
is_display,
|
||||
distribution_with_day,
|
||||
min_usable_number,
|
||||
coupon_count,
|
||||
coupon_price,
|
||||
with_amount,
|
||||
valid_type,
|
||||
valid_days,
|
||||
valid_start_time,
|
||||
valid_end_time,
|
||||
product_id,
|
||||
reissue_interval_days,
|
||||
is_reissuable_after_expire,
|
||||
is_popup,
|
||||
coupon_desc,
|
||||
} = props.modalForm;
|
||||
let product_id_arr = [];
|
||||
console.log(product_id);
|
||||
if (product_id && typeof product_id === 'string') {
|
||||
product_id_arr = product_id.split(',');
|
||||
} else if (product_id && product_id instanceof Array) {
|
||||
product_id_arr = product_id;
|
||||
}
|
||||
let basicObj = {
|
||||
coupon_name,
|
||||
coupon_client,
|
||||
coupon_type,
|
||||
distribution_object,
|
||||
application_scope,
|
||||
coupon_count,
|
||||
coupon_price,
|
||||
reissue_interval_days,
|
||||
is_reissuable_after_expire,
|
||||
is_popup,
|
||||
coupon_desc,
|
||||
valid_type,
|
||||
is_mutex,
|
||||
is_display,
|
||||
};
|
||||
if (showManjian.value) {
|
||||
basicObj.with_amount = with_amount;
|
||||
}
|
||||
if (showMinNumber.value) {
|
||||
basicObj.min_usable_number = min_usable_number;
|
||||
}
|
||||
if (showDistributionDay.value) {
|
||||
basicObj.distribution_with_day = distribution_with_day;
|
||||
}
|
||||
if (showConnectType.value) {
|
||||
basicObj.inquiry_type = inquiry_type;
|
||||
}
|
||||
if (showProduct.value) {
|
||||
basicObj.product_id = product_id_arr;
|
||||
}
|
||||
if (showValidDay.value) {
|
||||
basicObj.valid_days = valid_days;
|
||||
}
|
||||
if (showTimeRange.value) {
|
||||
basicObj.valid_start_time = valid_start_time;
|
||||
basicObj.valid_end_time = valid_end_time;
|
||||
}
|
||||
const { code } = await updateCoupon(coupon_id, basicObj);
|
||||
if (code == 200) {
|
||||
Message.success('修改成功');
|
||||
|
||||
handleClose();
|
||||
} else {
|
||||
proxy.$notification.error(response.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const rules = {
|
||||
coupon_name: [{ required: true, message: '请输入优惠劵名称' }],
|
||||
coupon_client: [{ required: true, message: '请选择使用平台' }],
|
||||
application_scope: [{ required: true, message: '请选择使用范围' }],
|
||||
coupon_type: [{ required: true, message: '请选择发放类型' }],
|
||||
distribution_object: [{ required: true, message: '请选择发放对象' }],
|
||||
valid_type: [{ required: true, message: '请选择有效类型' }],
|
||||
coupon_count:[{ required: true, message: '请输入发放数量' }],
|
||||
coupon_price:[{ required: true, message: '请输入优惠劵金额' }]
|
||||
};
|
||||
defineExpose({
|
||||
changeStatus,
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
||||
@ -27,8 +27,8 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="modalForm.mobile_mask">
|
||||
<a-col :span="12">
|
||||
<a-row :gutter="24" v-if="modalForm.mobile_mask || modalForm.created_at">
|
||||
<a-col :span="12" v-if="modalForm.mobile_mask">
|
||||
<a-form-item field="idCard" label="手机号码:" >
|
||||
<div class="box" v-show="!family_Eye">
|
||||
<div class="cardNum">{{modalForm.mobile_mask}}</div>
|
||||
@ -40,6 +40,14 @@
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="idCard" label="绑定时间:" >
|
||||
<div class="box" >
|
||||
<div class="cardNum">{{modalForm.created_at}}</div>
|
||||
</div>
|
||||
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider />
|
||||
<div class="titlebox">
|
||||
|
||||
134
src/components/giveCouponModal.vue
Normal file
134
src/components/giveCouponModal.vue
Normal file
@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<a-modal v-model:visible="giveVisible" :modal-style="{width:'420px'}" body-class="okmodal" @ok="handleConfirm"
|
||||
@cancel="handleClose" >
|
||||
<template #title>
|
||||
发放优惠劵
|
||||
</template>
|
||||
<a-form :model="modalForm" :rules="rules" ref="modalFormRef" size="medium" label-align="left" auto-label-width>
|
||||
<a-form-item field="type" label="发放类型" >
|
||||
<!-- 1:具体用户 2:全部用户 -->
|
||||
<a-select
|
||||
placeholder="请选择发放类型"
|
||||
v-model="modalForm.type"
|
||||
@change="changeType"
|
||||
>
|
||||
<a-option :key="1" :value="1" label="具体用户">具体用户</a-option>
|
||||
<a-option :key="2" :value="2" label="全部用户">全部用户</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="user_id" label="选择用户" v-if="showType" :rules="[{required: true,message:'请选择用户'}]">
|
||||
<a-select
|
||||
allow-search
|
||||
:loading="loading" @search="handleList"
|
||||
placeholder="请选择选择用户"
|
||||
v-model="modalForm.user_id"
|
||||
>
|
||||
<a-option :key="item.user_id" :value="item.user_id" :label="item.user_name
|
||||
" v-for="item in patientList" >{{item.user_name}}</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="total_quantity" label="总发放数量" >
|
||||
<a-input-number v-model="modalForm.total_quantity" placeholder="请输入总发放数量" size="large" :min="0" />
|
||||
</a-form-item>
|
||||
<a-form-item field="single_quantity" label="个人可发放数量" >
|
||||
<a-input-number v-model="modalForm.single_quantity" placeholder="请输入个人可发放数量" size="large" :min="0" />
|
||||
</a-form-item>
|
||||
<a-form-item field="is_follow_rules" label="是否遵循优惠劵发放对象规则" >
|
||||
<a-switch v-model="modalForm.is_follow_rules" :checked-value="1" :unchecked-value="0"/>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<template #footer>
|
||||
<a-button @click="handleClose"><template #icon><icon-close /></template>取消</a-button>
|
||||
<a-button type="primary" @click="handleConfirm"><template #icon><icon-check /></template>确认</a-button>
|
||||
</template>
|
||||
|
||||
</a-modal>
|
||||
</template>
|
||||
<script setup>
|
||||
import {ref, reactive, toRefs, getCurrentInstance,defineExpose} from 'vue';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import{ giveCoupon ,getPatientList} from "@/api/coupon/list"
|
||||
const { proxy } = getCurrentInstance();
|
||||
const patientList=ref([]);
|
||||
const loading=ref(false);
|
||||
const modalForm = reactive({
|
||||
type: '',
|
||||
total_quantity:null,
|
||||
single_quantity:null,
|
||||
is_follow_rules:0
|
||||
});
|
||||
const props = defineProps({
|
||||
// 是否显示
|
||||
giveVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
id:{
|
||||
type: String,
|
||||
default:'',
|
||||
}
|
||||
});
|
||||
const emits = defineEmits(['closeGiVe']);
|
||||
const {giveVisible,id} = toRefs(props);
|
||||
const showType=ref(false);
|
||||
// Akiraka 20230210 关闭弹窗
|
||||
const handleClose = () => {
|
||||
emits('closeGiVe',false);
|
||||
|
||||
}
|
||||
const changeType=(val)=>{
|
||||
showType.value=false;
|
||||
if(val==1){
|
||||
showType.value=true;
|
||||
}
|
||||
};
|
||||
const handleList=async(name='')=>{
|
||||
loading.value=true;
|
||||
const {code,data}=await getPatientList({
|
||||
user_name:name
|
||||
})
|
||||
if(code==200){
|
||||
patientList.value=data;
|
||||
}
|
||||
loading.value=false;
|
||||
}
|
||||
const changeStatus=()=>{
|
||||
showType.value=false;
|
||||
handleList();
|
||||
proxy.$refs.modalFormRef.resetFields();
|
||||
};
|
||||
// Akiraka 20230210 删除数据校验
|
||||
const rules = reactive({
|
||||
type: [{ required: true, message: '请选择发放类型' }],
|
||||
total_quantity:[{ required: true, message: '请选择总发放数量' }],
|
||||
single_quantity:[{ required: true, message: '请选择个人可发放数量' }]
|
||||
});
|
||||
// Akiraka 20230210 确认按钮 => 开始数据检查
|
||||
const handleConfirm = () => {
|
||||
proxy.$refs.modalFormRef.validate(async(valid) => {
|
||||
if (!valid) {
|
||||
const {code}= await giveCoupon(id.value,modalForm);
|
||||
if(code==200){
|
||||
Message.success("发放成功");
|
||||
proxy.$refs.modalFormRef.resetFields();
|
||||
}else{
|
||||
proxy.$notification.error(response.message);
|
||||
}
|
||||
emits('closeGiVe',true);
|
||||
// api.value(id.value,form).then(response => {
|
||||
// // Akiraka 20230210 关闭弹窗
|
||||
// if(response.code==200){
|
||||
// Message.success("取消成功");
|
||||
// proxy.$refs.modalFormRef.resetFields();
|
||||
// }else{
|
||||
// proxy.$notification.error(response.message);
|
||||
// }
|
||||
// emits('closeGiVe',true);
|
||||
// })
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
changeStatus
|
||||
});
|
||||
</script>
|
||||
315
src/components/hospitalDetailModal.vue
Normal file
315
src/components/hospitalDetailModal.vue
Normal file
@ -0,0 +1,315 @@
|
||||
<template>
|
||||
<!-- Modal -->
|
||||
<a-modal
|
||||
v-model:visible="modalVisible"
|
||||
fullscreen
|
||||
:title="title"
|
||||
title-align="start"
|
||||
:footer="false"
|
||||
@cancel="handleClose"
|
||||
>
|
||||
<div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">基本信息</div>
|
||||
</div>
|
||||
<a-form
|
||||
:model="modalForm"
|
||||
ref="modalFormRef"
|
||||
:auto-label-width="true"
|
||||
:rules="rules"
|
||||
>
|
||||
<a-row :gutter="24" style="margin-top: 35px">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="hospital_name" label="医院名称:">
|
||||
<a-input
|
||||
v-model="modalForm.hospital_name"
|
||||
placeholder="请输入医院名称"
|
||||
:style="{ width: '250px' }"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="county_id" label="选择省市区:">
|
||||
<div class="row">
|
||||
<a-select
|
||||
v-model="modalForm.province_id"
|
||||
placeholder="请选择省份"
|
||||
:style="{ width: '162px', marginRight: '10px' }"
|
||||
@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
|
||||
>
|
||||
</a-select>
|
||||
|
||||
<a-select
|
||||
v-model="modalForm.city_id"
|
||||
placeholder="请选择城市"
|
||||
:style="{ width: '162px', marginRight: '10px' }"
|
||||
@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
|
||||
>
|
||||
</a-select>
|
||||
<a-select
|
||||
v-model="modalForm.county_id"
|
||||
placeholder="请选择区县"
|
||||
:style="{ width: '182px' }"
|
||||
>
|
||||
<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
|
||||
>
|
||||
</a-select>
|
||||
</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="address" label="详细地址:">
|
||||
<a-input
|
||||
v-model="modalForm.address"
|
||||
placeholder="请输入详细地址"
|
||||
:style="{ width: '250px' }"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="hospital_level_name" label="医院等级:">
|
||||
<a-select
|
||||
v-model="modalForm.hospital_level_name"
|
||||
placeholder="请选择药品类型"
|
||||
:style="{ width: '182px' }"
|
||||
>
|
||||
<a-option value="一级">一级</a-option>
|
||||
<a-option value="二级">二级</a-option>
|
||||
<a-option value="三级">三级</a-option>
|
||||
<a-option value="三甲">三甲</a-option>
|
||||
<a-option value="其他">其他</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="tele_phone" label="电话:">
|
||||
<a-input
|
||||
v-model="modalForm.tele_phone"
|
||||
placeholder="请输入电话"
|
||||
:style="{ width: '250px' }"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="post_code" label="邮政编码:">
|
||||
<a-input
|
||||
v-model="modalForm.post_code"
|
||||
placeholder="请输入邮政编码"
|
||||
:style="{ width: '250px' }"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="desc" label="描述:">
|
||||
<a-textarea
|
||||
v-model="modalForm.desc"
|
||||
:auto-size="{
|
||||
minRows: 2,
|
||||
maxRows: 5,
|
||||
}"
|
||||
/>
|
||||
</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:sysHospitalList:save'"
|
||||
>保存</a-button
|
||||
>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-modal>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, toRefs, watch, getCurrentInstance } from 'vue';
|
||||
import { getAreaList, addHospital, updateHospital } from '@/api/basic/list';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const props = defineProps({
|
||||
// 是否显示
|
||||
modalVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
modalForm: {
|
||||
type: Object,
|
||||
},
|
||||
});
|
||||
const title = ref('');
|
||||
const emits = defineEmits(['familyVisibleChange', 'freshDetail']);
|
||||
const { modalVisible, modalForm } = toRefs(props);
|
||||
const provinceData = ref([]);
|
||||
const cityData = ref([]);
|
||||
const countryData = ref([]);
|
||||
|
||||
//获取区域列表
|
||||
const handelAreaList = (area_id = '', parent_id = '', area_type) => {
|
||||
getAreaList({
|
||||
area_id,
|
||||
area_type,
|
||||
parent_id,
|
||||
}).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;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
//切换省份
|
||||
const changeProvice = (value) => {
|
||||
modalForm.city_id = '';
|
||||
modalForm.county_id = '';
|
||||
handelAreaList('', value, 3);
|
||||
};
|
||||
//切换省份
|
||||
const changeCity = (value) => {
|
||||
modalForm.county_id = '';
|
||||
handelAreaList('', value, 4);
|
||||
};
|
||||
watch(
|
||||
() => props.id,
|
||||
() => {
|
||||
if (props.id) {
|
||||
title.value = '编辑医院';
|
||||
} else {
|
||||
title.value = '修改医院';
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const rules = {
|
||||
hospital_name: [{ required: true, message: '请输入医院名称' }],
|
||||
county_id: [{ required: true, message: '请选择省市区' }],
|
||||
hospital_level_name: [{ required: true, message: '请选择医院等级' }],
|
||||
address: [{ required: true, message: '请输入详细地址' }],
|
||||
};
|
||||
const handleSubmit = () => {
|
||||
proxy.$refs.modalFormRef.validate(async (valid) => {
|
||||
let data = null;
|
||||
let {
|
||||
hospital_name,
|
||||
hospital_status,
|
||||
hospital_level_name,
|
||||
post_code,
|
||||
tele_phone,
|
||||
province_id,
|
||||
city_id,
|
||||
county_id,
|
||||
address,
|
||||
desc,
|
||||
} = modalForm.value;
|
||||
if (!valid) {
|
||||
if (props.id) {
|
||||
data = await updateHospital(props.id, {
|
||||
hospital_name,
|
||||
hospital_status,
|
||||
hospital_level_name,
|
||||
post_code,
|
||||
tele_phone,
|
||||
province_id,
|
||||
city_id,
|
||||
county_id,
|
||||
address,
|
||||
desc,
|
||||
});
|
||||
} else {
|
||||
data = await addHospital({
|
||||
hospital_name,
|
||||
hospital_status,
|
||||
hospital_level_name,
|
||||
post_code,
|
||||
tele_phone,
|
||||
province_id,
|
||||
city_id,
|
||||
county_id,
|
||||
address,
|
||||
desc,
|
||||
});
|
||||
}
|
||||
if (data.code == 200) {
|
||||
props.id
|
||||
? proxy.$message.success('修改成功')
|
||||
: proxy.$message.success('添加成功');
|
||||
emits('freshDetail');
|
||||
}
|
||||
handleClose();
|
||||
emits('freshDetail');
|
||||
} else {
|
||||
console.log(valid);
|
||||
proxy.$message.error('表单校验失败');
|
||||
//done(false);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Akiraka 20230210 关闭弹窗
|
||||
const handleClose = () => {
|
||||
proxy.$refs.modalFormRef.resetFields();
|
||||
emits('familyVisibleChange', false);
|
||||
};
|
||||
const getData = (flag = false) => {
|
||||
handelAreaList('', '', 2);
|
||||
if (flag) {
|
||||
handelAreaList('', modalForm.value.province_id, 3);
|
||||
handelAreaList('', modalForm.value.city_id, 4);
|
||||
}
|
||||
};
|
||||
defineExpose({
|
||||
getData,
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.row {
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
@ -51,7 +51,7 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="inquiry_mode" label="问诊类型:">
|
||||
<a-form-item field="inquiry_mode" label="问诊方式:">
|
||||
<span>{{ formatMode(modalForm.inquiry_mode) }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@ -311,7 +311,6 @@ const handleClose = () => {
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
.headImg {
|
||||
margin-right: 20px;
|
||||
border-radius: 50%;
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="coupon_amount_total" label="优惠卷:">
|
||||
<a-form-item field="coupon_amount_total" label="优惠劵:">
|
||||
<span v-if="modalForm.coupon_amount_total>0">{{modalForm.coupon_amount_total}}元</span>
|
||||
<span v-else>无</span>
|
||||
</a-form-item>
|
||||
|
||||
56
src/components/isOkCouponModal.vue
Normal file
56
src/components/isOkCouponModal.vue
Normal file
@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<a-modal v-model:visible="isVisible" :modal-style="{width:'420px'}" body-class="okmodal" @ok="handleConfirm"
|
||||
@cancel="handleClose" >
|
||||
<template #title>
|
||||
提示
|
||||
</template>
|
||||
{{ title }}
|
||||
<!-- <template #footer>
|
||||
<a-button @click="handleClose"><template #icon><icon-close /></template>取消</a-button>
|
||||
<a-button type="primary" @click="handleConfirm"><template #icon><icon-check /></template>确认</a-button>
|
||||
</template> -->
|
||||
|
||||
</a-modal>
|
||||
</template>
|
||||
<script setup>
|
||||
import {toRefs, getCurrentInstance } from 'vue';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const props = defineProps({
|
||||
// 是否显示
|
||||
isVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
id:{
|
||||
type: String,
|
||||
default:'',
|
||||
},
|
||||
// 更新接口
|
||||
api: {
|
||||
type: Function,
|
||||
},
|
||||
title:{
|
||||
type: String,
|
||||
default:'',
|
||||
}
|
||||
});
|
||||
const emits = defineEmits(['closeChangeOk']);
|
||||
const {isVisible,title,id,api} = toRefs(props);
|
||||
// Akiraka 20230210 关闭弹窗
|
||||
const handleClose = () => {
|
||||
emits('closeChangeOk',false);
|
||||
}
|
||||
|
||||
// Akiraka 20230210 确认按钮 => 开始数据检查
|
||||
const handleConfirm = async () => {
|
||||
const data=await api.value(id.value,{coupon_status:2})
|
||||
if(data.code==200){
|
||||
Message.success("成功");
|
||||
//proxy.$refs.modalFormRef.resetFields();
|
||||
}else{
|
||||
proxy.$notification.error(response.message);
|
||||
}
|
||||
emits('closeChangeOk',true);
|
||||
}
|
||||
</script>
|
||||
811
src/components/medinceOrderModal.vue
Normal file
811
src/components/medinceOrderModal.vue
Normal file
@ -0,0 +1,811 @@
|
||||
<template>
|
||||
<a-modal
|
||||
v-model:visible="medinceVisible"
|
||||
fullscreen
|
||||
title="药品订单详情"
|
||||
title-align="start"
|
||||
:auto-label-width="true"
|
||||
:footer="false"
|
||||
@cancel="handleClose"
|
||||
>
|
||||
<div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">订单信息</div>
|
||||
</div>
|
||||
<a-form :model="modalForm" ref="modalFormRef" :auto-label-width="true">
|
||||
<a-row :gutter="24" style="margin-top: 35px">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="inquiry_no" label="订单编号:">
|
||||
<span>{{ modalForm.order_product_no }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="order_product_status" label="处方编号:">
|
||||
<span v-if="modalForm.order_prescription">{{
|
||||
modalForm.order_prescription.prescription_code
|
||||
}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="user.created_at" label="下单时间:">
|
||||
<span>{{ modalForm.created_at }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="pay_time" label="支付时间:">
|
||||
<span v-if="parseTime(modalForm.pay_time)">{{
|
||||
parseTime(modalForm.pay_time)
|
||||
}}</span>
|
||||
<span v-else>-</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="amount_total" label="订单金额:">
|
||||
<span>{{ modalForm.amount_total }}元</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="logistics_fee" label="邮费:">
|
||||
<span>{{ modalForm.logistics_fee }}元</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12" >
|
||||
<a-form-item field="amount_total" label="优惠劵:">
|
||||
<span>{{modalForm.order_product_coupon?'-'+modalForm.order_product_coupon.coupon_use_price:0}}元</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="logistics_fee" label="优惠金额:">
|
||||
<span>{{ modalForm.discount_amount>0?'-'+modalForm.discount_amount:0 }}元</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="payment_amount_total" label="实付金额:">
|
||||
<span>{{ modalForm.payment_amount_total }}元</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="order_product_status" label="订单状态:">
|
||||
<span>{{
|
||||
formatProductStatus(modalForm.order_product_status)
|
||||
}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="modalForm.cancel_reason">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="department_custom_name" label="备 注 :">
|
||||
<span>{{
|
||||
formatProductCancelReason(modalForm.cancel_reason)
|
||||
}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider />
|
||||
<div class="titlebox" v-if="modalForm.order_product_refund">
|
||||
<div class="bar"></div>
|
||||
<div class="name">退款信息</div>
|
||||
</div>
|
||||
<a-row
|
||||
:gutter="24"
|
||||
style="margin-top: 35px"
|
||||
v-if="modalForm.order_product_refund"
|
||||
>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="inquiry_refund_no" label="退款编号:">
|
||||
<span>{{ modalForm.order_product_refund.product_refund_no }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="escrow_trade_no" label=" 第三方订单编号:">
|
||||
<span>{{ modalForm.order_product_refund.refund_id }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="modalForm.order_product_refund">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="inquiry_refund_no" label="退款金额:">
|
||||
<span>{{ modalForm.order_product_refund.refund_total }}元</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="escrow_trade_no" label="退款状态:">
|
||||
<span>{{
|
||||
formatRefundStatus(
|
||||
modalForm.order_product_refund.product_refund_status
|
||||
)
|
||||
}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="modalForm.order_product_refund">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="inquiry_refund_no" label="退款时间:">
|
||||
<span
|
||||
v-if="parseTime(modalForm.order_product_refund.success_time)"
|
||||
>{{ modalForm.order_product_refund.success_time }}</span
|
||||
>
|
||||
<span v-else>-</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="modalForm.order_product_refund">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="inquiry_refund_no" label="退款原因:">
|
||||
<span>{{ modalForm.order_product_refund.refund_reason }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider v-if="modalForm.order_product_refund" />
|
||||
<div class="titlebox" v-if="modalForm.order_product_item && modalForm.order_product_item.length > 0">
|
||||
<div class="bar"></div>
|
||||
<div class="name">药品信息</div>
|
||||
</div>
|
||||
<a-row
|
||||
:gutter="24"
|
||||
style="margin-top: 35px"
|
||||
v-if="
|
||||
modalForm.order_product_item &&
|
||||
modalForm.order_product_item.length > 0
|
||||
"
|
||||
>
|
||||
<a-col :span="24">
|
||||
<a-form-item field="license_cert" :hide-label="true">
|
||||
<a-list>
|
||||
<a-list-item
|
||||
v-for="item in modalForm.order_product_item"
|
||||
:key="item.product_item_id"
|
||||
>
|
||||
<a-list-item-meta
|
||||
:title="item.product_name + item.product_spec"
|
||||
:description="item.manufacturer + '*' + item.amount"
|
||||
>
|
||||
<template #avatar>
|
||||
<a-avatar shape="square">
|
||||
<img
|
||||
alt="avatar"
|
||||
src="https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
|
||||
/>
|
||||
</a-avatar>
|
||||
</template>
|
||||
</a-list-item-meta>
|
||||
</a-list-item>
|
||||
</a-list>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider
|
||||
v-if="
|
||||
modalForm.order_product_item &&
|
||||
modalForm.order_product_item.length > 0
|
||||
"
|
||||
/>
|
||||
<div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">地址信息</div>
|
||||
<a-space
|
||||
style="
|
||||
margin-right: 8px;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
"
|
||||
>
|
||||
<a-button type="primary" status="warning" @click="toggleAddress">{{
|
||||
lookAllAddress ? '隐藏完整地址信息' : '查看完整地址信息'
|
||||
}}</a-button>
|
||||
</a-space>
|
||||
</div>
|
||||
<a-row :gutter="24" style="margin-top: 35px">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="inquiry_no" label="收货人姓名:">
|
||||
<span v-if="!lookAllAddress">
|
||||
{{ modalForm.consignee_name_mask }}</span
|
||||
>
|
||||
<span v-else>{{ AddressData.consignee_name }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="inquiry_no" label="收货人电话:">
|
||||
<span v-if="!lookAllAddress">
|
||||
{{ modalForm.consignee_tel_mask }}</span
|
||||
>
|
||||
<span v-else>{{ AddressData.consignee_tel }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="inquiry_no" label="收货人地址:">
|
||||
<span v-if="!lookAllAddress"> {{ modalForm.address_mask }}</span>
|
||||
<span v-else>{{ AddressData.address }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider />
|
||||
<div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">物流信息</div>
|
||||
</div>
|
||||
<a-row v-if="modalForm.order_product_logistics" style="margin-top: 35px">
|
||||
<a
|
||||
:href="
|
||||
'https://www.baidu.com/s?ie=UTF-8&wd=' +
|
||||
modalForm.order_product_logistics.logistics_no
|
||||
"
|
||||
target="_blank"
|
||||
class="express"
|
||||
><span>物流单号:</span
|
||||
>{{ modalForm.order_product_logistics.logistics_no }}</a
|
||||
>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="license_cert" :hide-label="true">
|
||||
<div class="timeline" v-if="modalForm.order_product_logistics">
|
||||
<a-timeline>
|
||||
<a-timeline-item
|
||||
:label="item.time"
|
||||
:dotColor="formatColor(item.status)"
|
||||
v-for="item in cur_express"
|
||||
>
|
||||
{{ item.context }}
|
||||
</a-timeline-item>
|
||||
</a-timeline>
|
||||
<a-button @click="toggleExpand" class="expand">{{
|
||||
isExpand ? '收起' : '展开'
|
||||
}}</a-button>
|
||||
</div>
|
||||
<div v-else>暂无物流信息</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-divider />
|
||||
<div class="titlebox" v-if="modalForm.order_prescription">
|
||||
<div class="bar"></div>
|
||||
<div class="name">处方信息</div>
|
||||
</div>
|
||||
<a-row
|
||||
:gutter="24"
|
||||
style="margin-top: 35px"
|
||||
v-if="modalForm.order_prescription"
|
||||
>
|
||||
<a-col :span="24">
|
||||
<a-form-item field="license_cert" :hide-label="true">
|
||||
<tableUnit
|
||||
:pagination="false"
|
||||
:columns="chufang_columns"
|
||||
:data="chufang_data"
|
||||
></tableUnit>
|
||||
<!-- <prescription :data="modalForm.order_prescription"></prescription> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider v-if="modalForm.order_prescription" />
|
||||
<div class="titlebox" v-if="modalForm.user_doctor">
|
||||
<div class="bar"></div>
|
||||
<div class="name">医生信息</div>
|
||||
<a-space
|
||||
style="
|
||||
margin-right: 8px;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
"
|
||||
>
|
||||
<a-button type="primary" @click="openDcotor"
|
||||
>查看医生完整信息</a-button
|
||||
>
|
||||
</a-space>
|
||||
</div>
|
||||
<a-row :gutter="24" style="margin-top: 35px">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="license_cert" :hide-label="true">
|
||||
<div class="doctorInfo" v-if="modalForm.user_doctor">
|
||||
<a-space size="large">
|
||||
<a-image
|
||||
width="80"
|
||||
height="80"
|
||||
class="headImg"
|
||||
:src="modalForm.user_doctor.avatar"
|
||||
v-if="modalForm.user_doctor.avatar"
|
||||
>
|
||||
</a-image>
|
||||
<a-image
|
||||
width="80"
|
||||
height="80"
|
||||
class="headImg"
|
||||
src="https://img.applets.igandanyiyuan.com/basic/file/doctor_avatar.png"
|
||||
v-else
|
||||
>
|
||||
</a-image>
|
||||
</a-space>
|
||||
<div class="infobox">
|
||||
<div class="name">
|
||||
{{ modalForm.user_doctor.user_name }} {{
|
||||
formatDoctorTitle(modalForm.user_doctor.doctor_title)
|
||||
}}
|
||||
</div>
|
||||
<div class="hospital">
|
||||
{{
|
||||
modalForm.user_doctor.hospital.hospital_name
|
||||
}} {{
|
||||
modalForm.user_doctor.department_custom_name
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="doctorInfo" v-else>暂未分配到医生</div>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider v-if="modalForm.user_doctor" />
|
||||
<div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">就诊人信息</div>
|
||||
<a-space
|
||||
style="
|
||||
margin-right: 8px;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
"
|
||||
>
|
||||
<a-button type="primary" status="warning" @click="openPatient"
|
||||
>查看就诊人完整信息</a-button
|
||||
>
|
||||
</a-space>
|
||||
</div>
|
||||
<a-row
|
||||
:gutter="24"
|
||||
style="margin-top: 35px"
|
||||
v-if="modalForm.order_inquiry_case"
|
||||
>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="就诊人姓名:">
|
||||
<span
|
||||
>{{ modalForm.order_inquiry_case.name }} ({{
|
||||
modalForm.order_inquiry_case.sex == 1 ? '男' : '女'
|
||||
}} {{ modalForm.order_inquiry_case.age }}岁)</span
|
||||
>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="modalForm.order_inquiry_case">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="inquiry_no" label="病情描述:">
|
||||
<span>{{ modalForm.order_inquiry_case.disease_desc }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="modalForm.order_inquiry_case">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="inquiry_no" label="确诊疾病:">
|
||||
<span
|
||||
>{{
|
||||
modalForm.order_inquiry_case.disease_class_name
|
||||
}} {{
|
||||
modalForm.user_doctor.department_custom_name
|
||||
}}</span
|
||||
>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider />
|
||||
<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="inquiry_no" label="上报状态:">
|
||||
<span> {{ fromatReportStatus(modalForm.report_pre_status) }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="inquiry_no" label="上报时间:">
|
||||
<span v-if="parseTime(modalForm.report_pre_time)">
|
||||
{{ modalForm.report_pre_time }}</span
|
||||
>
|
||||
<span v-else>-</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="modalForm.report_pre_fail_reason">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="inquiry_no" label="上报失败原因:">
|
||||
<span> {{ modalForm.report_pre_fail_reason }}</span>
|
||||
</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
|
||||
style="margin-right: 8px"
|
||||
v-if="
|
||||
modalForm.report_pre_status == 2 &&
|
||||
modalForm.refund_status != 2 &&
|
||||
modalForm.refund_status != 3
|
||||
"
|
||||
>
|
||||
<a-button
|
||||
type="primary"
|
||||
v-has="'admin:sysProductList:report'"
|
||||
@click="
|
||||
() => {
|
||||
isVisible = true;
|
||||
order_product_id = modalForm.order_product_id;
|
||||
}
|
||||
"
|
||||
>上报处方平台</a-button
|
||||
>
|
||||
</a-space>
|
||||
<!-- {{(modalForm.order_product_status == 2 && modalForm.pay_status==2
|
||||
&& (modalForm.refund_status==4 || modalForm.refund_status==5 || modalForm.refund_status==0) &&
|
||||
modalForm.report_pre_status != 1 )}} -->
|
||||
<!-- 订单状态=2退款状态=4,5支付状态=2上报状态!=1 -->
|
||||
<a-space
|
||||
style="margin-right: 8px"
|
||||
v-if="
|
||||
modalForm.order_product_status == 2 &&
|
||||
modalForm.pay_status == 2 &&
|
||||
(modalForm.refund_status == 4 ||
|
||||
modalForm.refund_status == 5 ||
|
||||
modalForm.refund_status == 0) &&
|
||||
modalForm.report_pre_status != 1
|
||||
"
|
||||
>
|
||||
<a-button
|
||||
type="primary"
|
||||
v-has="'admin:sysProductList:cancel'"
|
||||
status="danger"
|
||||
|
||||
@click="
|
||||
() => {
|
||||
okVisible = true;
|
||||
cur_product_id = modalForm.order_product_id;
|
||||
}
|
||||
"
|
||||
>取消药品订单</a-button
|
||||
>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-modal>
|
||||
<!-- 医生详情弹框 -->
|
||||
<doctorModal
|
||||
:doctorVisible="doctorVisible"
|
||||
:doctor_id="doctor_id"
|
||||
@doctorVisibleChange="
|
||||
() => {
|
||||
doctorVisible = false;
|
||||
doctor_id = '';
|
||||
}
|
||||
"
|
||||
></doctorModal>
|
||||
<!-- 患者详情弹窗 -->
|
||||
<patientModal
|
||||
:patientVisible="patientVisible"
|
||||
:data="patientData"
|
||||
@patientVisibleChange="
|
||||
() => {
|
||||
patientVisible = false;
|
||||
}
|
||||
"
|
||||
></patientModal>
|
||||
<confirmModal
|
||||
:okVisible="okVisible"
|
||||
:api="cancelProduct"
|
||||
:dealType="'order_inquiry_id'"
|
||||
:payment_amount_total="modalForm.payment_amount_total
|
||||
" :type="''"
|
||||
:id="cur_product_id"
|
||||
@closeChange="closeChange"
|
||||
></confirmModal>
|
||||
<isOkModal
|
||||
:isVisible="isVisible"
|
||||
:api="reportPrePscription"
|
||||
:title="'确定上报处方吗?'"
|
||||
:dealType="'order_product_id'"
|
||||
:id="order_product_id"
|
||||
@closeChangeOk="closeChangeOk"
|
||||
></isOkModal>
|
||||
</template>
|
||||
<script setup>
|
||||
import { reactive, ref, getCurrentInstance, watch, toRefs } from 'vue';
|
||||
import {
|
||||
productList,
|
||||
getProductDetail,
|
||||
cancelProduct,
|
||||
reportPrePscription,
|
||||
lookAddress,
|
||||
inquiryCase,
|
||||
} from '@/api/order/list';
|
||||
import { parseTime } from '@/utils/parseTime';
|
||||
import {
|
||||
formatDoctorTitle,
|
||||
fromatReportStatus,
|
||||
formatPrescriptionStatus,
|
||||
formatPharmacistStatus,
|
||||
formatProductCancelReason,
|
||||
} from '@/utils/format';
|
||||
|
||||
const props = defineProps({
|
||||
// 是否显示
|
||||
medinceVisible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
showCancelOrderBtn:{
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
modalForm: {
|
||||
type: Object,
|
||||
default: {
|
||||
order_product_refund: {},
|
||||
order_product_item: [],
|
||||
order_product_logistics: null,
|
||||
user_doctor: null,
|
||||
order_prescription: null,
|
||||
},
|
||||
},
|
||||
});
|
||||
const { medinceVisible, modalForm,showCancelOrderBtn } = toRefs(props);
|
||||
const IMG_URL = import.meta.env.VITE_IMG_URL;
|
||||
const emits = defineEmits(['medinceVisibleChange']);
|
||||
|
||||
// Akiraka 20230210 监听删除事件
|
||||
const okVisible = ref(false);
|
||||
const cur_product_id = ref('');
|
||||
const doctorVisible = ref(false);
|
||||
const doctor_id = ref('');
|
||||
const isVisible = ref(false);
|
||||
const order_product_id = ref('');
|
||||
let express = []; //物流信息;
|
||||
const cur_express = ref([]);
|
||||
const isExpand = ref(false);
|
||||
const patientVisible = ref(false);
|
||||
const patientData = reactive({});
|
||||
const lookAllAddress = ref(false);
|
||||
const AddressData = reactive({});
|
||||
let chufang_data = ref([]);
|
||||
const chufang_columns = reactive([
|
||||
{
|
||||
title: '处方编号',
|
||||
dataIndex: 'prescription_code',
|
||||
},
|
||||
{
|
||||
title: '处方状态',
|
||||
dataIndex: 'prescription_status',
|
||||
},
|
||||
{
|
||||
title: '药师审核状态',
|
||||
dataIndex: 'pharmacist_audit_status',
|
||||
},
|
||||
{
|
||||
title: '医嘱',
|
||||
dataIndex: 'doctor_advice',
|
||||
},
|
||||
{
|
||||
title: '药师驳回原因',
|
||||
dataIndex: 'pharmacist_fail_reason',
|
||||
},
|
||||
{
|
||||
title: '处方链接',
|
||||
dataIndex: 'url',
|
||||
slotName: 'url',
|
||||
},
|
||||
]);
|
||||
watch(
|
||||
() => props.modalForm,
|
||||
(newValue, oldValue) => {
|
||||
let result = newValue.order_prescription;
|
||||
let express = newValue.order_product_logistics
|
||||
? JSON.parse(newValue.order_product_logistics.logistics_content)
|
||||
: [];
|
||||
cur_express.value = express.length > 1 && express.slice(0, 1);
|
||||
let data_arr = [{}];
|
||||
if (result) {
|
||||
chufang_columns.forEach((item) => {
|
||||
if (item.dataIndex == 'prescription_status') {
|
||||
data_arr[0][item.dataIndex] = formatPrescriptionStatus(
|
||||
result[item.dataIndex]
|
||||
);
|
||||
} else if (item.dataIndex == 'pharmacist_audit_status') {
|
||||
data_arr[0][item.dataIndex] = formatPharmacistStatus(
|
||||
result[item.dataIndex]
|
||||
);
|
||||
} else if (item.dataIndex == 'url') {
|
||||
data_arr[0][item.dataIndex] =
|
||||
IMG_URL +
|
||||
'/applet/prescription/' +
|
||||
result.order_prescription_id +
|
||||
'.pdf';
|
||||
} else if (item.dataIndex == 'pharmacist_fail_reason') {
|
||||
data_arr[0][item.dataIndex] = result[item.dataIndex]
|
||||
? result[item.dataIndex]
|
||||
: '暂无';
|
||||
} else {
|
||||
data_arr[0][item.dataIndex] = result[item.dataIndex];
|
||||
}
|
||||
});
|
||||
chufang_data.value = data_arr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
|
||||
const formatProductStatus = (val) => {
|
||||
//订单状态(<!-- 1:待支付 2:待发货 3:已发货 4:已签收 5:已取消 -->
|
||||
let data = {
|
||||
1: '待支付',
|
||||
2: '待发货',
|
||||
3: '已发货',
|
||||
4: '已签收',
|
||||
5: '已取消',
|
||||
};
|
||||
if (val) {
|
||||
return data[val];
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
const formatRefundStatus = (val) => {
|
||||
//问诊订单退款状态(0:无退款 1:申请退款 2:退款中 3:退款成功 4:拒绝退款 5:退款关闭 6:退款异常)
|
||||
let data = {
|
||||
0: '无退款',
|
||||
1: '申请退款',
|
||||
2: '退款中',
|
||||
3: '退款成功',
|
||||
4: '拒绝退款',
|
||||
5: '退款关闭',
|
||||
6: '退款异常',
|
||||
};
|
||||
if (val || val == 0) {
|
||||
return data[val];
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
const formatColor = (value) => {
|
||||
if (value == '签收') {
|
||||
return '#00B42A';
|
||||
} else {
|
||||
return 'var(--color-fill-4)';
|
||||
}
|
||||
};
|
||||
const toggleExpand = () => {
|
||||
isExpand.value = !isExpand.value;
|
||||
if (isExpand.value) {
|
||||
cur_express.value = express.slice(0, -1);
|
||||
} else {
|
||||
cur_express.value = express.slice(0, 1);
|
||||
}
|
||||
};
|
||||
|
||||
const handleClose = () => {
|
||||
emits('medinceVisibleChange', (medinceVisible.value = false));
|
||||
};
|
||||
const toggleAddress = async() => {
|
||||
if(!lookAllAddress.value){
|
||||
const { data, code } = await lookAddress(modalForm.value.order_product_id);
|
||||
if (code == 200) {
|
||||
Object.assign(AddressData, data);
|
||||
}
|
||||
}
|
||||
lookAllAddress.value = !lookAllAddress.value;
|
||||
};
|
||||
//关闭确认框
|
||||
const closeChange = (data) => {
|
||||
cur_product_id.value = '';
|
||||
okVisible.value = false;
|
||||
if (data) {
|
||||
modalVisible.value = false;
|
||||
getProductInfo({ ...pager, ...queryForm });
|
||||
}
|
||||
};
|
||||
//关闭上传处方平台弹框
|
||||
const closeChangeOk = (data) => {
|
||||
order_product_id.value = '';
|
||||
isVisible.value = false;
|
||||
if (data) {
|
||||
getDetail(modalForm.order_product_id);
|
||||
}
|
||||
};
|
||||
|
||||
const openDcotor = () => {
|
||||
doctor_id.value = modalForm.value.doctor_id;
|
||||
doctorVisible.value = true;
|
||||
};
|
||||
const openPatient = async () => {
|
||||
if (
|
||||
modalForm.value.order_inquiry_case &&
|
||||
modalForm.value.order_inquiry_case.inquiry_case_id
|
||||
) {
|
||||
const caseInfo = await inquiryCase(modalForm.value.order_inquiry_case.inquiry_case_id);
|
||||
Object.assign(patientData, caseInfo.data);
|
||||
}
|
||||
patientVisible.value = true;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.action {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.doctorInfo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.row {
|
||||
line-height: 32px;
|
||||
display: flex;
|
||||
}
|
||||
.row .nameDesc {
|
||||
text-align: right;
|
||||
width: 120px;
|
||||
color: #000;
|
||||
}
|
||||
.row .desc {
|
||||
color: #666;
|
||||
}
|
||||
.infobox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.headImg {
|
||||
margin-right: 20px;
|
||||
border-radius: 50%;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
.arco-timeline-item-content-wrapper {
|
||||
width: 80%;
|
||||
}
|
||||
.arco-timeline-item-label {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.expand {
|
||||
margin-top: 15px;
|
||||
}
|
||||
.arco-form-item-content {
|
||||
word-break: break-all;
|
||||
}
|
||||
.express {
|
||||
margin-bottom: 15px;
|
||||
font-size: 15px;
|
||||
}
|
||||
.express span {
|
||||
color: #333;
|
||||
}
|
||||
</style>
|
||||
@ -9,4 +9,5 @@
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
</style>
|
||||
@ -1,13 +1,17 @@
|
||||
<template>
|
||||
<template v-for="menu in props.menuList" :key="menu.menu_id">
|
||||
<a-sub-menu
|
||||
class="mymenu"
|
||||
v-if="menu.menu_type== 1 && menu.children"
|
||||
:key="menu.path"
|
||||
>
|
||||
<template #icon>
|
||||
<component :is="menu.icon" v-if="menu.icon"/>
|
||||
</template>
|
||||
<template #title>{{ menu.menu_title }}</template>
|
||||
<template #title>
|
||||
<div v-if="menu.menu_title=='医生配置'" style="margin-left:-16px;">{{ menu.menu_title }}</div>
|
||||
<span v-else>{{ menu.menu_title }}</span>
|
||||
</template>
|
||||
<sub-menu :menuList="menu.children" />
|
||||
</a-sub-menu>
|
||||
<a-menu-item
|
||||
@ -34,3 +38,9 @@ const isRouteParams = computed(() => {
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style scoped >
|
||||
:deep(.mymenu .arco-menu-title ) {
|
||||
overflow: inherit!important;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -4,6 +4,7 @@ import App from './App.vue';
|
||||
import ArcoVue from '@arco-design/web-vue';
|
||||
import { Message, Modal, Notification } from '@arco-design/web-vue';
|
||||
import '@arco-design/web-vue/dist/arco.css';
|
||||
import 'element-plus/dist/index.css'
|
||||
import router from './router/';
|
||||
import { parseTime } from '@/utils/parseTime';
|
||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
||||
|
||||
@ -52,6 +52,15 @@ export const formatDoctorTitle=(val)=>{
|
||||
return ''
|
||||
}
|
||||
}
|
||||
export const formatServiceCancelReason=(val)=>{
|
||||
//1医生未接受服务 2:主动取消 3:"支付超时" 4:客服取消 5:支付超时
|
||||
let data={1:'医生未接受服务', 2:'主动取消',3:"支付超时",4:'客服取消',5:'支付超时'}
|
||||
if(val){
|
||||
return data[val]
|
||||
}else{
|
||||
return ''
|
||||
}
|
||||
}
|
||||
export const fromatReportStatus=(val)=>{
|
||||
//上报处方平台状态(0:未上报 1:已上报 2:上报失败))
|
||||
let data={0:'未上报', 1:'已上报', 2:'上报失败'}
|
||||
@ -89,6 +98,16 @@ export const formatRelation=(val)=>{
|
||||
return ''
|
||||
}
|
||||
};
|
||||
export const formatMedinceStatus=(val)=>{
|
||||
// 1:待支付 2:待发货 3:已发货 4:已签收 5:已取消
|
||||
let data={1:'待支付', 2:'待发货', 3:'已发货', 4:'已签收',5:'已取消'}
|
||||
if(val){
|
||||
return data[val]
|
||||
}else{
|
||||
return ''
|
||||
}
|
||||
};
|
||||
|
||||
export const formatMultipoint=(val)=>{
|
||||
//医生多点执业认证状态(0:未认证 1:认证通过 2:审核中 3:认证失败)
|
||||
let data={0:'未认证',1:'认证通过', 2:'审核中', 3:'认证失败'}
|
||||
@ -101,7 +120,7 @@ export const formatRelation=(val)=>{
|
||||
|
||||
export const formatMode=(val)=>{
|
||||
//1:图文 2:视频 3:语音 4:电话 5:会员
|
||||
let data={1:'图文',2:'视频', 3:'语音', 4:'电话',5:'会员',6:'疑难会诊',7:'附赠沟通'}
|
||||
let data={1:'图文',2:'视频', 3:'语音', 4:'电话',5:'会员',6:'疑难会诊',7:'附赠沟通',8:'健康包',9:'随访包'}
|
||||
if(val){
|
||||
return data[val]
|
||||
}else{
|
||||
@ -135,4 +154,42 @@ export const formatRelation=(val)=>{
|
||||
}else{
|
||||
return ''
|
||||
}
|
||||
};
|
||||
export const formatCouponStatus=(val)=>{
|
||||
//-1:'注册即发放',0:'未使用', 1:'已使用',2:'已过期'
|
||||
let data={'-1':'注册即发放',0:'未使用',1:'已使用', 2:'已过期'}
|
||||
if(val || val==0){
|
||||
return data[val]
|
||||
}else{
|
||||
return ''
|
||||
}
|
||||
};
|
||||
|
||||
export const formatCouponType=(val)=>{
|
||||
//1:无门槛 2:满减 3:数量
|
||||
let data={1:'无门槛', 2:'满减',3:'数量'}
|
||||
if(val ){
|
||||
return data[val]
|
||||
}else{
|
||||
return ''
|
||||
}
|
||||
};
|
||||
export const formatCouponObject=(val)=>{ //发放对象
|
||||
//1:全部用户 2:新注册用户 3:会员 4:近期消费 5:近期购药 6:存量用户 7:健康包服务用户
|
||||
let data={1:'全部用户', 2:'新注册用户',3:'会员',4:'近期消费',5:'近期购药',6:'存量用户',7:'健康包服务用户'}
|
||||
if(val){
|
||||
return data[val]
|
||||
}else{
|
||||
return ''
|
||||
}
|
||||
};
|
||||
|
||||
export const formatCouponRange=(val)=>{ //适用范围
|
||||
//1:全场通用 2:问诊 3:按品牌适用 4:按类别适用 5:单品使用 6:全品类药品
|
||||
let data={1:'全场通用', 2:'问诊',3:'按品牌适用',4:'按类别适用',5:'单品使用',6:'全品类药品'}
|
||||
if(val){
|
||||
return data[val]
|
||||
}else{
|
||||
return ''
|
||||
}
|
||||
};
|
||||
321
src/views/basic/area/index.vue
Normal file
321
src/views/basic/area/index.vue
Normal file
@ -0,0 +1,321 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-tree
|
||||
style="max-width: 600px"
|
||||
accordion
|
||||
lazy
|
||||
:default-expanded-keys="expandKey"
|
||||
:key="key"
|
||||
ref="tree"
|
||||
:load="loadNode"
|
||||
:props="defaultProps"
|
||||
node-key="id"
|
||||
|
||||
@node-click="handleNodeClick"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<span class="custom-tree-node" >
|
||||
|
||||
<span>{{ node.label }}-{{ data.custom_id}}</span>
|
||||
<span >
|
||||
<icon-plus-circle-fill v-has="'admin:sysArea:add'" @click="append(data)" title="添加" style="margin-left: 8px;font-size: 16px;color:#165DFF" v-if="node.level!=3"/>
|
||||
<icon-edit title="修改" v-has="'admin:sysArea:edit'" @click="edit(node, data)" style="margin-left: 8px;font-size: 16px;color:#165DFF"/>
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
<a-modal v-model:visible="okVisible" :modal-style="{width:'420px'}" body-class="okmodal" @ok="handleConfirm"
|
||||
@cancel="handleClose" >
|
||||
<template #title>
|
||||
{{ title }}
|
||||
</template>
|
||||
<a-form :model="form" :rules="rules" ref="modalFormRef" size="medium" label-align="left" auto-label-width>
|
||||
<a-form-item field="area_name" label="名称" >
|
||||
<a-textarea v-model.trim="form.area_name" allow-clear placeholder="请输入名称"></a-textarea>
|
||||
</a-form-item>
|
||||
<a-form-item field="area_id" label="区域id" >
|
||||
<a-input v-model="form.area_id" allow-clear placeholder="请输入区域id"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item field="label" label="上级名称" v-if="title=='添加区域'">
|
||||
<a-input v-model="form.label" disabled placeholder="请输入级名称" size="large" class="input-demo" />
|
||||
</a-form-item>
|
||||
|
||||
</a-form>
|
||||
<template #footer>
|
||||
<a-button @click="handleClose"><template #icon><icon-close /></template>取消</a-button>
|
||||
<a-button type="primary" @click="handleConfirm"><template #icon><icon-check /></template>确认</a-button>
|
||||
</template>
|
||||
|
||||
</a-modal>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
||||
import {getAreaList,addArea,updateArea} from '@/api/basic/list';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
// Akiraka 20230210 删除数据
|
||||
const key = ref(1);
|
||||
// Akiraka 20230210 删除对话框
|
||||
const deleteVisible = ref(false)
|
||||
// Akiraka 20230210 监听删除事件
|
||||
const okVisible = ref(false);
|
||||
const tree=ref(null);
|
||||
const hospitalChild=ref(null);
|
||||
const current=reactive({});
|
||||
watch(() => deleteVisible.value, (value) => {
|
||||
if (value == false) {
|
||||
getMedinceInfo(pageaer);
|
||||
}
|
||||
});
|
||||
const expandKey=ref([]);
|
||||
const title=ref('');
|
||||
const { proxy } = getCurrentInstance();
|
||||
const currentPage = ref(1);
|
||||
const defaultProps = {
|
||||
children: 'children',
|
||||
label: 'label',
|
||||
isLeaf:'isLeaf'
|
||||
}
|
||||
|
||||
const handleNodeClick = (data) => {
|
||||
|
||||
}
|
||||
// Pager
|
||||
const pager = {
|
||||
total: 0,
|
||||
page: 1,
|
||||
page_size: 10,
|
||||
};
|
||||
// form
|
||||
const queryForm = reactive({
|
||||
|
||||
});
|
||||
|
||||
const form = reactive({
|
||||
|
||||
|
||||
});
|
||||
const provinceData = ref([]);
|
||||
const cityData = ref([]);
|
||||
const countryData = ref([]);
|
||||
const rules= reactive({
|
||||
area_name: [{ required: true, message: '请输入名称' }],
|
||||
area_id:[{ required: true, message: '请输入区域id' }]
|
||||
});
|
||||
let id = 1000;
|
||||
const append=(data)=>{
|
||||
console.log(data);
|
||||
title.value="添加区域";
|
||||
okVisible.value=true;
|
||||
form.parent_id=data.id;
|
||||
form.label=data.label;
|
||||
current.label=data.label;
|
||||
current.id=data.id;
|
||||
current.parent_id=data.parent_id;
|
||||
current.level=data.level;
|
||||
form.area_name='';
|
||||
form.area_id='';
|
||||
// console.log(data)
|
||||
// const newChild = { id: id++, label: 'testtest', children: [] };
|
||||
// tree.value.append(newChild,data.id)
|
||||
};
|
||||
const edit=(node,data)=>{
|
||||
console.log(data);
|
||||
title.value="修改区域";
|
||||
form.parent_id=node.data.id;
|
||||
form.area_name=node.data.label;
|
||||
form.area_id=node.data.id;
|
||||
okVisible.value=true;
|
||||
current.id=data.id;
|
||||
current.parent_id=data.parent_id;
|
||||
}
|
||||
//获取区域列表
|
||||
const handelAreaList = (area_id = '', parent_id = '', area_type,resolve) => {
|
||||
getAreaList({
|
||||
area_id,
|
||||
area_type,
|
||||
parent_id
|
||||
}).then((res) => {
|
||||
const { data, code, message } = res;
|
||||
|
||||
if (code == 200) {
|
||||
if (area_type == 2) {
|
||||
let result=data.map(item=>{
|
||||
return {
|
||||
level:0,
|
||||
label:item.area_name,
|
||||
id:item.area_id,
|
||||
custom_id:item.area_id,
|
||||
parent_id:item.parent_id
|
||||
}
|
||||
});
|
||||
resolve(result);
|
||||
}
|
||||
if (area_type == 3) {
|
||||
let result=data.map(item=>{
|
||||
return {
|
||||
label:item.area_name,
|
||||
level:1,
|
||||
custom_id:item.area_id,
|
||||
id:item.area_id,
|
||||
parent_id:item.parent_id
|
||||
}
|
||||
});
|
||||
resolve(result);
|
||||
};
|
||||
if (area_type == 4) {
|
||||
let result=data.map(item=>{
|
||||
return {
|
||||
isLeaf: true,
|
||||
level:2,
|
||||
custom_id:item.area_id,
|
||||
label:item.area_name,
|
||||
id:item.area_id,
|
||||
parent_id:item.parent_id
|
||||
}
|
||||
});
|
||||
console.log(result)
|
||||
resolve(result);
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleConfirm=()=>{
|
||||
proxy.$refs.modalFormRef.validate(async(valid) => {
|
||||
if (!valid) {
|
||||
let type=null;
|
||||
if(current.level==0){
|
||||
type=3
|
||||
}else if(current.level==1){
|
||||
type=4
|
||||
}
|
||||
let {code,data}= title.value=="添加区域"?await addArea({
|
||||
area_name:form.area_name,
|
||||
parent_id:form.parent_id,
|
||||
area_id:form.area_id,
|
||||
area_type:type
|
||||
}):await updateArea(form.parent_id,{
|
||||
area_name:form.area_name,
|
||||
area_id:form.area_id,
|
||||
})
|
||||
if(code==200){
|
||||
if(title.value=="添加区域"){
|
||||
Message.success("添加成功");
|
||||
|
||||
}else{
|
||||
Message.success("修改成功");
|
||||
//tree.value.updateKeyChildren(form.parent_id,{id:form.parent_id,label:form.area_name,children: [] })
|
||||
}
|
||||
key.value= key.value+1;
|
||||
okVisible.value=false;
|
||||
setTimeout(()=>{
|
||||
expandKey.value=[current.parent_id,current.id]
|
||||
// tree.value.setCurrentKey(current.id,true);
|
||||
},1000)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
const handleClose=()=>{
|
||||
okVisible.value=false;
|
||||
}
|
||||
const loadNode=(node, resolve)=>{
|
||||
if (node.level === 0) {
|
||||
handelAreaList("", "", 2,resolve);
|
||||
}else if(node.level === 1){
|
||||
handelAreaList("", node.data.id, 3,resolve);
|
||||
}else if(node.level === 2){
|
||||
handelAreaList("", node.data.id, 4,resolve);
|
||||
}else{
|
||||
resolve([])
|
||||
}
|
||||
}
|
||||
|
||||
// Modal
|
||||
const modalVisible = ref(false);
|
||||
const modalTitle = ref('默认标题');
|
||||
|
||||
|
||||
|
||||
</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>
|
||||
399
src/views/basic/hospital/index.vue
Normal file
399
src/views/basic/hospital/index.vue
Normal file
@ -0,0 +1,399 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<a-form :model="queryForm" ref="queryFormRef" layout="inline">
|
||||
|
||||
<a-form-item field="hospital_name" label="医院名称">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.hospital_name" placeholder="请输入医院名称" @press-enter="handleQuery" />
|
||||
|
||||
</a-form-item>
|
||||
<a-form-item field="hospital_level_name" label="医院等级">
|
||||
<a-select v-model="queryForm.hospital_level_name" placeholder="请选择医院等级" :style="{ width: '182px' }">
|
||||
<a-option value="一级">一级</a-option>
|
||||
<a-option value="二级">二级</a-option>
|
||||
<a-option value="三级">三级</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="province_id" label="省份">
|
||||
<a-select v-model="queryForm.province_id" placeholder="请选择省份" :style="{ width: '182px' }" @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>
|
||||
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="city_id" label="城市">
|
||||
<a-select v-model="queryForm.city_id" placeholder="请选择城市" :style="{ width: '182px' }" @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>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="county_id" label="区县">
|
||||
<a-select v-model="queryForm.county_id" placeholder="请选择区县" :style="{ width: '182px' }">
|
||||
<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>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<a-space>
|
||||
<a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
|
||||
<a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
||||
<a-divider />
|
||||
|
||||
<!-- action -->
|
||||
<div class="action">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysHospitalList:add'" type="primary" @click="handleAdd"><icon-plus /> 添加 </a-button>
|
||||
<!-- <a-button v-has="'admin:platformMedinceList:searchExport'" type="primary" @click="handlExport(1)"><icon-export /> 当前搜索全部导出</a-button>
|
||||
<a-button v-has="'admin:platformMedinceList:allExport'" type="primary" @click="handlExport(3)"><icon-export /> 全部导出</a-button> -->
|
||||
</a-space>
|
||||
</div>
|
||||
|
||||
<!-- table -->
|
||||
<!-- :row-selection="{ type: 'checkbox', showCheckedAll: true }" -->
|
||||
<a-table :columns="columns" :data="tableData"
|
||||
:scroll="{ x: 1600 }"
|
||||
|
||||
:pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
|
||||
row-key="hospital_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 #action="{ record }">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysHospitalList:detail'" type="text"
|
||||
@click="handleDetail(record)"><icon-book />详情</a-button>
|
||||
<!-- <a-button v-has="'admin:platformMedinceList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
||||
修改</a-button> -->
|
||||
<!-- <a-button v-has="'admin:platformMedinceList:remove'" type="text"
|
||||
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
|
||||
</a-space>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
<hospitalDetailModal ref="hospitalChild" :modalVisible="modalVisible" :modalForm="modalForm" :id="modalForm.hospital_id" @freshDetail="handleQuery" @familyVisibleChange="()=>{modalVisible=false,modalForm.hospital_id=''}"></hospitalDetailModal>
|
||||
<!-- Akiraka 20230223 删除与批量删除 开始 -->
|
||||
<!-- <DeleteModal :data="deleteData" :visible="deleteVisible" :apiDelete="removeFamily"
|
||||
@deleteVisibleChange="() => deleteVisible = false" /> -->
|
||||
<!-- Akiraka 20230223 删除与批量删除 结束 -->
|
||||
<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 { getHospitalList,getHospitalDetail,getAreaList} from '@/api/basic/list';
|
||||
import { downloadFile } from '@/utils/downloadFile';
|
||||
// Akiraka 20230210 删除数据
|
||||
const deleteData = ref([])
|
||||
// Akiraka 20230210 删除对话框
|
||||
const deleteVisible = ref(false)
|
||||
// Akiraka 20230210 监听删除事件
|
||||
const okVisible = ref(false);
|
||||
const hospitalChild=ref(null);
|
||||
watch(() => deleteVisible.value, (value) => {
|
||||
if (value == false) {
|
||||
getMedinceInfo(pager);
|
||||
}
|
||||
});
|
||||
|
||||
const file = ref();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const currentPage = ref(1);
|
||||
|
||||
|
||||
// Pager
|
||||
const pager = {
|
||||
total: 0,
|
||||
page: 1,
|
||||
page_size: 10,
|
||||
};
|
||||
// form
|
||||
const queryForm = reactive({
|
||||
|
||||
});
|
||||
const modalForm = reactive({
|
||||
|
||||
|
||||
});
|
||||
const provinceData = ref([]);
|
||||
const cityData = ref([]);
|
||||
const countryData = ref([]);
|
||||
//获取区域列表
|
||||
const handelAreaList = (area_id = '', parent_id = '', area_type) => {
|
||||
getAreaList({
|
||||
area_id,
|
||||
area_type,
|
||||
parent_id
|
||||
}).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;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
//切换省份
|
||||
const changeProvice = (value) => {
|
||||
queryForm.city_id = '';
|
||||
queryForm.county_id = '';
|
||||
handelAreaList('', value, 3);
|
||||
};
|
||||
//切换省份
|
||||
const changeCity = (value) => {
|
||||
queryForm.county_id = '';
|
||||
handelAreaList("", value, 4);
|
||||
|
||||
}
|
||||
// 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: 'hospital_name',width:200 },
|
||||
{ title: '省份', dataIndex: 'province',width:200 },
|
||||
{ title: '城市', dataIndex: 'city', slotName: 'product_price',width: 150 },
|
||||
{ title: '区县', dataIndex: 'county',width:200 },
|
||||
{ title: '地址', dataIndex: 'address',width:200 },
|
||||
{ title: '创建时间', dataIndex: 'created_at',width:200 },
|
||||
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
||||
];
|
||||
|
||||
// Table Data
|
||||
const tableData = ref([]);
|
||||
//弹框状态
|
||||
const modalSatus = ref('add');
|
||||
|
||||
// 新增Satus
|
||||
const handleAdd = () => {
|
||||
modalVisible.value = true;
|
||||
modalTitle.value = '新增患者';
|
||||
modalForm.hospital_id ='';
|
||||
modalForm.hospital_name='',
|
||||
modalForm.hospital_status=1,
|
||||
modalForm.hospital_level_name='',
|
||||
modalForm.post_code='',
|
||||
modalForm.tele_phone='',
|
||||
modalForm.province_id='',
|
||||
modalForm.city_id='',
|
||||
modalForm.county_id='',
|
||||
modalForm.address='',
|
||||
modalForm.desc='';
|
||||
hospitalChild.value.getData();
|
||||
};
|
||||
|
||||
//详情
|
||||
const handleDetail = async (record) => {
|
||||
const { code, data, message } = await getHospitalDetail(record.hospital_id)
|
||||
if (code == 200) {
|
||||
Object.assign(modalForm, data);
|
||||
modalVisible.value = true;
|
||||
}
|
||||
hospitalChild.value.getData(true);
|
||||
};
|
||||
// 批量删除
|
||||
const handleBatchDelete = () => {
|
||||
if (batchList.length !== 0) {
|
||||
proxy.$modal.warning({
|
||||
title: '提示',
|
||||
content: '是否批量删除以下选中的数据?',
|
||||
hideCancel: false,
|
||||
onOk: async () => {
|
||||
const res = await removeFamily({ ids: batchList });
|
||||
proxy.$message.success(res.message);
|
||||
getMedinceInfo(pager);
|
||||
},
|
||||
onCancel: () => {
|
||||
proxy.$message.info('已取消批量删除数据');
|
||||
},
|
||||
});
|
||||
} else {
|
||||
proxy.$message.error('请勾选需要删除的数据!');
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 分页改变
|
||||
* @param {Number} [page]
|
||||
*/
|
||||
const handlePageChange = (page) => {
|
||||
pager.page = page;
|
||||
|
||||
// 修改当前页码
|
||||
currentPage.value = page;
|
||||
getMedinceInfo({ ...pager, ...queryForm });
|
||||
};
|
||||
|
||||
// 每页数据量
|
||||
const handlepage_sizeChange = (page_size) => {
|
||||
pager.page_size = page_size;
|
||||
getMedinceInfo({ ...pager, ...queryForm });
|
||||
};
|
||||
|
||||
// 获取患者信息
|
||||
const getMedinceInfo = async (params = {}) => {
|
||||
const { data, code, message } = await getHospitalList(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,
|
||||
};
|
||||
|
||||
getMedinceInfo(params);
|
||||
};
|
||||
|
||||
// 重置搜索
|
||||
const handleResetQuery = () => {
|
||||
proxy.$refs.queryFormRef.resetFields();
|
||||
getMedinceInfo(queryForm);
|
||||
}
|
||||
const handlExport=async(type)=>{
|
||||
proxy.$loading.show();
|
||||
let fromData=null;
|
||||
if(type==1){
|
||||
fromData={
|
||||
type,
|
||||
...queryForm
|
||||
}
|
||||
}else if(type==2){
|
||||
if(deleteData.value.length==0){
|
||||
proxy.$message.warning('请勾选数据');
|
||||
proxy.$loading.hide();
|
||||
return false;
|
||||
};
|
||||
let id='';
|
||||
deleteData.value.forEach((item)=>{
|
||||
if(id){
|
||||
id+=","+item
|
||||
}else{
|
||||
id=item;
|
||||
}
|
||||
})
|
||||
fromData={
|
||||
type,
|
||||
id
|
||||
}
|
||||
}else if(type==3){
|
||||
fromData={
|
||||
type
|
||||
}
|
||||
}
|
||||
const {code,data}=await exportFamily(fromData);
|
||||
if(code==200){
|
||||
downloadFile(data,'就诊人列表');
|
||||
}
|
||||
proxy.$loading.hide();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getMedinceInfo(pager);
|
||||
handelAreaList("", "", 2);
|
||||
});
|
||||
</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>
|
||||
495
src/views/coupon/coupon-list/index.vue
Normal file
495
src/views/coupon/coupon-list/index.vue
Normal file
@ -0,0 +1,495 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<a-form :model="queryForm" ref="queryFormRef" layout="inline">
|
||||
|
||||
<a-form-item field="coupon_name" label="优惠劵名称">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.coupon_name" placeholder="请输入优惠劵名称" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="coupon_desc" label="优惠劵描述">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.coupon_desc" placeholder="请输入优惠劵描述" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="coupon_status" label="启用状态">
|
||||
<a-select v-model="queryForm.coupon_status" placeholder="请选择启用状态" :style="{ width: '182px' }">
|
||||
<!-- 1:正常 2:强制失效 3:结束 4:删除 -->
|
||||
<a-option :value="1">正常</a-option>
|
||||
<a-option :value="2">强制失效</a-option>
|
||||
<a-option :value="3">结束</a-option>
|
||||
<a-option :value="4">删除</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="distribution_object" label="发放对象">
|
||||
<a-select v-model="queryForm.distribution_object" placeholder="请选择发放对象" :style="{ width: '182px' }">
|
||||
<!-- 1:全部用户 2:新注册用户 3:会员 4:近期消费 5:近期购药 6:存量用户 7:健康包服务用户 -->
|
||||
<a-option :value="1">全部用户</a-option>
|
||||
<a-option :value="2">新注册用户</a-option>
|
||||
<a-option :value="3">会员</a-option>
|
||||
<a-option :value="4">近期消费</a-option>
|
||||
<a-option :value="5">近期购药</a-option>
|
||||
<a-option :value="6">存量用户</a-option>
|
||||
<a-option :value="7">健康包服务用户</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="application_scope" label="适用范围">
|
||||
<a-select v-model="queryForm.application_scope" placeholder="请选择适用范围" :style="{ width: '182px' }">
|
||||
<!-- 1:全场通用 2:问诊 3:按品牌适用 4:按类别适用 5:单品使用 6:全品类药品-->
|
||||
<a-option :value="1">全场通用</a-option>
|
||||
<a-option :value="2">问诊</a-option>
|
||||
<a-option :value="3">按品牌适用</a-option>
|
||||
<a-option :value="4">按类别适用</a-option>
|
||||
<a-option :value="5">单品使用</a-option>
|
||||
<a-option :value="6">全品类药品</a-option>
|
||||
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="inquiry_type" label="关联问诊类型">
|
||||
<a-select v-model="queryForm.inquiry_type" placeholder="请选择关联问诊类型" :style="{ width: '182px' }">
|
||||
<!--1:'专家问诊', 2:'快速问诊', 3:'公益问诊', 4:'问诊购药',5:'糖组检测'-->
|
||||
<a-option value="1">专家问诊</a-option>
|
||||
<a-option value="2">快速问诊</a-option>
|
||||
<a-option value="3">公益问诊</a-option>
|
||||
<a-option value="4">问诊购药</a-option>
|
||||
<a-option value="5">糖组检测</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
|
||||
<!-- <a-form-item field="create_range_time" label="创建时间范围">
|
||||
<a-range-picker
|
||||
style="width: 260px"
|
||||
v-model="queryForm.create_range_time"
|
||||
/>
|
||||
</a-form-item> -->
|
||||
<a-form-item>
|
||||
<a-space>
|
||||
<a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
|
||||
<a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
||||
<a-divider />
|
||||
|
||||
<!-- action -->
|
||||
<div class="action">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysCouponList:add'" type="primary" @click="showAdd"><icon-plus /> 创建优惠劵 </a-button>
|
||||
<!-- <a-button v-has="'admin:sysPatientList:selectExport'" type="primary" @click="handlExport(2)"><icon-export /> 选择数据导出 </a-button>
|
||||
<a-button v-has="'admin:sysPatientList:searchExport'" type="primary" @click="handlExport(1)"><icon-export /> 当前搜索全部导出</a-button>
|
||||
<a-button v-has="'admin:sysPatientList:allExport'" type="primary" @click="handlExport(3)"><icon-export /> 全部导出</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="coupon_id" @selection-change="(selection) => {deleteData = selection;console.log(selection)}"
|
||||
@page-change="handlePageChange" @page-size-change="handlepage_sizeChange">
|
||||
<template #code="{record,rowIndex}">
|
||||
<div>{{(rowIndex+1)+(pager.page-1)*pager.page_size}}</div>
|
||||
</template>
|
||||
<template #coupon_client="{record}">
|
||||
<div v-if="record.coupon_client==1">小程序</div>
|
||||
</template>
|
||||
<template #distribution_object="{record}">
|
||||
<div>{{formatCouponObject(record.distribution_object)}}</div>
|
||||
</template>
|
||||
<template #application_scope="{record}">
|
||||
<div>{{formatCouponRange(record.application_scope)}}</div>
|
||||
</template>
|
||||
<template #coupon_type="{record}">
|
||||
<div>{{formatCouponType(record.coupon_type)}}</div>
|
||||
</template>
|
||||
<template #valid_type="{record}">
|
||||
<div v-if="record.valid_type==1">绝对时效</div>
|
||||
<div v-else-if="record.valid_type==2">相对时效</div>
|
||||
</template>
|
||||
<template #coupon_status="{ record }">
|
||||
<!-- (1:正常 2:强制失效 3:结束 4:删除) -->
|
||||
<div v-if="record.coupon_status==1">正常</div>
|
||||
<div v-else-if="record.coupon_status==2">强制失效</div>
|
||||
<div v-else-if="record.coupon_status==3">结束</div>
|
||||
<div v-else>删除</div>
|
||||
<!-- <a-switch @click="showCoupon(value,record)" v-model="record.coupon_status" :loading="loading" :disabled="record.coupon_status==2" :checked-value="1" /> -->
|
||||
</template>
|
||||
<template #action="{ record }">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysCouponList:detail'" type="text"
|
||||
@click="handleDetail(record)"><icon-book />详情</a-button>
|
||||
</a-space>
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysCouponList:give'" type="text"
|
||||
@click="handleGive(record)"><icon-pushpin />发放优惠劵</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
<!-- Modal -->
|
||||
<couponDetail ref="couponChild" :modalVisible="modalVisible" :modalForm="modalForm" @closeChange="closeCouponDetail" @changeTimeRange="changeTimeRange" @freshDetail="handleDetail" @changeValue="changeValue"></couponDetail>
|
||||
|
||||
<!-- 发放弹窗giveVisible-->
|
||||
<giveCouponModal ref="giveCouponChild" :giveVisible="giveVisible" @closeGiVe="closeGiVe" :id="give_coupon_id"> </giveCouponModal>
|
||||
|
||||
<!-- Akiraka 20230223 删除与批量删除 结束 -->
|
||||
<a-modal v-model:visible="okVisible" :modal-style="{width:'420px'}" body-class="okmodal"
|
||||
@cancel="cancelOk" @ok="handleOk">
|
||||
<template #title>
|
||||
提示
|
||||
</template>
|
||||
<a-form :model="okForm" :rules="formRules" ref="okModalFormRef" size="medium" label-align="left" auto-label-width>
|
||||
<a-form-item field="disable_reason" label="禁用理由" >
|
||||
<a-textarea v-model.trim="okForm.disable_reason" allow-clear placeholder="请输入禁用理由"></a-textarea>
|
||||
</a-form-item>
|
||||
<!-- <template #footer>
|
||||
<a-button @click="()=>okVisible=false"><template #icon><icon-close /></template>取消</a-button>
|
||||
<a-button type="primary" @click="handleOk"><template #icon><icon-check /></template>确认</a-button>
|
||||
</template> -->
|
||||
</a-form>
|
||||
</a-modal>
|
||||
<isOkCouponModal
|
||||
:isVisible="isVisible"
|
||||
:api="updateCouponStatus"
|
||||
:title="okTitle"
|
||||
:dealType="'status'"
|
||||
:id="cur_coupon_id"
|
||||
@closeChangeOk="closeChangeOk"
|
||||
></isOkCouponModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
||||
import { getSystemCouponList,getCouponDetail,updateCouponStatus} from '@/api/coupon/list';
|
||||
import { formatCouponStatus,formatCouponType,formatCouponObject,formatCouponRange } from '@/utils/format';
|
||||
// Akiraka 20230210 删除数据
|
||||
const deleteData = ref([])
|
||||
// Akiraka 20230210 删除对话框
|
||||
const deleteVisible = ref(false)
|
||||
// Akiraka 20230210 监听删除事件
|
||||
const loading=ref(true);
|
||||
const okVisible = ref(false);
|
||||
const okTitle=ref('');
|
||||
const okForm = reactive({
|
||||
disable_reason: ''
|
||||
});
|
||||
const formRules = reactive({
|
||||
disable_reason: [{ required: true, message: '请输入禁用理由' }]
|
||||
});
|
||||
const isVisible=ref(false);
|
||||
watch(() => deleteVisible.value, (value) => {
|
||||
if (value == false) {
|
||||
getInfo(pager);
|
||||
}
|
||||
});
|
||||
|
||||
const file = ref();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const currentPage = ref(1);
|
||||
const family_data=ref([]);
|
||||
const couponChild = ref(null);
|
||||
const giveCouponChild= ref(null);
|
||||
const giveVisible=ref(false);
|
||||
// Pager
|
||||
const pager = {
|
||||
total: 0,
|
||||
page: 1,
|
||||
page_size: 10,
|
||||
};
|
||||
// form
|
||||
const queryForm = reactive({
|
||||
|
||||
});
|
||||
const modalForm = reactive({
|
||||
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png',
|
||||
|
||||
});
|
||||
|
||||
// Modal
|
||||
const modalVisible = ref(false);
|
||||
const modalTitle = ref('默认标题');
|
||||
|
||||
// Batch Del List
|
||||
let batchList = [];
|
||||
|
||||
// Table Columns
|
||||
const columns = ref([{
|
||||
title: '编号',
|
||||
dataIndex: 'code',
|
||||
slotName:'code'
|
||||
},{
|
||||
title: '优惠劵名称',
|
||||
dataIndex: 'coupon_name',
|
||||
},{
|
||||
title: '适用平台',
|
||||
dataIndex: 'coupon_client',
|
||||
slotName:'coupon_client'
|
||||
},{
|
||||
title: '发放对象',
|
||||
dataIndex: 'distribution_object',
|
||||
slotName:'distribution_object'
|
||||
},{
|
||||
title: '发放类型',
|
||||
dataIndex: 'coupon_type',
|
||||
slotName:'coupon_type'
|
||||
},{
|
||||
title: '适用范围',
|
||||
dataIndex: 'application_scope',
|
||||
slotName:'application_scope'
|
||||
},
|
||||
{
|
||||
title: '发放数量',
|
||||
dataIndex:'coupon_count',
|
||||
slotName:'coupon_count'
|
||||
},
|
||||
{
|
||||
title: '已领取数量',
|
||||
dataIndex:'coupon_take_count'
|
||||
},
|
||||
{
|
||||
title: '已使用数量',
|
||||
dataIndex:'coupon_used_count'
|
||||
},
|
||||
{
|
||||
title: '优惠劵金额',
|
||||
dataIndex:'coupon_price',
|
||||
slotName:'coupon_price'
|
||||
},
|
||||
{
|
||||
title: '有效类型',
|
||||
dataIndex:'valid_type',
|
||||
slotName:'valid_type'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'coupon_status',
|
||||
slotName:'coupon_status'
|
||||
}, { title: '操作', slotName: 'action'}])
|
||||
// Table Data
|
||||
const tableData = ref([]);
|
||||
//弹框状态
|
||||
const modalSatus = ref('add');
|
||||
|
||||
// 新增Satus
|
||||
const handleAdd = () => {
|
||||
modalVisible.value = true;
|
||||
modalTitle.value = '新增患者';
|
||||
modalSatus.value = 'add';
|
||||
modalForm.coupon_id = null;
|
||||
};
|
||||
const give_coupon_id=ref('');
|
||||
const closeGiVe=()=>{
|
||||
giveVisible.value=false;
|
||||
};
|
||||
const handleGive=(record)=>{
|
||||
|
||||
give_coupon_id.value=record.coupon_id;
|
||||
giveVisible.value=true;
|
||||
giveCouponChild.value.changeStatus();
|
||||
}
|
||||
//详情
|
||||
const handleDetail = async (record) => {
|
||||
modalVisible.value = true;
|
||||
modalTitle.value = '患者详情';
|
||||
modalSatus.value = 'detail';
|
||||
const { code, data, message } = await getCouponDetail(record.coupon_id);
|
||||
|
||||
if (code == 200) {
|
||||
Object.assign(modalForm,data);
|
||||
family_data.value=data.patient_family;
|
||||
}
|
||||
};
|
||||
|
||||
const cur_coupon_id=ref('');
|
||||
const switchStatus= async(coupon_id,putData)=>{
|
||||
const {code,message}= await changeStatus(coupon_id,putData);
|
||||
if(code==200){
|
||||
putData.status==0?proxy.$notification.success("禁用成功"):proxy.$notification.success('启用成功');
|
||||
modalVisible.value=false;
|
||||
handleQuery();
|
||||
proxy.$refs.okModalFormRef.resetFields();
|
||||
}else{
|
||||
proxy.$notification.error(message);
|
||||
}
|
||||
};
|
||||
const showAdd=()=>{
|
||||
|
||||
modalVisible.value=true;
|
||||
modalForm.coupon_id='';
|
||||
modalForm.valid_days=null;
|
||||
modalForm.coupon_status=1;
|
||||
modalForm.coupon_client=1;
|
||||
modalForm.is_mutex=1;
|
||||
modalForm.is_display=1;
|
||||
modalForm.is_popup=0;
|
||||
modalForm.valid_start_time='';
|
||||
modalForm.valid_end_time='';
|
||||
modalForm.valid_type='';
|
||||
modalForm.coupon_count=null;
|
||||
modalForm.with_amount=null;
|
||||
modalForm.desc='';
|
||||
modalForm.coupon_price=null;
|
||||
modalForm.is_reissuable_after_expire=0;
|
||||
if(couponChild.value){
|
||||
couponChild.value.changeStatus();
|
||||
}
|
||||
};
|
||||
const changeTimeRange=(data)=>{
|
||||
modalForm.valid_start_time=data.valid_start_time;
|
||||
modalForm.valid_end_time=data.valid_end_time;
|
||||
};
|
||||
const changeValue=(type)=>{
|
||||
modalForm[type]=null;
|
||||
}
|
||||
const cancelOk=()=>{
|
||||
okVisible.value=false;
|
||||
}
|
||||
const handleOk = () => {
|
||||
proxy.$refs.okModalFormRef.validate(async(valid) => {
|
||||
if (!valid) {
|
||||
switchStatus(cur_coupon_id.value,{
|
||||
status:0,
|
||||
disable_reason:okForm.disable_reason
|
||||
})
|
||||
}else{
|
||||
okVisible.value=true
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//关闭启用弹框
|
||||
const closeChangeOk = () => {
|
||||
isVisible.value = false;
|
||||
modalVisible.value = false;
|
||||
|
||||
};
|
||||
const showCoupon=(value,record)=>{
|
||||
okTitle.value=!record.coupon_status?'确定关闭吗?':'确定开启吗?';
|
||||
isVisible.value=true;
|
||||
cur_coupon_id.value=record.coupon_id;
|
||||
};
|
||||
/**
|
||||
* 分页改变
|
||||
* @param {Number} [page]
|
||||
*/
|
||||
const handlePageChange = (page) => {
|
||||
pager.page = page;
|
||||
|
||||
// 修改当前页码
|
||||
currentPage.value = page;
|
||||
getInfo({ ...pager, ...queryForm });
|
||||
};
|
||||
|
||||
// 每页数据量
|
||||
const handlepage_sizeChange = (page_size) => {
|
||||
pager.page_size = page_size;
|
||||
getInfo({ ...pager, ...queryForm });
|
||||
};
|
||||
|
||||
// 获取患者信息
|
||||
const getInfo = async (params = {}) => {
|
||||
loading.value=true;
|
||||
const { data, code, message } = await getSystemCouponList(params);
|
||||
if (code == 200) {
|
||||
tableData.value = data.data;
|
||||
Object.assign(pager, { total: data.total, page: data.page, page_size: data.page_size });
|
||||
}
|
||||
loading.value=false;
|
||||
};
|
||||
|
||||
// 查询患者信息
|
||||
const handleQuery = async () => {
|
||||
pager.page = 1;
|
||||
const params = {
|
||||
page: pager.page,
|
||||
page_size: pager.page_size,
|
||||
...queryForm,
|
||||
};
|
||||
|
||||
getInfo(params);
|
||||
};
|
||||
|
||||
// 重置搜索
|
||||
const handleResetQuery = () => {
|
||||
proxy.$refs.queryFormRef.resetFields();
|
||||
getInfo(queryForm);
|
||||
}
|
||||
const closeCouponDetail=()=>{
|
||||
modalVisible.value=false;
|
||||
getInfo({ ...pager, ...queryForm });
|
||||
}
|
||||
onMounted(() => {
|
||||
getInfo(pager);
|
||||
});
|
||||
</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{
|
||||
max-width:250px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
265
src/views/coupon/userCoupon-list/index.vue
Normal file
265
src/views/coupon/userCoupon-list/index.vue
Normal file
@ -0,0 +1,265 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<a-form :model="queryForm" ref="queryFormRef" layout="inline">
|
||||
|
||||
<a-form-item field="user_name" label="用户名称">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.user_name" placeholder="请输入用户名称" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="coupon_name" label="优惠劵名称">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.coupon_name" placeholder="请输入优惠劵名称" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="user_coupon_status" label="使用状态">
|
||||
<a-select v-model="queryForm.user_coupon_status" placeholder="使用状态" :style="{ width: '182px' }">
|
||||
<!-- 0:未使用 1:已使用 3:已过期 -->
|
||||
<a-option :value="0">未使用</a-option>
|
||||
<a-option :value="1">已使用</a-option>
|
||||
<a-option :value="2">已过期</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<!-- <a-form-item field="create_range_time" label="创建时间范围">
|
||||
<a-range-picker
|
||||
style="width: 260px"
|
||||
v-model="queryForm.create_range_time"
|
||||
/>
|
||||
</a-form-item> -->
|
||||
<a-form-item>
|
||||
<a-space>
|
||||
<a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
|
||||
<a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
||||
<a-divider />
|
||||
|
||||
<!-- action -->
|
||||
<!--<div class="action">
|
||||
<a-space>
|
||||
|
||||
<a-button v-has="'admin:sysPatientList:selectExport'" type="primary" @click="handlExport(2)"><icon-export /> 选择数据导出 </a-button>
|
||||
<a-button v-has="'admin:sysPatientList:searchExport'" type="primary" @click="handlExport(1)"><icon-export /> 当前搜索全部导出</a-button>
|
||||
<a-button v-has="'admin:sysPatientList:allExport'" type="primary" @click="handlExport(3)"><icon-export /> 全部导出</a-button>
|
||||
</a-space>
|
||||
</div> -->
|
||||
|
||||
<!-- table -->
|
||||
<a-table :columns="columns" :data="tableData"
|
||||
:scroll="{ x: 1400 }"
|
||||
:pagination="{ 'show-total': true, 'show-jumper': true, 'show-page-size': true, total: pager.total, current: currentPage }"
|
||||
row-key="user_coupon_id" @selection-change="(selection) => {deleteData = selection;console.log(selection)}"
|
||||
@page-change="handlePageChange" @page-size-change="handlepage_sizeChange">
|
||||
<template #code="{record,rowIndex}">
|
||||
<div>{{(rowIndex+1)+(pager.page-1)*pager.page_size}}</div>
|
||||
</template>
|
||||
|
||||
<template #coupon_use_date="{record}">
|
||||
<div v-if="parseTime(record.coupon_use_date)">{{parseTime(record.coupon_use_date)}}</div>
|
||||
<div v-else>-</div>
|
||||
</template>
|
||||
<template #valid_start_time="{record}">
|
||||
<div>{{parseTime(record.valid_start_time)+'——'+parseTime(record.valid_end_time)}}</div>
|
||||
</template>
|
||||
<template #coupon="{record}">
|
||||
<div>{{record.coupon.coupon_name}}</div>
|
||||
</template>
|
||||
|
||||
<template #created_at="{record}">
|
||||
<div>{{parseTime(record.created_at)}}</div>
|
||||
</template>
|
||||
<template #user_coupon_status="{ record }">
|
||||
<!-- 0:未使用 1:已使用 3:已过期 -->
|
||||
<div v-if="record.user_coupon_status==0">未使用</div>
|
||||
<div v-else-if="record.user_coupon_status==1">已使用</div>
|
||||
<div v-else>已过期</div>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
||||
import { getUserCouponList} from '@/api/coupon/list';
|
||||
import { parseTime } from '@/utils/parseTime';
|
||||
const { proxy } = getCurrentInstance();
|
||||
const currentPage = ref(1);
|
||||
const tableData=ref([]);
|
||||
const loading=ref(false);
|
||||
// Pager
|
||||
const pager = {
|
||||
total: 0,
|
||||
page: 1,
|
||||
page_size: 10,
|
||||
};
|
||||
// form
|
||||
const queryForm = reactive({
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Table Columns
|
||||
const columns = ref([{
|
||||
title: '编号',
|
||||
dataIndex: 'code',
|
||||
slotName:'code',
|
||||
width:80
|
||||
},{
|
||||
title: '用户名称',
|
||||
dataIndex: 'user_name',
|
||||
width:180
|
||||
},
|
||||
{
|
||||
title: '优惠劵名称',
|
||||
dataIndex: 'coupon',
|
||||
slotName:'coupon',
|
||||
width:200
|
||||
},
|
||||
{
|
||||
title: '优惠劵状态',
|
||||
dataIndex: 'user_coupon_status',
|
||||
slotName:'user_coupon_status',
|
||||
width:100
|
||||
},
|
||||
{
|
||||
title: '使用时间',
|
||||
dataIndex: 'coupon_use_date',
|
||||
slotName:'coupon_use_date',
|
||||
width:180
|
||||
},
|
||||
{
|
||||
title: '有效期',
|
||||
dataIndex: 'valid_start_time',
|
||||
slotName:'valid_start_time',
|
||||
width:300
|
||||
},{
|
||||
title: '创建时间',
|
||||
dataIndex: 'created_at',
|
||||
slotName:'created_at',
|
||||
width:180
|
||||
}])
|
||||
|
||||
/**
|
||||
* 分页改变
|
||||
* @param {Number} [page]
|
||||
*/
|
||||
const handlePageChange = (page) => {
|
||||
pager.page = page;
|
||||
|
||||
// 修改当前页码
|
||||
currentPage.value = page;
|
||||
getInfo({ ...pager, ...queryForm });
|
||||
};
|
||||
|
||||
// 每页数据量
|
||||
const handlepage_sizeChange = (page_size) => {
|
||||
pager.page_size = page_size;
|
||||
getInfo({ ...pager, ...queryForm });
|
||||
};
|
||||
|
||||
// 获取患者信息
|
||||
const getInfo = async (params = {}) => {
|
||||
loading.value=true;
|
||||
const { data, code, message } = await getUserCouponList(params);
|
||||
if (code == 200) {
|
||||
tableData.value = data.data;
|
||||
Object.assign(pager, { total: data.total, page: data.page, page_size: data.page_size });
|
||||
}
|
||||
loading.value=false;
|
||||
};
|
||||
|
||||
// 查询患者信息
|
||||
const handleQuery = async () => {
|
||||
pager.page = 1;
|
||||
const params = {
|
||||
page: pager.page,
|
||||
page_size: pager.page_size,
|
||||
...queryForm,
|
||||
};
|
||||
|
||||
getInfo(params);
|
||||
};
|
||||
|
||||
// 重置搜索
|
||||
const handleResetQuery = () => {
|
||||
proxy.$refs.queryFormRef.resetFields();
|
||||
getInfo(queryForm);
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getInfo(pager);
|
||||
});
|
||||
</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{
|
||||
max-width:250px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
287
src/views/inquiry/health/index.vue
Normal file
287
src/views/inquiry/health/index.vue
Normal file
@ -0,0 +1,287 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- action -->
|
||||
<div class="action">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysHealthList: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"
|
||||
|
||||
:row-selection="{ type: 'checkbox', showCheckedAll: true }"
|
||||
: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 #monthly_frequency="{ record }">
|
||||
<div v-if="record.monthly_frequency==0">不限次</div>
|
||||
<div v-else>{{ record.monthly_frequency}}</div>
|
||||
</template>
|
||||
<template #service_rate="{ record }">
|
||||
<div>{{record.service_rate+"%"}}</div>
|
||||
</template>
|
||||
|
||||
<template #health_package_product="{record}">
|
||||
<div v-for="item in record.health_package_product" :key="item.product_id" v-if="record.health_package_product.length>0">{{item.product_name }} </div>
|
||||
<div v-else>-</div>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<template #action="{ record }">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysHealthList: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>
|
||||
|
||||
<addHealthModal ref="addChild" :modalVisible="modalVisible" :id="package_id" :modalForm="modalForm" @freshList="getInquiryInfo(pager);" @healthVisibleChange="()=>{modalVisible=false;package_id='';}"></addHealthModal>
|
||||
<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 { getHealthList,healthDetail} from '@/api/inquiry/service';
|
||||
import {formatDoctorTitle,formatInquiryType,formatMultipoint,formatMode} from "@/utils/format"
|
||||
|
||||
// Akiraka 20230210 删除数据
|
||||
const deleteData = ref([])
|
||||
// Akiraka 20230210 删除对话框
|
||||
const deleteVisible = ref(false)
|
||||
// Akiraka 20230210 监听删除事件
|
||||
const okVisible = ref(false);
|
||||
const package_id=ref("");
|
||||
watch(() => deleteVisible.value, (value) => {
|
||||
if (value == false) {
|
||||
getInquiryInfo(pager);
|
||||
}
|
||||
});
|
||||
|
||||
const addChild = ref(null);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const currentPage = ref(1);
|
||||
const family_data=ref([]);
|
||||
const family_columns=ref([{
|
||||
title: '编号',
|
||||
dataIndex: 'code',
|
||||
slotName:'code'
|
||||
},{
|
||||
title: '就诊人姓名',
|
||||
dataIndex: 'card_name_mask',
|
||||
},{
|
||||
title: '身份证号',
|
||||
dataIndex: 'id_number_mask',
|
||||
},{
|
||||
title: '与账号关系',
|
||||
dataIndex: 'relation',
|
||||
slotName:'relation'
|
||||
},{
|
||||
title: '添加时间',
|
||||
dataIndex: 'created_at',
|
||||
slotName:'created_at'
|
||||
}, { title: '操作', slotName: 'action'}])
|
||||
// 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: 'service_count',width:180 },
|
||||
{ title: '每月次数', dataIndex: 'monthly_frequency',slotName:'monthly_frequency', width:130 },
|
||||
{ title: '服务有效天数', dataIndex: 'effective_days', width: 150 },
|
||||
{ title: '服务费率', dataIndex: 'service_rate', slotName: 'service_rate',width:80 },
|
||||
{ title: '折扣商品总价格(元)', dataIndex: 'discount_product_total_amount',width:80 },
|
||||
{ title: '关联商品', dataIndex: 'health_package_product',slotName:'health_package_product',width:200 },
|
||||
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
||||
];
|
||||
|
||||
// Table Data
|
||||
const tableData = ref([]);
|
||||
//弹框状态
|
||||
const modalSatus = ref('add');
|
||||
|
||||
// 新增Satus
|
||||
const handleAdd = () => {
|
||||
modalVisible.value = true;
|
||||
package_id.value='';
|
||||
modalForm.service_count=null;
|
||||
modalForm.monthly_frequency=null;
|
||||
modalForm.effective_days=null;
|
||||
modalForm.health_package_product=[];
|
||||
modalForm.my_package_product=[];
|
||||
addChild.value.reset();
|
||||
|
||||
};
|
||||
|
||||
//详情
|
||||
const handleDetail = async (record) => {
|
||||
handleAdd();
|
||||
package_id.value=record.package_id;
|
||||
modalVisible.value = true;
|
||||
const {code,data}=await healthDetail(record.package_id);
|
||||
if(code==200){
|
||||
|
||||
Object.assign(modalForm,data);
|
||||
addChild.value.getData();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 分页改变
|
||||
* @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 getHealthList(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);
|
||||
};
|
||||
|
||||
// 重置搜索
|
||||
const handleResetQuery = () => {
|
||||
proxy.$refs.queryFormRef.resetFields();
|
||||
getInquiryInfo(queryForm);
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
getInquiryInfo(pager);
|
||||
});
|
||||
</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>
|
||||
326
src/views/inquiry/healthconfig/index.vue
Normal file
326
src/views/inquiry/healthconfig/index.vue
Normal file
@ -0,0 +1,326 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<a-form :model="queryForm" ref="queryFormRef" layout="inline">
|
||||
|
||||
<a-form-item field="doctor_name" label="医生姓名">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.doctor_name" placeholder="请输入姓名" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="mobile" label="电话号码">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.mobile" placeholder="请输入电话号码" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item>
|
||||
<a-space>
|
||||
<a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
|
||||
<a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
||||
<a-divider />
|
||||
<!-- action -->
|
||||
<div class="action">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysHealthconfigList: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"
|
||||
:scroll="{ x: 1500 }"
|
||||
: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 #doctor_name="{record}">
|
||||
<div>{{record.user_doctor.user_name}}</div>
|
||||
</template>
|
||||
<template #department_custom_name="{record}">
|
||||
<div>{{record.user_doctor.department_custom_name}}</div>
|
||||
</template>
|
||||
<template #doctor_title="{record}">
|
||||
<div>{{formatDoctorTitle(record.user_doctor.doctor_title)}}</div>
|
||||
</template>
|
||||
<template #multi_point_status="{record}">
|
||||
<div>{{formatMultipoint(record.user_doctor.multi_point_status)}}</div>
|
||||
</template>
|
||||
|
||||
<template #last_enable_method="{record}">
|
||||
<div class="reason" v-if="record.doctor_inquiry_config.last_enable_method==1" >自己</div>
|
||||
<div v-else>后台</div>
|
||||
</template>
|
||||
<template #monthly_frequency="{ record }">
|
||||
<div v-if="record.health_package.monthly_frequency==0">不限次</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 #service_rate="{ record }">
|
||||
<div>{{record.health_package.service_rate+"%"}}</div>
|
||||
</template>
|
||||
<template #action="{ record }">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysHealthconfigList: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>
|
||||
|
||||
<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"
|
||||
@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 { getHealthConfigList,healthConfigDetail} from '@/api/inquiry/service';
|
||||
import {formatDoctorTitle,formatMultipoint} from "@/utils/format"
|
||||
// Akiraka 20230210 删除数据
|
||||
const deleteData = ref([])
|
||||
// Akiraka 20230210 删除对话框
|
||||
const deleteVisible = ref(false)
|
||||
// Akiraka 20230210 监听删除事件
|
||||
const okVisible = ref(false);
|
||||
const health_package_id=ref("");
|
||||
watch(() => deleteVisible.value, (value) => {
|
||||
if (value == false) {
|
||||
getInquiryInfo(pager);
|
||||
}
|
||||
});
|
||||
|
||||
const addChild = ref(null);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const currentPage = ref(1);
|
||||
const family_data=ref([]);
|
||||
const family_columns=ref([{
|
||||
title: '编号',
|
||||
dataIndex: 'code',
|
||||
slotName:'code'
|
||||
},{
|
||||
title: '就诊人姓名',
|
||||
dataIndex: 'card_name_mask',
|
||||
},{
|
||||
title: '身份证号',
|
||||
dataIndex: 'id_number_mask',
|
||||
},{
|
||||
title: '与账号关系',
|
||||
dataIndex: 'relation',
|
||||
slotName:'relation'
|
||||
},{
|
||||
title: '添加时间',
|
||||
dataIndex: 'created_at',
|
||||
slotName:'created_at'
|
||||
}, { title: '操作', slotName: 'action'}])
|
||||
// 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: '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 },
|
||||
{ title: '多点执业', dataIndex: 'multi_point_status',slotName:'multi_point_status',width:180 },
|
||||
{ title: '每月次数', dataIndex: 'monthly_frequency',slotName:'monthly_frequency', width:130 },
|
||||
{ title: '服务有效天数', dataIndex: 'effective_days', slotName:'effective_days', width: 150 },
|
||||
{ title: '服务费率', dataIndex: 'service_rate', slotName: 'service_rate',width:80 },
|
||||
{ title: '服务价格(元)', dataIndex: 'service_price',width:80 },
|
||||
{ title: '启用状态', dataIndex: 'status',slotName:'status',width:100 },
|
||||
{ title: '申请人', dataIndex: 'last_enable_method',slotName:'last_enable_method',width:80 },
|
||||
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
||||
];
|
||||
|
||||
// Table Data
|
||||
const tableData = ref([]);
|
||||
//弹框状态
|
||||
const modalSatus = ref('add');
|
||||
|
||||
// 新增Satus
|
||||
const handleAdd = () => {
|
||||
modalVisible.value = true;
|
||||
health_package_id.value='';
|
||||
modalForm.health_package_id='';
|
||||
modalForm.package_id='';
|
||||
modalForm.doctor_id=null;
|
||||
modalForm.service_price=null;
|
||||
modalForm.is_enable=1;
|
||||
addChild.value.reset();
|
||||
|
||||
};
|
||||
const setPrice=(data)=>{
|
||||
modalForm.service_price=data;
|
||||
}
|
||||
//详情
|
||||
const handleDetail = async (record) => {
|
||||
health_package_id.value=record.health_package_id;
|
||||
modalVisible.value = true;
|
||||
const {code,data}=await healthConfigDetail(record.health_package_id);
|
||||
if(code==200){
|
||||
Object.assign(modalForm,data);
|
||||
if(data.doctor_inquiry_config){
|
||||
modalForm.is_enable=data.doctor_inquiry_config.is_enable
|
||||
}
|
||||
addChild.value.changeDoctor();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 分页改变
|
||||
* @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 getHealthConfigList(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>
|
||||
@ -29,6 +29,8 @@
|
||||
<a-option :value="5">会员</a-option>
|
||||
<a-option :value="6">疑难会诊</a-option>
|
||||
<a-option :value="7">附赠沟通</a-option>
|
||||
<a-option :value="8">健康包服务</a-option>
|
||||
<a-option :value="9">服务包服务</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="is_enable" label="启用状态">
|
||||
@ -110,12 +112,19 @@
|
||||
@deleteVisibleChange="() => deleteVisible = false" /> -->
|
||||
<!-- Akiraka 20230223 删除与批量删除 结束 -->
|
||||
<a-modal v-model:visible="okVisible" :modal-style="{width:'320px'}" body-class="okmodal"
|
||||
@cancel="()=>okVisible=false">
|
||||
@cancel="()=>okVisible=false" >
|
||||
<template #title>
|
||||
提示
|
||||
</template>
|
||||
<div>确定保存当前信息?</div>
|
||||
</a-modal>
|
||||
<a-modal v-model:visible="goVisible" :modal-style="{width:'320px'}" body-class="okmodal"
|
||||
@cancel="()=>goVisible=false" @ok="goOk">
|
||||
<template #title>
|
||||
提示
|
||||
</template>
|
||||
<div>{{goTitle}}</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -123,13 +132,16 @@
|
||||
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
||||
import { getInquiryconfigList} from '@/api/inquiry/config';
|
||||
import {formatDoctorTitle,formatInquiryType,formatMultipoint,formatMode} from "@/utils/format"
|
||||
|
||||
import {useRouter} from 'vue-router'
|
||||
const router = useRouter()
|
||||
// Akiraka 20230210 删除数据
|
||||
const deleteData = ref([])
|
||||
// Akiraka 20230210 删除对话框
|
||||
const deleteVisible = ref(false)
|
||||
// Akiraka 20230210 监听删除事件
|
||||
const okVisible = ref(false);
|
||||
const goVisible =ref(false);
|
||||
const goTitle=ref('即将跳转健康包配置列表?')
|
||||
const inquiry_config_id=ref("");
|
||||
watch(() => deleteVisible.value, (value) => {
|
||||
if (value == false) {
|
||||
@ -211,10 +223,26 @@
|
||||
|
||||
//详情
|
||||
const handleDetail = async (record) => {
|
||||
inquiry_config_id.value=record.inquiry_config_id;
|
||||
modalVisible.value = true;
|
||||
if(record.inquiry_mode==8){
|
||||
goVisible.value=true;
|
||||
goTitle.value='即将跳转健康包配置列表?'
|
||||
}else if(record.inquiry_mode==9){
|
||||
goVisible.value=true;
|
||||
goTitle.value='即将跳转随访包配置列表?'
|
||||
}else{
|
||||
inquiry_config_id.value=record.inquiry_config_id;
|
||||
modalVisible.value = true;
|
||||
}
|
||||
|
||||
};
|
||||
const goOk=()=>{
|
||||
if( goTitle.value=='即将跳转健康包配置列表?'){
|
||||
router.push('/inquiry/healthconfig')
|
||||
}else{
|
||||
router.push('/inquiry/visitconfig')
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* 分页改变
|
||||
* @param {Number} [page]
|
||||
|
||||
307
src/views/inquiry/visitconfig/index.vue
Normal file
307
src/views/inquiry/visitconfig/index.vue
Normal file
@ -0,0 +1,307 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<a-form :model="queryForm" ref="queryFormRef" layout="inline">
|
||||
|
||||
<a-form-item field="doctor_name" label="医生姓名">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.doctor_name" placeholder="请输入姓名" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
<a-form-item field="mobile" label="电话号码">
|
||||
<a-input :style="{ width: '182px' }" v-model="queryForm.mobile" placeholder="请输入电话号码" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item>
|
||||
<a-space>
|
||||
<a-button type="primary" @click="handleQuery"><icon-search /> 搜索</a-button>
|
||||
<a-button @click="handleResetQuery"><icon-loop /> 重置</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
||||
<a-divider />
|
||||
<!-- action -->
|
||||
<div class="action">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysVisitconfigList: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"
|
||||
:scroll="{ x: 1500 }"
|
||||
: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 #doctor_name="{record}">
|
||||
<div>{{record.user_doctor.user_name}}</div>
|
||||
</template>
|
||||
<template #department_custom_name="{record}">
|
||||
<div>{{record.user_doctor.department_custom_name}}</div>
|
||||
</template>
|
||||
<template #doctor_title="{record}">
|
||||
<div>{{formatDoctorTitle(record.user_doctor.doctor_title)}}</div>
|
||||
</template>
|
||||
<template #multi_point_status="{record}">
|
||||
<div>{{formatMultipoint(record.user_doctor.multi_point_status)}}</div>
|
||||
</template>
|
||||
|
||||
<template #last_enable_method="{record}">
|
||||
<div class="reason" v-if="record.doctor_inquiry_config && record.doctor_inquiry_config.last_enable_method==1" >自己</div>
|
||||
<div v-else>后台</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:sysVisitconfigList: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="handleQuery" @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';
|
||||
import {formatDoctorTitle,formatMultipoint} from "@/utils/format"
|
||||
// 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: '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 },
|
||||
{ title: '多点执业', dataIndex: 'multi_point_status',slotName:'multi_point_status',width:180 },
|
||||
// { 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: '申请人', dataIndex: 'last_enable_method',slotName:'last_enable_method',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
|
||||
}
|
||||
addChild.value.changeDoctor();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 分页改变
|
||||
* @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>
|
||||
@ -53,11 +53,11 @@
|
||||
<!-- action -->
|
||||
<div class="action">
|
||||
<a-space>
|
||||
<a-button v-has="'admin:sysMedinceList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
|
||||
<!-- <a-button v-has="'admin:sysMedinceList:remove'" type="primary" status="danger" @click="handleAdd"><icon-delete /> 删除 </a-button>
|
||||
<a-button v-has="'admin:sysMedinceList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增</a-button>
|
||||
<!-- <a-button v-has="'admin:sysMedinceList:remove'" type="primary" status="danger" @click="handleAdd"><icon-delete /> 删除 </a-button> -->
|
||||
<a-button v-has="'admin:sysMedinceList:selectExport'" type="primary" @click="handlExport(2)"><icon-export /> 选择数据导出 </a-button>
|
||||
<a-button v-has="'admin:sysMedinceList:searchExport'" type="primary" @click="handlExport(1)"><icon-export /> 当前搜索全部导出</a-button>
|
||||
<a-button v-has="'admin:sysMedinceList:allExport'" type="primary" @click="handlExport(3)"><icon-export /> 全部导出</a-button> -->
|
||||
<a-button v-has="'admin:sysMedinceList:allExport'" type="primary" @click="handlExport(3)"><icon-export /> 全部导出</a-button>
|
||||
</a-space>
|
||||
</div>
|
||||
|
||||
@ -106,7 +106,7 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, getCurrentInstance, onMounted, nextTick, watch, computed } from 'vue';
|
||||
import { getSysMedinceList,getSysMedinceDetail} from '@/api/medince/list';
|
||||
import { getSysMedinceList,getSysMedinceDetail,exportProduct} from '@/api/medince/list';
|
||||
import { downloadFile } from '@/utils/downloadFile';
|
||||
import {formatProductStatus} from '@/utils/format';
|
||||
// Akiraka 20230210 删除数据
|
||||
@ -115,6 +115,7 @@
|
||||
const deleteVisible = ref(false)
|
||||
// Akiraka 20230210 监听删除事件
|
||||
const okVisible = ref(false);
|
||||
const lock= ref(false);
|
||||
|
||||
watch(() => deleteVisible.value, (value) => {
|
||||
if (value == false) {
|
||||
@ -135,7 +136,7 @@
|
||||
};
|
||||
// form
|
||||
const queryForm = reactive({
|
||||
|
||||
order:null
|
||||
});
|
||||
const modalForm = reactive({
|
||||
user:{},
|
||||
@ -169,7 +170,30 @@
|
||||
{ title: '批准文号', dataIndex: 'license_number',width:200 },
|
||||
{ title: '生产厂家', dataIndex: 'manufacturer',width:200 },
|
||||
{ title: '药店编码', dataIndex: 'product_pharmacy_code',width:100 },
|
||||
{ title: '库存', dataIndex: 'stock',width:100 },
|
||||
{ title: '库存', dataIndex: 'stock',width:100,sortable: {
|
||||
sortDirections: ['ascend', 'descend',''],
|
||||
sorter:false
|
||||
// sorter:function(a,b,extra){
|
||||
|
||||
// console.log(extra);
|
||||
// if(extra.direction=='ascend'){
|
||||
// queryForm.order={
|
||||
// stock:'asc'
|
||||
// }
|
||||
// }else if(extra.direction=='descend'){
|
||||
// queryForm.order={
|
||||
// stock:'desc'
|
||||
// }
|
||||
// }else{
|
||||
// queryForm.order=null
|
||||
// }
|
||||
// if(!lock.value){
|
||||
// getMedinceInfo({ ...pager, ...queryForm });
|
||||
// lock.value=true;
|
||||
// }
|
||||
// return true
|
||||
// }
|
||||
}, },
|
||||
{ title: '购买上限', dataIndex: 'prescription_num',width:100 },
|
||||
{ title: '状态', dataIndex: 'product_status',slotName:'product_status',width:100 },
|
||||
// { title: '启用状态', dataIndex: 'status', slotName: 'status' },
|
||||
@ -265,6 +289,7 @@
|
||||
// 获取患者信息
|
||||
const getMedinceInfo = async (params = {}) => {
|
||||
const { data, code, message } = await getSysMedinceList(params);
|
||||
lock.value=false
|
||||
if (code == 200) {
|
||||
tableData.value = data.data;
|
||||
Object.assign(pager, { total: data.total, page: data.page, page_size: data.page_size });
|
||||
@ -322,9 +347,9 @@
|
||||
type
|
||||
}
|
||||
}
|
||||
const {code,data}=await exportFamily(fromData);
|
||||
const {code,data}=await exportProduct(fromData);
|
||||
if(code==200){
|
||||
downloadFile(data,'就诊人列表');
|
||||
downloadFile(data,'平台药品列表');
|
||||
}
|
||||
proxy.$loading.hide();
|
||||
}
|
||||
|
||||
@ -36,6 +36,79 @@
|
||||
@press-enter="handleQuery"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item field="consignee_name" label="收货人姓名">
|
||||
<a-input
|
||||
:style="{ width: '168px' }"
|
||||
v-model="queryForm.consignee_name"
|
||||
placeholder="请输入收货人姓名"
|
||||
@press-enter="handleQuery"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item field="consignee_tel" label="收货人电话">
|
||||
<a-input
|
||||
:style="{ width: '168px' }"
|
||||
v-model="queryForm.consignee_tel"
|
||||
placeholder="请输入收货人电话"
|
||||
@press-enter="handleQuery"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item field="product_name" label="药品名称">
|
||||
<a-input
|
||||
:style="{ width: '196px' }"
|
||||
v-model="queryForm.product_name"
|
||||
placeholder="请输入药品名称"
|
||||
@press-enter="handleQuery"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item field="common_name" label="药品通用名">
|
||||
<a-input
|
||||
:style="{ width: '168px' }"
|
||||
v-model="queryForm.ommon_name"
|
||||
placeholder="请输入药品通用名"
|
||||
@press-enter="handleQuery"
|
||||
/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item field="order_product_no" label="订单编号">
|
||||
<a-input
|
||||
:style="{ width: '182px' }"
|
||||
v-model="queryForm.order_product_no"
|
||||
placeholder="请输入订单编号"
|
||||
@press-enter="handleQuery"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item field="escrow_trade_no" label="支付流水号">
|
||||
<a-input
|
||||
:style="{ width: '168px' }"
|
||||
v-model="queryForm.escrow_trade_no"
|
||||
placeholder="请输入支付流水号"
|
||||
@press-enter="handleQuery"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item field="logistics_no" label="物流编号">
|
||||
<a-input
|
||||
:style="{ width: '196px' }"
|
||||
v-model="queryForm.logistics_no"
|
||||
placeholder="请输入物流编号"
|
||||
@press-enter="handleQuery"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item field="logistics_company_code" label="快递公司编码">
|
||||
<a-input
|
||||
:style="{ width: '154px' }"
|
||||
v-model="queryForm.logistics_company_code"
|
||||
placeholder="请输入物流编号"
|
||||
@press-enter="handleQuery"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item field="remarks" label="药品备注">
|
||||
<a-input
|
||||
:style="{ width: '182px' }"
|
||||
v-model="queryForm.remarks"
|
||||
placeholder="请输入药品备注"
|
||||
@press-enter="handleQuery"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item field="order_product_status" label="订单状态">
|
||||
<a-select
|
||||
|
||||
@ -51,6 +124,77 @@
|
||||
<a-option :value="5">已取消</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="order_product_status" label="支付渠道">
|
||||
<a-select
|
||||
|
||||
v-model="queryForm.order_product_status"
|
||||
placeholder="请选择支付渠道"
|
||||
:style="{ width: '182px' }"
|
||||
>
|
||||
<!-- 1:小程序支付 2:微信扫码支付) -->
|
||||
<a-option :value="1">小程序支付</a-option>
|
||||
<a-option :value="2">微信扫码支付</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="pay_status" label="订单状态">
|
||||
<a-select
|
||||
v-model="queryForm.pay_status"
|
||||
placeholder="请选择支付状态"
|
||||
:style="{ width: '182px' }"
|
||||
>
|
||||
<!-- 1:未支付 2:已支付 3:支付中 4:支付失败 5:支付超时 6:支付关闭 7:已撤销 8:转入退款 -->
|
||||
<a-option :value="1">未支付</a-option>
|
||||
<a-option :value="2">已支付</a-option>
|
||||
<a-option :value="3">支付中</a-option>
|
||||
<a-option :value="4">支付失败</a-option>
|
||||
<a-option :value="5">支付超时</a-option>
|
||||
<a-option :value="6">支付关闭</a-option>
|
||||
<a-option :value="7">已撤销</a-option>
|
||||
<a-option :value="8">转入退款</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="cancel_reason" label="取消原因">
|
||||
<a-select
|
||||
v-model="queryForm.cancel_reason"
|
||||
placeholder="请选择取消原因"
|
||||
:style="{ width: '182px' }"
|
||||
>
|
||||
<!-- 1:主动取消 2:复核失败/库存不足 3:支付超时 4:客服取消-->
|
||||
<a-option :value="1">主动取消</a-option>
|
||||
<a-option :value="2">复核失败/库存不足</a-option>
|
||||
<a-option :value="3">支付超时</a-option>
|
||||
<a-option :value="4">客服取消</a-option>
|
||||
<a-option :value="5">支付超时</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="refund_status" label="退款状态">
|
||||
<a-select
|
||||
v-model="queryForm.refund_status"
|
||||
placeholder="请选择退款状态"
|
||||
:style="{ width: '182px' }"
|
||||
>
|
||||
<!-- 0:无退款 1:申请退款 2:退款中 3:退款成功 4:拒绝退款 5:退款关闭 6:退款异常-->
|
||||
<a-option :value="0">无退款</a-option>
|
||||
<a-option :value="1">申请退款</a-option>
|
||||
<a-option :value="2">退款中</a-option>
|
||||
<a-option :value="3">退款成功</a-option>
|
||||
<a-option :value="4">拒绝退款</a-option>
|
||||
<a-option :value="5">退款关闭</a-option>
|
||||
<a-option :value="5">退款异常</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="report_pre_status" label="上报状态">
|
||||
<a-select
|
||||
v-model="queryForm.report_pre_status"
|
||||
placeholder="请选择上报状态"
|
||||
:style="{ width: '182px' }"
|
||||
>
|
||||
<!-- 0:未上报 1:已上报 2:上报失败-->
|
||||
<a-option :value="0">未上报</a-option>
|
||||
<a-option :value="1">已上报</a-option>
|
||||
<a-option :value="2">上报失败</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-row>
|
||||
<a-form-item field="delivery_range_time" label="发货时间范围">
|
||||
<a-range-picker
|
||||
@ -108,7 +252,7 @@
|
||||
<!-- table -->
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:scroll="{ x: 1700 }"
|
||||
:scroll="{ x: 1980 }"
|
||||
:data="tableData"
|
||||
:pagination="{
|
||||
'show-total': true,
|
||||
@ -226,6 +370,18 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12" >
|
||||
<a-form-item field="amount_total" label="优惠劵:">
|
||||
<span>{{modalForm.order_product_coupon?'-'+modalForm.order_product_coupon.coupon_use_price:0}}元</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="logistics_fee" label="优惠金额:">
|
||||
<span>{{ modalForm.discount_amount>0?'-'+modalForm.discount_amount:0 }}元</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="payment_amount_total" label="实付金额:">
|
||||
@ -629,6 +785,7 @@
|
||||
:okVisible="okVisible"
|
||||
:api="cancelProduct"
|
||||
:dealType="'order_inquiry_id'"
|
||||
:payment_amount_total="modalForm.payment_amount_total"
|
||||
:id="cur_product_id"
|
||||
@closeChange="closeChange"
|
||||
></confirmModal>
|
||||
@ -819,6 +976,8 @@ const columns = [
|
||||
slotName: 'patient_name_mask',
|
||||
width: 200,
|
||||
},
|
||||
{ title: '药品名称', dataIndex: 'product_name', width: 150 },
|
||||
{ title: '药品备注', dataIndex: 'remarks', width: 130 },
|
||||
{ title: '就诊人联系电话', dataIndex: 'patient_mobile', width: 130 },
|
||||
{ title: '订单金额', dataIndex: 'amount_total', slotName: 'amount_total' },
|
||||
{
|
||||
|
||||
@ -193,8 +193,8 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="coupon_amount_total" label="优惠卷:">
|
||||
<span v-if="modalForm.coupon_amount_total>0">{{modalForm.coupon_amount_total}}元</span>
|
||||
<a-form-item field="coupon_amount_total" label="优惠劵:">
|
||||
<span v-if="modalForm.order_inquiry_coupon">{{modalForm.order_inquiry_coupon.coupon_use_price?'-'+modalForm.order_inquiry_coupon.coupon_use_price:0}}元</span>
|
||||
<span v-else>无</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@ -217,6 +217,31 @@
|
||||
<span>{{formatMode(modalForm.inquiry_mode)}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" v-if="parseTime(modalForm.reception_time)">
|
||||
<a-form-item field="reception_time" label="接诊时间:">
|
||||
<span>{{parseTime(modalForm.reception_time)}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="parseTime(modalForm.complete_time) || parseTime(modalForm.finish_time) ">
|
||||
<a-col :span="12" v-if="parseTime(modalForm.complete_time)">
|
||||
<a-form-item field="reception_time" label="完成时间:">
|
||||
<span>{{parseTime(modalForm.complete_time)}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" v-if="parseTime(modalForm.finish_time)">
|
||||
<a-form-item field="finish_time" label="结束时间:">
|
||||
<span>{{parseTime(modalForm.finish_time)}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="parseTime(modalForm.cancel_time)">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="inquiry_mode" label="取消时间:">
|
||||
<span>{{parseTime(modalForm.cancel_time)}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="modalForm.cancel_reason">
|
||||
<a-col :span="24">
|
||||
@ -327,7 +352,17 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="modalForm.order_inquiry_case && modalForm.order_inquiry_case.diagnose_images">
|
||||
<a-col :span="24" >
|
||||
<a-form-item field="inquiry_no" label="复诊凭证:">
|
||||
<a-image
|
||||
v-for="(item,index) in diagnose_images"
|
||||
width="100" :src="imgHost+'/'+item" style="margin-right: 10px;"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-divider />
|
||||
|
||||
<div class="titlebox" v-if="modalForm.order_evaluation">
|
||||
<div class="bar"></div>
|
||||
<div class="name">评价信息</div>
|
||||
@ -399,7 +434,7 @@
|
||||
<a-space style="margin-right: 8px;" v-if="modalForm.inquiry_status==4 || modalForm.inquiry_status==5 || modalForm.inquiry_status==6">
|
||||
<a-button type="primary" @click="openInquiryRecord" v-has="'admin:sysOrderList:record'">问诊记录</a-button>
|
||||
</a-space>
|
||||
<a-space style="margin-right: 8px;" v-if="modalForm.inquiry_status==4 || modalForm.inquiry_status==5">
|
||||
<a-space style="margin-right: 8px;" v-if="(modalForm.inquiry_status==4 || modalForm.inquiry_status==5) && (modalForm.inquiry_mode!=8 && modalForm.inquiry_mode!=9)">
|
||||
<a-button type="primary" status="danger" v-has="'admin:sysOrderList:cancel'" @click="()=>{okVisible=true;cur_inruiry_id=modalForm.order_inquiry_id;}">取消问诊</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
@ -447,7 +482,7 @@ import { downloadFile } from '@/utils/downloadFile';
|
||||
const deleteData = ref([])
|
||||
// Akiraka 20230210 删除对话框
|
||||
const deleteVisible = ref(false)
|
||||
|
||||
const imgHost=import.meta.env.VITE_IMG_URL;
|
||||
const doctorVisible=ref(false);
|
||||
const okVisible=ref(false);
|
||||
const cur_inruiry_id=ref('');
|
||||
@ -469,6 +504,7 @@ watch(() => deleteVisible.value ,(value) => {
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const currentPage = ref(1);
|
||||
const diagnose_images=ref([]);
|
||||
// Pager
|
||||
const pager = {
|
||||
total: 0,
|
||||
@ -670,6 +706,10 @@ const handleQuery = async () => {
|
||||
const caseInfo= await inquiryCase(data.order_inquiry_case.inquiry_case_id);
|
||||
Object.assign(patientData,caseInfo.data);
|
||||
|
||||
};
|
||||
if(data.order_inquiry_case && data.order_inquiry_case.diagnose_images
|
||||
){
|
||||
diagnose_images.value=data.order_inquiry_case.diagnose_images.split(',');
|
||||
}
|
||||
if(result){
|
||||
Object.assign(comment,{
|
||||
@ -728,7 +768,10 @@ const openInquiryRecord=()=>{
|
||||
const handelCloseChange=(data)=>{
|
||||
cur_inruiry_id.value="";
|
||||
okVisible.value=false;
|
||||
console.log(data)
|
||||
console.log(data);
|
||||
if(cancleType.value=="service"){
|
||||
modalForm.status=5;
|
||||
}
|
||||
if(data){
|
||||
modalVisible.value=false;
|
||||
getOrderInfo({ ...pager, ...queryForm });
|
||||
|
||||
1653
src/views/order/service-list/index.vue
Normal file
1653
src/views/order/service-list/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -176,6 +176,8 @@
|
||||
{ title: '账号电话', dataIndex: 'mobile_mask',width:200 },
|
||||
{ title: '与账号关系', dataIndex: 'relation', slotName: 'relation',width: 150 },
|
||||
// { title: '启用状态', dataIndex: 'status', slotName: 'status' },
|
||||
{ title: '绑定时间', dataIndex: 'created_at', width: 180 },
|
||||
|
||||
{ title: '操作', slotName: 'action', fixed: "right", width: 180 },
|
||||
];
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user