import { request } from '@/api/_service'

const BASE = 'planning_production/produce/battery_details_report/'

function dataParams (method, data = {}, platform = 'api') {
  return { method, platform, ...data }
}

export function getBatteryDetailTitle (data) {
  return request({ url: BASE + 'battery_details_title', method: 'post', data: dataParams('production_report_battery_details_title', data) })
}

export function getBatteryDetailList (data) {
  return request({ url: BASE + 'battery_details_list', method: 'post', data: dataParams('production_report_battery_details_list', data) })
}

export function getBatteryDetailFlowBatch (data) {
  return request({ url: BASE + 'battery_details_flow_batch', method: 'get', params: dataParams('production_report_battery_details_flow_batch', data) })
}

export function createBatteryDetailExportTask (data) {
  return request({ url: BASE + 'battery_details_task', method: 'post', data: dataParams('system_exporttask_battery_details_task', data, 'admin') })
}
