import request from '@/utils/request'
import constant from '@/constant'

function create(){
  return request.get(constant.serverUrl + "/base/account/create");
}

function add(formModel){
  return request.post(constant.serverUrl + "/base/account/add", formModel,{
    headers: {
      "Content-Type": "application/json"
    }
  });
}

function pageList(formData){
  return request.post(constant.serverUrl + "/base/account/pageList", formData);
}

function edit(id){
  return request.get(constant.serverUrl + "/base/account/edit/" + id);
}

function remove(id){
  return request.post(constant.serverUrl + "/base/account/delete/" + id);
}

function createBill(id){
  return request.get(constant.serverUrl + "/base/account/createBill/" + id);
}

function addBill(formData){
  return request.post(constant.serverUrl + "/base/account/addBill", formData);
}

export default {
  create,add,pageList,edit,remove,createBill,addBill
}