退款接口
This commit is contained in:
parent
adaf02fd2f
commit
4c36596e7c
2
components.d.ts
vendored
2
components.d.ts
vendored
@ -14,6 +14,7 @@ declare module '@vue/runtime-core' {
|
||||
AddSysconfigModal: typeof import('./src/components/addSysconfigModal.vue')['default']
|
||||
ChatRecord: typeof import('./src/components/chatRecord.vue')['default']
|
||||
ConfirmModal: typeof import('./src/components/confirmModal.vue')['default']
|
||||
copy: typeof import('./src/components/isOkModal copy.vue')['default']
|
||||
DeleteModal: typeof import('./src/components/DeleteModal.vue')['default']
|
||||
DoctorModal: typeof import('./src/components/doctorModal.vue')['default']
|
||||
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
|
||||
@ -21,6 +22,7 @@ declare module '@vue/runtime-core' {
|
||||
FamilyModal: typeof import('./src/components/familyModal.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']
|
||||
|
||||
51
src/api/coupon/list.js
Normal file
51
src/api/coupon/list.js
Normal file
@ -0,0 +1,51 @@
|
||||
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/'+id,
|
||||
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 giveCoupon(id,data){//系统-发放系统优惠卷
|
||||
return request({
|
||||
url:'/admin/coupon/system/grant/'+id,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
})
|
||||
|
||||
@ -106,4 +106,12 @@ export function serviceRightDetail(id){//服务包权益详情
|
||||
url:`/admin/order/service/detail/${id}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export function cancelService(id,data){//取消服务包-取消订单
|
||||
return request({
|
||||
url:`/admin/order/service/cancel/${id}`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
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:title.value=="确定开启吗?"?1:2})
|
||||
if(data.code==200){
|
||||
Message.success("成功");
|
||||
//proxy.$refs.modalFormRef.resetFields();
|
||||
}else{
|
||||
proxy.$notification.error(response.message);
|
||||
}
|
||||
emits('closeChangeOk',true);
|
||||
}
|
||||
</script>
|
||||
@ -164,3 +164,32 @@ export const formatRelation=(val)=>{
|
||||
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 ''
|
||||
}
|
||||
};
|
||||
573
src/views/coupon/coupon-list/index.vue
Normal file
573
src/views/coupon/coupon-list/index.vue
Normal file
@ -0,0 +1,573 @@
|
||||
<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.coupon_name" placeholder="请输入患者名字" @press-enter="handleQuery" />
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item field="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="3">删除</a-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item field="status" 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="status" 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="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"
|
||||
:row-selection="{ type: 'checkbox', showCheckedAll: true }"
|
||||
: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_status="{ record }">
|
||||
<!-- (1:正常 2:强制失效 3:结束 4:删除) -->
|
||||
|
||||
<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:sysPatientList:detail'" type="text"
|
||||
@click="handleDetail(record)"><icon-book />详情</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
<!-- Modal -->
|
||||
<a-modal v-model:visible="modalVisible" fullscreen :title="modalTitle" title-align="start" :footer="false"
|
||||
@close="() => {$refs.modalFormRef.resetFields(); modalForm.coupon_id = null;}">
|
||||
<div class="titlebox">
|
||||
<div class="bar"></div>
|
||||
<div class="name">用户信息</div>
|
||||
</div>
|
||||
<a-form :model="modalForm" :disabled="modalSatus=='detail' || modalForm.iden_auth_status==2
|
||||
" ref="modalFormRef" :auto-label-width="true">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="avatar" label="用户头像:">
|
||||
<a-space size="large">
|
||||
<a-image width="80" height="80" class="headImg" :src="modalForm.avatar">
|
||||
</a-image>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="user_name" label="用户姓名:">
|
||||
<span>{{modalForm.user_name}}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
|
||||
<a-form-item field="idCard" label="用户手机号:">
|
||||
<div class="box">
|
||||
<div class="cardNum">{{modalForm.mobile}}</div>
|
||||
<!-- <icon-eye-invisible class="eye" @click="handelDecryptCard(modalForm.user_id)" /> -->
|
||||
</div>
|
||||
<!-- <div class="box" v-show="showEye && modalSatus!='add'">
|
||||
<div class="cardNum">{{id_card_num}}</div>
|
||||
<icon-eye class="eye" @click="()=>{showEye=false}" />
|
||||
</div> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item field="status" label="用户状态:">
|
||||
<!-- 0:禁用 1:正常 2:删除 -->
|
||||
<span v-if="modalForm.status==0">禁用</span>
|
||||
<span v-else-if="modalForm.status==1">正常</span>
|
||||
<span v-else-if="modalForm.status==2">删除</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="multi_point_status" label="注册时间:">
|
||||
<span v-if="parseTime(modalForm.created_at)">{{modalForm.created_at}}</span>
|
||||
<span v-else>-</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" v-if="modalForm.disable_reason">
|
||||
<a-col :span="24">
|
||||
<a-form-item field="hospital_id" label="禁用理由:">
|
||||
<a-space size="large">
|
||||
<span >{{modalForm.disable_reason}}</span>
|
||||
</a-space>
|
||||
</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="12">
|
||||
<tableUnit :pagination="false" :columns="family_columns" :data="family_data" @handleFamilyDetail="handleFamilyDetail"></tableUnit>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
<a-divider />
|
||||
<div class="titlebox" v-if="modalForm.user_ship_address && modalForm.user_ship_address.length>0">
|
||||
<div class="bar"></div>
|
||||
<div class="name">收货地址</div>
|
||||
</div>
|
||||
<div class="cellbox" v-if="modalForm.user_ship_address && modalForm.user_ship_address.length>0">
|
||||
<div class="cell" v-for="item in modalForm.user_ship_address">
|
||||
<a-row :gutter="24" >
|
||||
<a-col :span="12">
|
||||
<a-form-item field="" label="收货人姓名:">
|
||||
{{ item.consignee_name}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item field="" label="收货人电话:">
|
||||
{{ item.consignee_tel}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24" >
|
||||
<a-col :span="24">
|
||||
<a-form-item field="" label="收货人地址:">
|
||||
{{ item.province}} {{item.city}}{{item.county}}{{item.address}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
<a-divider v-if="modalForm.user_ship_address && modalForm.user_ship_address.length>0"/>
|
||||
</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" v-has="'admin:sysPatientList:disable'" status="danger" @click="handleChangeStatus('0')" v-if="modalForm.status==1">禁用</a-button>
|
||||
<a-button type="primary" v-has="'admin:sysPatientList:disable'" status="success" @click="handleChangeStatus('1')" v-if="modalForm.status==0">启用</a-button>
|
||||
</a-space>
|
||||
<!-- <a-space v-if="modalSatus=='edit'">
|
||||
<a-button type="primary" status="warning">拉黑</a-button>
|
||||
<a-button type="primary" status="danger">删除</a-button>
|
||||
</a-space> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-modal>
|
||||
|
||||
|
||||
<!-- 就诊人详情 -->
|
||||
<familyModal :modalVisible="familyVisible" :modalForm="familyForm" @familyVisibleChange="()=>{familyVisible=false}"></familyModal>
|
||||
<!-- 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 {getFamilyDetail} from '@/api/patient/family';
|
||||
import {parseTime} from "@/utils/parseTime"
|
||||
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([]);
|
||||
// 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: '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 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 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;
|
||||
handleQuery();
|
||||
};
|
||||
const showCoupon=(value,record)=>{
|
||||
|
||||
|
||||
okTitle.value=!record.coupon_status?'确定关闭吗?':'确定开启吗?';
|
||||
isVisible.value=true;
|
||||
cur_coupon_id.value=record.coupon_id;
|
||||
};
|
||||
//改变用户状态
|
||||
const handleChangeStatus=async(status)=>{
|
||||
|
||||
|
||||
if(status==0){
|
||||
cur_coupon_id.value=modalForm.coupon_id;
|
||||
//okVisible.value=true;
|
||||
isVisible.value=true
|
||||
}else{
|
||||
//okVisible.value=true;
|
||||
isVisible.value=true
|
||||
// switchStatus(modalForm.coupon_id,{
|
||||
// status:1
|
||||
// })
|
||||
}
|
||||
// await updateCouponStatus(cur_coupon_id,{
|
||||
// coupon_status:!status?1:2
|
||||
// })
|
||||
|
||||
// if(record.status==0){
|
||||
// okVisible.value=true;
|
||||
// }else{
|
||||
// switchStatus(record.coupon_id,{
|
||||
// status:1
|
||||
// })
|
||||
}
|
||||
//就诊人详情
|
||||
const familyVisible=ref(false);
|
||||
const familyForm=reactive({
|
||||
user:{},
|
||||
avatar: 'https://img.applets.igandanyiyuan.com/basic/file/patient_avatar.png',
|
||||
});
|
||||
const handleFamilyDetail = async (family_id) => {
|
||||
const { code, data} = await getFamilyDetail(family_id);
|
||||
if (code == 200) {
|
||||
Object.assign(familyForm, data);
|
||||
familyVisible.value = true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 分页改变
|
||||
* @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);
|
||||
}
|
||||
|
||||
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>
|
||||
@ -768,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 });
|
||||
|
||||
@ -710,20 +710,15 @@
|
||||
<a-space
|
||||
style="margin-right: 8px"
|
||||
v-if="
|
||||
modalForm.order_service_status == 1 ||
|
||||
modalForm.order_service_status == 2
|
||||
modalForm.order_service_status == 2 ||
|
||||
modalForm.order_service_status == 3 || modalForm.order_service_status == 4
|
||||
"
|
||||
>
|
||||
<a-button
|
||||
type="primary"
|
||||
status="danger"
|
||||
v-has="'admin:sysServiceList:cancel'"
|
||||
@click="
|
||||
() => {
|
||||
okVisible = true;
|
||||
cur_inruiry_id = modalForm.order_service_id;
|
||||
}
|
||||
"
|
||||
@click="cancleOrder('service')"
|
||||
>取消订单</a-button
|
||||
>
|
||||
</a-space>
|
||||
@ -758,7 +753,7 @@
|
||||
<confirmModal
|
||||
:okVisible="okVisible"
|
||||
:payment_amount_total="modalForm.payment_amount_total"
|
||||
:api="cancelInquiry"
|
||||
:api="cancleType=='inquiry'?cancelInquiry:cancelService"
|
||||
:title="'确定取消此订单吗?'"
|
||||
:dealType="'order_inquiry_id'"
|
||||
:id="cur_inruiry_id"
|
||||
@ -1034,7 +1029,7 @@
|
||||
<a-button type="primary" @click="openInquiryRecord" v-has="'admin:sysOrderList:record'">问诊记录</a-button>
|
||||
</a-space>
|
||||
<a-space style="margin-right: 8px;" v-if="modalInquiryForm.inquiry_status==4 || modalInquiryForm.inquiry_status==5">
|
||||
<a-button type="primary" status="danger" v-has="'admin:sysOrderList:cancel'" @click="()=>{okVisible=true;cur_inruiry_id=modalInquiryForm.order_inquiry_id;}">取消问诊</a-button>
|
||||
<a-button type="primary" status="danger" v-has="'admin:sysOrderList:cancel'" @click="cancleOrder('inquiry')">取消问诊</a-button>
|
||||
</a-space>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@ -1066,6 +1061,7 @@ import {
|
||||
inquiryCase,
|
||||
getOrderDetail,
|
||||
getProductDetail,
|
||||
cancelService
|
||||
} from '@/api/order/list';
|
||||
import { parseTime } from '@/utils/parseTime';
|
||||
import {
|
||||
@ -1082,7 +1078,7 @@ import { downloadFile } from '@/utils/downloadFile';
|
||||
const deleteData = ref([]);
|
||||
// Akiraka 20230210 删除对话框
|
||||
const deleteVisible = ref(false);
|
||||
|
||||
const cancleType=ref('service');
|
||||
const doctorVisible = ref(false);
|
||||
const okVisible = ref(false);
|
||||
const cur_inruiry_id = ref('');
|
||||
@ -1297,7 +1293,17 @@ const juancolumns = [
|
||||
// Table Data
|
||||
const tableData = ref([]);
|
||||
|
||||
|
||||
const cancleOrder=(type)=>{
|
||||
cancleType.value=type;
|
||||
if(type=="inquiry"){
|
||||
okVisible.value=true;
|
||||
cur_inruiry_id.value=modalInquiryForm.order_inquiry_id;
|
||||
}else{
|
||||
okVisible.value = true;
|
||||
cur_inruiry_id.value= modalForm.order_service_id;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 分页改变
|
||||
* @param {Number} [page]
|
||||
@ -1495,7 +1501,9 @@ const openInquiryRecord = () => {
|
||||
const handelCloseChange = (data) => {
|
||||
cur_inruiry_id.value = '';
|
||||
okVisible.value = false;
|
||||
console.log(data);
|
||||
if(cancleType.value=="service"){
|
||||
modalForm.order_service_status=5;
|
||||
}
|
||||
if (data) {
|
||||
modalVisible.value = false;
|
||||
getOrderInfo({ ...pager, ...queryForm });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user