import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/bizappointmentrecord/` + url, ...arg)

/**
 * 预约记录Api接口管理器
 *
 * @author fanzherong
 * @date  2025/03/24 14:47
 **/
export default {
	// 获取预约记录分页
	bizAppointmentRecordPage(data) {
		return request('page', data, 'get')
	},
	// 提交预约记录表单 edit为true时为编辑，默认为新增
	bizAppointmentRecordSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除预约记录
	bizAppointmentRecordDelete(data) {
		return request('delete', data)
	},
	// 获取预约记录详情
	bizAppointmentRecordDetail(data) {
		return request('detail', data, 'get')
	},
	//审核
	auditRecord(data){
		return request('auditRecord',data)
	},
	//导出
	exportRecord(data){
		return request('exportRecord', data, 'get', {
			responseType: 'blob'
		})
	},
	//取消排队
	cancelAppointmentRecord(data){
		return request('cancelAppointmentRecord',data)
	},
	//调整订单
	adjustOrder(data){
		return request('adjustOrder',data)
	}
}
