/*
 * @Author: your name
 * @Date: 2021-07-26 08:54:08
 * @LastEditTime: 2021-07-29 23:11:02
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /TracerMethodology_PC/src/pages/DepartmentMana/service.js
 */

import { request } from 'umi';


//获取会计科目列表
export async function getAccountingSubjectList(params, options) {
    return request('/api/costAccount/accounting/list', {
      method: 'GET',
      params:{...params},
      ...(options || {}),
    });
}

//编辑会计科目
export async function editAccountingSubjectList(body, options) {
  return request('/api/costAccount/accounting/edit', {
    method: 'POST',
    data:{...body},
    ...(options || {}),
  });
}

//新增会计科目
export async function addAccountingSubject(body, options) {
  return request('/api/costAccount/accounting/save', {
    method: 'POST',
    data:{...body},
    ...(options || {}),
  });
}

//删除会计科目
export async function delAccountingSubject(params, options) {
  const {id} = params;
  return request(`/api/costAccount/accounting/delete?id=${id}`, {
    method: 'POST',
    ...(options || {}),
  });
}

//获取所有可选会计科目
export async function getAccountingSubjectForSelecter(params, options) {

  return request(`/api/costAccount/accounting/selectAccounting`, {
    method: 'GET',
    ...(options || {}),
  });
}

