优惠卷修改
This commit is contained in:
parent
a222ff2444
commit
c3ab42a027
@ -27,4 +27,32 @@ export function addHealth(data){//健康包管理-获取健康包详情
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
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
|
||||||
|
})
|
||||||
}
|
}
|
||||||
@ -13,7 +13,12 @@
|
|||||||
<div class="bar"></div>
|
<div class="bar"></div>
|
||||||
<div class="name">优惠卷信息</div>
|
<div class="name">优惠卷信息</div>
|
||||||
</div>
|
</div>
|
||||||
<a-form :model="modalForm" ref="modalFormRef" :auto-label-width="true" :rules="rules">
|
<a-form
|
||||||
|
:model="modalForm"
|
||||||
|
ref="modalFormRef"
|
||||||
|
:auto-label-width="true"
|
||||||
|
:rules="rules"
|
||||||
|
>
|
||||||
<a-row :gutter="24" style="margin-top: 35px">
|
<a-row :gutter="24" style="margin-top: 35px">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item field="coupon_name" label="优惠卷名称:">
|
<a-form-item field="coupon_name" label="优惠卷名称:">
|
||||||
@ -120,11 +125,11 @@
|
|||||||
v-model="modalForm.inquiry_type"
|
v-model="modalForm.inquiry_type"
|
||||||
>
|
>
|
||||||
<!-- 1:'专家问诊', 2:'快速问诊', 3:'公益问诊', 4:'问诊购药',5:'糖组检测') -->
|
<!-- 1:'专家问诊', 2:'快速问诊', 3:'公益问诊', 4:'问诊购药',5:'糖组检测') -->
|
||||||
<a-option key="1" value="1" label="专家问诊">专家问诊</a-option>
|
<a-option key="1" value="1" label="专家问诊">专家问诊</a-option>
|
||||||
<a-option key="2" value="2" label="快速问诊">快速问诊</a-option>
|
<a-option key="2" value="2" label="快速问诊">快速问诊</a-option>
|
||||||
<a-option key="3" value="3" label="公益问诊">公益问诊</a-option>
|
<a-option key="3" value="3" label="公益问诊">公益问诊</a-option>
|
||||||
<a-option key="4" value="4" label="问诊购药">问诊购药</a-option>
|
<a-option key="4" value="4" label="问诊购药">问诊购药</a-option>
|
||||||
<a-option key="5" value="5" label="糖组检测">糖组检测</a-option>
|
<a-option key="5" value="5" label="糖组检测">糖组检测</a-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@ -135,7 +140,8 @@
|
|||||||
<a-input-number
|
<a-input-number
|
||||||
v-model="modalForm.coupon_count"
|
v-model="modalForm.coupon_count"
|
||||||
:style="{ width: '320px' }"
|
:style="{ width: '320px' }"
|
||||||
:step="1" :precision="0"
|
:step="1"
|
||||||
|
:precision="0"
|
||||||
placeholder="请输入发放数量"
|
placeholder="请输入发放数量"
|
||||||
class="input-demo"
|
class="input-demo"
|
||||||
:min="1"
|
:min="1"
|
||||||
@ -143,6 +149,38 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</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-row :gutter="24">
|
||||||
<a-col a-col :span="24">
|
<a-col a-col :span="24">
|
||||||
<a-form-item field="coupon_price" label="优惠卷金额:">
|
<a-form-item field="coupon_price" label="优惠卷金额:">
|
||||||
@ -155,13 +193,18 @@
|
|||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24" v-if="showTimeRange">
|
<a-row :gutter="24" v-if="showTimeRange">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item field="valid_start_time" :validate-trigger="['input']" label="有效时间:" :rules="[{required: true,message:'请选择有效时间'}]">
|
<a-form-item
|
||||||
|
field="valid_start_time"
|
||||||
|
:validate-trigger="['input']"
|
||||||
|
label="有效时间:"
|
||||||
|
:rules="[{ required: true, message: '请选择有效时间' }]"
|
||||||
|
>
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
v-model='rangeValue'
|
v-model="rangeValue"
|
||||||
style="width: 360px;"
|
style="width: 360px"
|
||||||
show-time
|
show-time
|
||||||
:defaultValue="defaultValue"
|
:defaultValue="defaultValue"
|
||||||
:disabled-date="disabledDate"
|
:disabled-date="disabledDate"
|
||||||
@ -175,12 +218,17 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24" v-if="showValidDay">
|
<a-row :gutter="24" v-if="showValidDay">
|
||||||
<a-col a-col :span="24">
|
<a-col a-col :span="24">
|
||||||
<a-form-item field="valid_days" label="领取之日起有效天数:" :rules="[{required: true,message:'请输入领取之日起有效天数'}]">
|
<a-form-item
|
||||||
|
field="valid_days"
|
||||||
|
label="领取之日起有效天数:"
|
||||||
|
:rules="[{ required: true, message: '请输入领取之日起有效天数' }]"
|
||||||
|
>
|
||||||
<a-input-number
|
<a-input-number
|
||||||
v-model="modalForm.valid_days"
|
v-model="modalForm.valid_days"
|
||||||
:style="{ width: '320px' }"
|
:style="{ width: '320px' }"
|
||||||
placeholder="请输入有效天数"
|
placeholder="请输入有效天数"
|
||||||
:step="1" :precision="0"
|
:step="1"
|
||||||
|
:precision="0"
|
||||||
class="input-demo"
|
class="input-demo"
|
||||||
:min="1"
|
:min="1"
|
||||||
/>
|
/>
|
||||||
@ -189,7 +237,11 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24" v-if="showManjian">
|
<a-row :gutter="24" v-if="showManjian">
|
||||||
<a-col a-col :span="24">
|
<a-col a-col :span="24">
|
||||||
<a-form-item field="with_amount" label="满减金额(元):" :rules="[{required: true,message:'请输入满减金额'}]">
|
<a-form-item
|
||||||
|
field="with_amount"
|
||||||
|
label="满减金额(元):"
|
||||||
|
:rules="[{ required: true, message: '请输入满减金额' }]"
|
||||||
|
>
|
||||||
<a-input-number
|
<a-input-number
|
||||||
v-model="modalForm.with_amount"
|
v-model="modalForm.with_amount"
|
||||||
:style="{ width: '320px' }"
|
:style="{ width: '320px' }"
|
||||||
@ -202,14 +254,19 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24" v-if="showMinNumber">
|
<a-row :gutter="24" v-if="showMinNumber">
|
||||||
<a-col a-col :span="24">
|
<a-col a-col :span="24">
|
||||||
<a-form-item field="min_usable_number" label="单商品最小可使用数量:" :rules="[{required: true,message:'请输入单商品最小可使用数量'}]">
|
<a-form-item
|
||||||
|
field="min_usable_number"
|
||||||
|
label="单商品最小可使用数量:"
|
||||||
|
:rules="[{ required: true, message: '请输入单商品最小可使用数量' }]"
|
||||||
|
>
|
||||||
<a-input-number
|
<a-input-number
|
||||||
v-model="modalForm.min_usable_number"
|
v-model="modalForm.min_usable_number"
|
||||||
:style="{ width: '320px' }"
|
:style="{ width: '320px' }"
|
||||||
placeholder="请输入单商品最小可使用数量"
|
placeholder="请输入单商品最小可使用数量"
|
||||||
class="input-demo"
|
class="input-demo"
|
||||||
:min="1"
|
:min="1"
|
||||||
:step="1" :precision="0"
|
:step="1"
|
||||||
|
:precision="0"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@ -222,7 +279,8 @@
|
|||||||
:style="{ width: '320px' }"
|
:style="{ width: '320px' }"
|
||||||
placeholder="请输入发放关联天数"
|
placeholder="请输入发放关联天数"
|
||||||
class="input-demo"
|
class="input-demo"
|
||||||
:step="1" :precision="0"
|
:step="1"
|
||||||
|
:precision="0"
|
||||||
:min="1"
|
:min="1"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@ -237,27 +295,50 @@
|
|||||||
</a-row> -->
|
</a-row> -->
|
||||||
<a-row :gutter="24" v-if="showProduct">
|
<a-row :gutter="24" v-if="showProduct">
|
||||||
<a-col a-col :span="12">
|
<a-col a-col :span="12">
|
||||||
<a-form-item field="product_id" label="关联商品:" :rules="[{required: true,message:'请选择关联商品'}]">
|
<a-form-item
|
||||||
<a-select multiple v-model="modalForm.product_id" placeholder="请选择关联商品" allow-search
|
field="product_id"
|
||||||
:loading="loading" @search="handleGetProduct">
|
label="关联商品:"
|
||||||
<a-option v-for="item in productList" :key="item.product_id" :value="item.product_id" :label="item.product_name">
|
: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 }}
|
{{ item.product_name }}
|
||||||
</a-option>
|
</a-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col a-col :span="24">
|
<a-col a-col :span="24">
|
||||||
<a-form-item field="is_display" label="是否展示:">
|
<a-form-item field="is_display" label="是否展示:">
|
||||||
<a-switch v-model="modalForm.is_display" :checked-value="1" :unchecked-value="0"/>
|
<a-switch
|
||||||
|
v-model="modalForm.is_display"
|
||||||
|
:checked-value="1"
|
||||||
|
:unchecked-value="0"
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col a-col :span="24">
|
<a-col a-col :span="24">
|
||||||
<a-form-item field="is_mutex" label="是否互斥:">
|
<a-form-item field="is_mutex" label="是否互斥:">
|
||||||
<a-switch v-model="modalForm.is_mutex" :checked-value="1" :unchecked-value="0"/>
|
<a-switch
|
||||||
|
v-model="modalForm.is_mutex"
|
||||||
|
:checked-value="1"
|
||||||
|
:unchecked-value="0"
|
||||||
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@ -277,7 +358,11 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="24" v-if="modalForm.coupon_id">
|
<a-row :gutter="24" v-if="modalForm.coupon_id">
|
||||||
<a-col a-col :span="12">
|
<a-col a-col :span="12">
|
||||||
<a-form-item field="inquiry_type" label="状态:" :style="{width:'320px'}">
|
<a-form-item
|
||||||
|
field="inquiry_type"
|
||||||
|
label="状态:"
|
||||||
|
:style="{ width: '320px' }"
|
||||||
|
>
|
||||||
<a-select
|
<a-select
|
||||||
placeholder="请选择发放类型"
|
placeholder="请选择发放类型"
|
||||||
:disabled="modalForm.coupon_id"
|
:disabled="modalForm.coupon_id"
|
||||||
@ -315,6 +400,28 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</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-form>
|
||||||
<a-divider />
|
<a-divider />
|
||||||
<div class="titlebox">
|
<div class="titlebox">
|
||||||
@ -333,16 +440,20 @@
|
|||||||
>
|
>
|
||||||
</a-space>
|
</a-space>
|
||||||
|
|
||||||
<a-space style="margin-right: 8px" v-else>
|
<a-space style="margin-right: 8px" v-else>
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-has="'admin:sysCouponList:edit'"
|
v-has="'admin:sysCouponList:edit'"
|
||||||
status="danger"
|
status="danger"
|
||||||
|
:disabled="modalForm.coupon_status == 2"
|
||||||
@click="handleUpdateCoupon"
|
@click="handleUpdateCoupon"
|
||||||
>修改</a-button
|
>修改</a-button
|
||||||
>
|
>
|
||||||
</a-space>
|
</a-space>
|
||||||
<a-space style="margin-right: 8px" v-if="modalForm.coupon_id && modalForm.coupon_status==1">
|
<a-space
|
||||||
|
style="margin-right: 8px"
|
||||||
|
v-if="modalForm.coupon_id && modalForm.coupon_status == 1"
|
||||||
|
>
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-has="'admin:sysCouponList:force'"
|
v-has="'admin:sysCouponList:force'"
|
||||||
@ -356,21 +467,26 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<isOkCouponModal
|
<isOkCouponModal
|
||||||
:isVisible="isVisible"
|
:isVisible="isVisible"
|
||||||
:api="updateCouponStatus"
|
:api="updateCouponStatus"
|
||||||
:title="okTitle"
|
:title="okTitle"
|
||||||
:dealType="'status'"
|
:dealType="'status'"
|
||||||
:id="modalForm.coupon_id"
|
:id="modalForm.coupon_id"
|
||||||
@closeChangeOk="closeChangeOk"
|
@closeChangeOk="closeChangeOk"
|
||||||
></isOkCouponModal>
|
></isOkCouponModal>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, toRefs, watch,getCurrentInstance,defineExpose} from 'vue';
|
import { ref, toRefs, watch, getCurrentInstance, defineExpose } from 'vue';
|
||||||
import { addCoupon,updateCoupon,getProduct,updateCouponStatus } from '@/api/coupon/list';
|
import {
|
||||||
|
addCoupon,
|
||||||
|
updateCoupon,
|
||||||
|
getProduct,
|
||||||
|
updateCouponStatus,
|
||||||
|
} from '@/api/coupon/list';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs';
|
||||||
const emits = defineEmits(['closeChange','changeTimeRange','freshDetail']);
|
const emits = defineEmits(['closeChange', 'changeTimeRange', 'freshDetail']);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 是否显示
|
// 是否显示
|
||||||
modalVisible: {
|
modalVisible: {
|
||||||
@ -379,9 +495,7 @@ const props = defineProps({
|
|||||||
},
|
},
|
||||||
modalForm: {
|
modalForm: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {
|
default: {},
|
||||||
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const valid_start_time = ref('');
|
const valid_start_time = ref('');
|
||||||
@ -391,39 +505,74 @@ const showManjian = ref(false);
|
|||||||
const showMinNumber = ref(false);
|
const showMinNumber = ref(false);
|
||||||
const showConnectType = ref(false);
|
const showConnectType = ref(false);
|
||||||
const showProduct = ref(false);
|
const showProduct = ref(false);
|
||||||
const showTimeRange =ref(false);
|
const showTimeRange = ref(false);
|
||||||
const showValidDay = ref(false);
|
const showValidDay = ref(false);
|
||||||
const showDistributionDay= ref(false);
|
const showDistributionDay = ref(false);
|
||||||
const defaultValue = ref([]);
|
const defaultValue = ref([]);
|
||||||
const rangeValue=ref([]);
|
const rangeValue = ref([]);
|
||||||
const productList=ref([]);
|
const productList = ref([]);
|
||||||
const loading=ref(false);
|
const loading = ref(false);
|
||||||
const okTitle=ref('');
|
const okTitle = ref('');
|
||||||
const isVisible=ref(false);
|
const isVisible = ref(false);
|
||||||
const showCoupon=()=>{
|
const showCoupon = () => {
|
||||||
okTitle.value='确定强制失效吗?'
|
okTitle.value = '确定强制失效吗?';
|
||||||
isVisible.value=true;
|
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 closeChangeOk = () => {
|
const closeChangeOk = () => {
|
||||||
isVisible.value = false;
|
isVisible.value = false;
|
||||||
modalVisible.value = false;
|
modalVisible.value = false;
|
||||||
emits('freshDetail',{
|
handleClose();
|
||||||
coupon_id:modalForm.value.coupon_id
|
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;
|
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;
|
loading.value = false;
|
||||||
}
|
};
|
||||||
const changeType = (val) => {
|
const changeType = (val) => {
|
||||||
showManjian.value = false;
|
showManjian.value = false;
|
||||||
showMinNumber.value = false;
|
showMinNumber.value = false;
|
||||||
@ -434,16 +583,19 @@ const changeType = (val) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const changeValidType = (val) => {
|
const changeValidType = (val) => {
|
||||||
showTimeRange.value=false;
|
showTimeRange.value = false;
|
||||||
showValidDay.value=false;
|
showValidDay.value = false;
|
||||||
if (val == 1) {
|
if (val == 1) {
|
||||||
showTimeRange.value=true;
|
showTimeRange.value = true;
|
||||||
if(modalForm.value.valid_start_time){
|
if (modalForm.value.valid_start_time) {
|
||||||
rangeValue.value=[modalForm.value.valid_start_time,modalForm.value.valid_end_time]
|
rangeValue.value = [
|
||||||
}
|
modalForm.value.valid_start_time,
|
||||||
}else{
|
modalForm.value.valid_end_time,
|
||||||
showValidDay.value=true;
|
];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
showValidDay.value = true;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const changeScope = (val) => {
|
const changeScope = (val) => {
|
||||||
showConnectType.value = false;
|
showConnectType.value = false;
|
||||||
@ -457,206 +609,258 @@ const changeScope = (val) => {
|
|||||||
showConnectType.value = true;
|
showConnectType.value = true;
|
||||||
} else if (val == 5) {
|
} else if (val == 5) {
|
||||||
showProduct.value = true;
|
showProduct.value = true;
|
||||||
handleGetProduct('',modalForm.value.product_id);
|
handleGetProduct('', modalForm.value.product_id);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const changeObject = (val) => {
|
const changeObject = (val) => {
|
||||||
showDistributionDay.value = false;
|
showDistributionDay.value = false;
|
||||||
if(val==4){
|
if (val == 4) {
|
||||||
showDistributionDay.value = true;
|
showDistributionDay.value = true;
|
||||||
};
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.modalForm,
|
() => props.modalForm,
|
||||||
() => {
|
() => {
|
||||||
//console.log(props.modalForm);
|
//console.log(props.modalForm);
|
||||||
if(props.modalForm.coupon_id){
|
if (props.modalForm.coupon_id) {
|
||||||
changeType(props.modalForm.coupon_type);
|
changeType(props.modalForm.coupon_type);
|
||||||
changeScope(props.modalForm.application_scope);
|
changeScope(props.modalForm.application_scope);
|
||||||
changeObject(props.modalForm.distribution_object);
|
changeObject(props.modalForm.distribution_object);
|
||||||
changeValidType(props.modalForm.valid_type);
|
changeValidType(props.modalForm.valid_type);
|
||||||
if(props.modalForm.valid_start_time && props.modalForm.valid_end_time){
|
if (props.modalForm.valid_start_time && props.modalForm.valid_end_time) {
|
||||||
defaultValue.value=[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 }
|
{ immediate: true, deep: true }
|
||||||
);
|
);
|
||||||
const onOk = (dateString, date) => {
|
const onOk = (dateString, date) => {
|
||||||
[valid_start_time.value,valid_end_time.value] = dateString;
|
[valid_start_time.value, valid_end_time.value] = dateString;
|
||||||
rangeValue.value=[valid_start_time.value,valid_end_time.value]
|
rangeValue.value = [valid_start_time.value, valid_end_time.value];
|
||||||
emits('changeTimeRange',{
|
emits('changeTimeRange', {
|
||||||
valid_start_time:valid_start_time.value,
|
valid_start_time: valid_start_time.value,
|
||||||
valid_end_time:valid_end_time.value
|
valid_end_time: valid_end_time.value,
|
||||||
})
|
});
|
||||||
proxy.$refs.modalFormRef.validateField('valid_start_time',(valid)=>{
|
proxy.$refs.modalFormRef.validateField('valid_start_time', (valid) => {
|
||||||
if(!valid){
|
if (!valid) {
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
};
|
||||||
|
const clearDate = () => {
|
||||||
|
valid_start_time.value = '';
|
||||||
|
valid_end_time.value = '';
|
||||||
|
emits('changeTimeRange', {
|
||||||
|
valid_start_time: '',
|
||||||
|
valid_end_time: '',
|
||||||
|
});
|
||||||
};
|
};
|
||||||
const clearDate=()=>{
|
|
||||||
valid_start_time.value='';
|
|
||||||
valid_end_time.value='';
|
|
||||||
emits('changeTimeRange',{
|
|
||||||
valid_start_time:'',
|
|
||||||
valid_end_time:''
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const changeStatus=()=>{
|
const changeStatus = () => {
|
||||||
showConnectType.value = false;
|
showConnectType.value = false;
|
||||||
showProduct.value = false;
|
showProduct.value = false;
|
||||||
showManjian.value = false;
|
showManjian.value = false;
|
||||||
showMinNumber.value = false;
|
showMinNumber.value = false;
|
||||||
showDistributionDay.value = false;
|
showDistributionDay.value = false;
|
||||||
showTimeRange.value=false;
|
showTimeRange.value = false;
|
||||||
showValidDay.value=false;
|
showValidDay.value = false;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
emits('closeChange', (modalVisible.value = false));
|
emits('closeChange', (modalVisible.value = false));
|
||||||
proxy.$refs.modalFormRef.resetFields();
|
proxy.$refs.modalFormRef.resetFields();
|
||||||
};
|
};
|
||||||
const disabledDate = (time) => {
|
const disabledDate = (time) => {
|
||||||
return time.getTime() < Date.now() - 8.64e7;
|
return time.getTime() < Date.now() - 8.64e7;
|
||||||
};
|
};
|
||||||
const handleAddCoupon=()=>{
|
const handleAddCoupon = () => {
|
||||||
proxy.$refs.modalFormRef.validate(async(valid) => {
|
proxy.$refs.modalFormRef.validate(async (valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
let {coupon_name,coupon_client,coupon_type,distribution_object,application_scope,
|
let {
|
||||||
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;
|
coupon_name,
|
||||||
let product_id_arr=[];
|
coupon_client,
|
||||||
if(product_id && typeof product_id === 'string'){
|
coupon_type,
|
||||||
product_id_arr=product_id.split(',');
|
distribution_object,
|
||||||
}else if(product_id && product_id instanceof Array){
|
application_scope,
|
||||||
product_id_arr=product_id;
|
inquiry_type,
|
||||||
}
|
is_mutex,
|
||||||
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,
|
is_display,
|
||||||
};
|
distribution_with_day,
|
||||||
if(showManjian.value){
|
min_usable_number,
|
||||||
basicObj.with_amount= with_amount
|
coupon_count,
|
||||||
};
|
coupon_price,
|
||||||
if(showMinNumber.value){
|
with_amount,
|
||||||
basicObj.min_usable_number=min_usable_number;
|
valid_type,
|
||||||
}
|
valid_days,
|
||||||
if(showDistributionDay.value){
|
valid_start_time,
|
||||||
basicObj.distribution_with_day=distribution_with_day;
|
valid_end_time,
|
||||||
}
|
product_id,
|
||||||
if(showConnectType.value){
|
reissue_interval_days,
|
||||||
basicObj.inquiry_type=inquiry_type;
|
is_reissuable_after_expire,
|
||||||
};
|
is_popup,
|
||||||
if(showProduct.value){
|
coupon_desc,
|
||||||
basicObj.product_id= product_id_arr
|
} = props.modalForm;
|
||||||
};
|
let product_id_arr = [];
|
||||||
if(showValidDay.value){
|
if (product_id && typeof product_id === 'string') {
|
||||||
basicObj.valid_days=valid_days;
|
product_id_arr = product_id.split(',');
|
||||||
}
|
} else if (product_id && product_id instanceof Array) {
|
||||||
if(showTimeRange.value){
|
product_id_arr = product_id;
|
||||||
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");
|
let basicObj = {
|
||||||
}
|
coupon_name,
|
||||||
const {code}=await addCoupon(basicObj)
|
coupon_client,
|
||||||
if(code==200){
|
coupon_type,
|
||||||
Message.success("添加成功");
|
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();
|
handleClose();
|
||||||
}else{
|
} else {
|
||||||
proxy.$notification.error(response.message);
|
proxy.$notification.error(response.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
const handleUpdateCoupon=async()=>{
|
const handleUpdateCoupon = async () => {
|
||||||
proxy.$refs.modalFormRef.validate(async(valid) => {
|
proxy.$refs.modalFormRef.validate(async (valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
let {coupon_id,coupon_name,coupon_client,coupon_type,distribution_object,application_scope,
|
let {
|
||||||
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;
|
coupon_id,
|
||||||
let product_id_arr=[];
|
coupon_name,
|
||||||
console.log(product_id);
|
coupon_client,
|
||||||
if(product_id && typeof product_id === 'string'){
|
coupon_type,
|
||||||
product_id_arr=product_id.split(',');
|
distribution_object,
|
||||||
}else if(product_id && product_id instanceof Array){
|
application_scope,
|
||||||
product_id_arr=product_id;
|
inquiry_type,
|
||||||
}
|
is_mutex,
|
||||||
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,
|
is_display,
|
||||||
};
|
distribution_with_day,
|
||||||
if(showManjian.value){
|
min_usable_number,
|
||||||
basicObj.with_amount= with_amount
|
coupon_count,
|
||||||
};
|
coupon_price,
|
||||||
if(showMinNumber.value){
|
with_amount,
|
||||||
basicObj.min_usable_number=min_usable_number;
|
valid_type,
|
||||||
}
|
valid_days,
|
||||||
if(showDistributionDay.value){
|
valid_start_time,
|
||||||
basicObj.distribution_with_day=distribution_with_day;
|
valid_end_time,
|
||||||
}
|
product_id,
|
||||||
if(showConnectType.value){
|
reissue_interval_days,
|
||||||
basicObj.inquiry_type=inquiry_type;
|
is_reissuable_after_expire,
|
||||||
};
|
is_popup,
|
||||||
if(showProduct.value){
|
coupon_desc,
|
||||||
basicObj.product_id= product_id_arr
|
} = props.modalForm;
|
||||||
};
|
let product_id_arr = [];
|
||||||
if(showValidDay.value){
|
console.log(product_id);
|
||||||
basicObj.valid_days=valid_days;
|
if (product_id && typeof product_id === 'string') {
|
||||||
}
|
product_id_arr = product_id.split(',');
|
||||||
if(showTimeRange.value){
|
} else if (product_id && product_id instanceof Array) {
|
||||||
basicObj.valid_start_time=valid_start_time;
|
product_id_arr = product_id;
|
||||||
basicObj.valid_end_time=valid_end_time;
|
}
|
||||||
}
|
let basicObj = {
|
||||||
const {code}=await updateCoupon(coupon_id,basicObj)
|
coupon_name,
|
||||||
if(code==200){
|
coupon_client,
|
||||||
Message.success("修改成功");
|
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();
|
handleClose();
|
||||||
}else{
|
} else {
|
||||||
proxy.$notification.error(response.message);
|
proxy.$notification.error(response.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
};
|
};
|
||||||
const rules = {
|
const rules = {
|
||||||
coupon_name: [{ required: true, message: '请输入优惠卷名称' }],
|
coupon_name: [{ required: true, message: '请输入优惠卷名称' }],
|
||||||
coupon_client:[{ required: true, message: '请选择使用平台' }],
|
coupon_client: [{ required: true, message: '请选择使用平台' }],
|
||||||
application_scope: [{ required: true, message: '请选择使用范围' }],
|
application_scope: [{ required: true, message: '请选择使用范围' }],
|
||||||
coupon_type:[{ required: true, message: '请选择发放类型' }],
|
coupon_type: [{ required: true, message: '请选择发放类型' }],
|
||||||
distribution_object:[{ required: true, message: '请选择发放对象' }],
|
distribution_object: [{ required: true, message: '请选择发放对象' }],
|
||||||
valid_type:[{ required: true, message: '请选择有效类型' }],
|
valid_type: [{ required: true, message: '请选择有效类型' }],
|
||||||
};
|
};
|
||||||
defineExpose({
|
defineExpose({
|
||||||
changeStatus
|
changeStatus,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
279
src/views/inquiry/healthconfig/index.vue
Normal file
279
src/views/inquiry/healthconfig/index.vue
Normal file
@ -0,0 +1,279 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!-- action -->
|
||||||
|
<div class="action">
|
||||||
|
<a-space>
|
||||||
|
<a-button v-has="'admin:sysDoctorconfigList:add'" type="primary" @click="handleAdd"><icon-plus /> 新增 </a-button>
|
||||||
|
<!-- <a-button v-has="'admin:sysFamilyList:remove'" type="primary" status="danger"><icon-delete /> 批量删除 </a-button> -->
|
||||||
|
</a-space>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- table -->
|
||||||
|
<a-table :columns="columns" :data="tableData"
|
||||||
|
|
||||||
|
: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 #inquiry_mode="{ record }">
|
||||||
|
<div v-if="record.doctor_inquiry_config.inquiry_mode==8">健康包</div>
|
||||||
|
<div v-else-if="record.doctor_inquiry_config.inquiry_mode==9">随访包</div>
|
||||||
|
</template>
|
||||||
|
<!-- <template #monthly_frequency="{ record }">
|
||||||
|
<div v-if="record.monthly_frequency==0">不限次</div>
|
||||||
|
<div v-else>{{ record.monthly_frequency}}</div>
|
||||||
|
</template>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<template #action="{ record }">
|
||||||
|
<a-space>
|
||||||
|
<a-button v-has="'admin:sysDoctorconfigList:edit'" type="text"
|
||||||
|
@click="handleDetail(record)"><icon-edit />修改</a-button>
|
||||||
|
<!-- <a-button v-has="'admin:sysFamilyList:edit'" type="text" @click="handleUpdate(record)"><icon-edit />
|
||||||
|
修改</a-button> -->
|
||||||
|
<!-- <a-button v-has="'admin:sysFamilyList:remove'" type="text"
|
||||||
|
@click="() => { deleteVisible = true; deleteData = [record.doctor_id]; }"><icon-delete /> 删除</a-button> -->
|
||||||
|
</a-space>
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
|
|
||||||
|
<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 { getHealthConfigList,healthConfigDetail} 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: 'inquiry_mode',slotName:'inquiry_mode',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: 'service_price',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) => {
|
||||||
|
package_id.value=record.package_id;
|
||||||
|
modalVisible.value = true;
|
||||||
|
const {code,data}=await healthConfigDetail(record.package_id);
|
||||||
|
if(code==200){
|
||||||
|
Object.assign(modalForm,data)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页改变
|
||||||
|
* @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>
|
||||||
Loading…
x
Reference in New Issue
Block a user