import request from '@/axios';

export const getList = (current, size, params) =>
  request({
    url: '/blade-transport/equipment-ledger/list',
    method: 'get',
    params: { ...params, current, size },
  });

export const getDetail = id =>
  request({ url: '/blade-transport/equipment-ledger/detail', method: 'get', params: { id } });

export const getNextEquipmentCode = () =>
  request({ url: '/blade-transport/equipment-ledger/next-equipment-code', method: 'get' });

export const add = row =>
  request({ url: '/blade-transport/equipment-ledger/submit', method: 'post', data: row });

export const update = row =>
  request({ url: '/blade-transport/equipment-ledger/submit', method: 'post', data: row });

export const remove = ids =>
  request({ url: '/blade-transport/equipment-ledger/remove', method: 'post', params: { ids } });
