appointment.js 2.97 KB
import request from '@/plugin/axios'
/**
 * 预约配置列表生成接口
 */
export function appointmentList(data) {
    return request({
        url: '/reserve/appointmentRules/search',
        method: 'get',
        params: {
            data
        }
    })
}

/**
 * 根据预约规则id单个/批量启用/禁用预约规则
 */
export function enableAppointmentRule(data) {
    return request({
        url: '/reserve/appointmentRules/enableAppointmentRule?yyidList='+data.yyidList+'&enable='+data.enable,
        method: 'post'
    })
}
/**
 * 单个/批量删除预约规则
 */
export function deleteRuleByIds(data) {
    return request({
        url: '/reserve/appointmentRules/deleteByIds?yyidList='+data.yyidList,
        method: 'delete'
    })
}
/**
 * 获取预约批次号-预约配置设置
 */
export function getBatch() {
    return request({
        url: '/reserve/appointmentRules/getBatch',
        method: 'get'
    })
}
/**
 * 组织机构接口 : Organization Service
 */
export function queryAllOrganization() {
    return request({
        url: '/reserve/organization/queryAllOrganization',
        method: 'get'
    })
}
/**
 * 获取所有业务
 */
export function getAllBusinessList() {
    return request({
        url: '/reserve/appointmentPeriodRules/getAllBusinessList',
        method: 'get'
    })
}
/**
 * 根据机构IDS、业务IDS查询预约业务-预约业务配置
 */
export function getAppointmentBusinessList(data) {
    return request({
        url: '/reserve/appointmentPeriodRules/getAppointmentBusinessList',
        method: 'get',
        params: {
            jgid: data.jgids,
            ywids: data.ywids
        }
    })
}
/**
 * 根据机构ID查询机构预约和未预约业务
 */
export function getBusinessByJgid(data) {
    return request({
        url: '/reserve/appointmentPeriodRules/getBusinessByJgid',
        method: 'get',
        params: {
            jgid: data
        }
    })
}
/**
 * 对机构授权可预约业务-预约业务设置保存
 */
export function grantAppointment(data) {
    return request({
        url: '/reserve/appointmentPeriodRules/grantAppointment?appointmentYwids='+data.appointmentYwids+'&jgid='+data.jgid,
        method: 'post'
    })
}
/**
 * 单个/批量删除机构下的所有预约业务-预约业务设置保存
 */
export function deleteByjgids(data) {
    return request({
        url: '/reserve/appointmentPeriodRules/deleteByjgids?jgids='+data,
        method: 'delete'
    })
}
/**
 * 预约记录管理
 */
export function SearchList(data) {
    return request({
        url: '/reserve/appointment/search',
        method: 'post',
        data: data,
    })
}
// 单个/批量取消赴约
export function CancelAppointment(data) {
    return request({
        url: '/reserve/appointment/deleteByIds?idList='+data,
        method: 'delete',
    })
}

//赴约
export function Appointment(data) {
    return request({
        url: '/reserve/appointment/keepAppointment',
        method: 'put',
        data: data,
    })
}