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

const BASE = 'planning_production/produce/traceability/'

function apiParams (method, data = {}) {
  return { method, platform: 'background', ...data }
}

export function getBatteryTraceList (data) {
  return request({
    url: BASE + 'battery',
    method: 'get',
    params: apiParams('planning_production_produce_traceability_battery', data)
  })
}

export function getBatteryProcessData (data) {
  return request({
    url: BASE + 'batteryProcess',
    method: 'get',
    params: apiParams('planning_production_produce_traceability_batteryProcess', data)
  })
}

export function cancelBatteryActive (data) {
  return request({
    url: BASE + 'batteryactive',
    method: 'get',
    params: apiParams('planning_production_produce_traceability_batteryactive', data)
  })
}
