import request from '@/utils/request'

// 分页查询
export const pageList = (query) => {
  return request({
    url: '/member/marketTeamApply/list',
    method: 'get',
    params: query
  })
}

// 新增/修改
export const saveAndEdit = (data) => {
  return request({
    url: '/member/marketTeamApply/teamApply',
    method: 'post',
    data: data
  })
}

// 删除模板
export const deleteById = (id) => {
  return request({
    url: '/member/marketTeam/deleteById',
    method: 'delete',
    params: {id:id}
  })
}

// 修改状态
export const updateStatus = (data) => {
  return request({
    url: '/member/marketTeam/insertOrUpdate',
    method: 'post',
    data: data
  })
}

export function getSelectById(id) {
  return request({
    url: '/member/marketTeamApply/selectById?id=' + id,
    method: 'get'
  })
}

// 解析人员的excel文件
export function uploadExcel(data) {
  return request({
    url: '/member/marketTeamApplyViewer/analysis',
    method: 'post',
    data: data
  })
}

// 审核
export const teamApplyAudit = (data) => {
  return request({
    url: '/member/marketTeamApply/teamApplyAudit',
    method: 'post',
    data: data
  })
}

//审核时查询可用座位列表
export function querySeatList(query) {
  return request({
    url: '/merchant/merchantAuditoriumSeat/querySeatList',
    method: 'get',
    params: query
  })
}

export function getOrderDetail(id) {
  return request({
    url: '/member/marketTeamApply/orderDetail?id=' + id,
    method: 'get'
  })
}

// 查询价格
export function queryPrice(query) {
  return request({
    url: '/member/marketTeamBrokerageConfig/queryPrice',
    method: 'get',
    params: query
  })
}

// 下载模板
export function downloadModel(query) {
  return request({
    url: '/member/marketTeamApply/downTeamApplyTemplate',
    method: 'get',
    responseType: 'blob',
    params: query
  })
}