import { http } from '@/http/http'

// 批量上架
export function batchAddInventoryAPI(data: { bikeCodes: string[], regionId: string }) {
  return http.post<any>('/operations/ebikeBikeInfo/batchLaunch', data)
}

// 批量下架
export function batchRemoveInventoryAPI(data: { bikeCodes: string[] }) {
  return http.post<any>('/operations/ebikeBikeInfo/batchUnLaunch', data)
}

// 未上架车辆分页查询
export function getUnInventoryListAPI(query: { pageSize: number, pageNum: number }) {
  return http.get<any>('/operations/ebikeBikeInfo/unLaunchPage', query)
}

// 上架车辆分页查询
export function getInventoryListAPI(query: { pageSize: number, pageNum: number }) {
  return http.get<any>('/operations/ebikeBikeInfo/launchPage', query)
}

// 查询所有运营中区域表
export function getOperatoringAllListAPI() {
  return http.get<any>('/operations/ebikeRegion/operationList')
}

// 查询所有站点控制
export function getOperatoringListAPI() {
  return http.get<any>('/operations/ebikeSite/list')
}

// 上传领取电池（换电工单用）
export function postOperatoringUploadAPI(data: {
  codes: string[]
}) {
  return http.post<any>('/operations/ebikeBikeOrder/batteryClaim', data)
}

// 电池二维码检查（换电工单用,包含带电池中控二维码）
export function getOperatoringCheckAPI(query: {
  code: string
}) {
  return http.get<any>('/operations/ebikeBikeOrder/checkCode', query)
}

// 归还电池（换电工单用）
export function postOperatoringReturnAPI(data: {
  codes: string[]
}) {
  return http.post<any>('/operations/ebikeBikeOrder/batteryReturn', data)
}
