import request from '@/utils/request';

/**
 * 列表
 */
export async function getList (data) {
  const res = await request.post('/eam/spare_parts_apply/page', data);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}


// // 详情
export async function detailsId (id) {
  const res = await request.get(`/eam/spare_parts_apply/detailsId/${id}`);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
