import request from '@/utils/request'
import qs from 'qs'

//申请报销
export function insert(data) {
  return request({
    url: '/reimbursement/insert',
    method: 'post',
    data
  })
}

//查询个人报销列表
export function queryBypage(data) {
  return request({
    url: '/reimbursement/queryBypage',
    method: 'post',
    data
  })
}

//小组长查询报销信息
export function selectByHeadmanId(data) {
  return request({
    url: '/rentertainment/selectByHeadmanId',
    method: 'post',
    data
  })
}

//财务查询报销信息
export function selectByfinanceId(data) {
  return request({
    url: '/rentertainment/selectByfinanceId',
    method: 'post',
    data
  })
}
//查询单个销列信息
export function selectById(data) {
  return request({
    url: '/rentertainment/selectById',
    method: 'post',
    data
  })
}
//查询单个销列信息1
export function selectByReimbursementId(data) {
  return request({
    url: '/reimbursement/selectByReimbursementId',
    method: 'post',
    data
  })
}

//修改报销信息
export function update(data) {
  return request({
    url: '/reimbursement/update',
    method: 'post',
    data
  })
}


//金额添加
export function Details(data) {
  return request({
    url: '/reimbursementDetails/insert',
    method: 'post',
    data
  })
}
//财务查询
export function selectByFinance(data) {
  return request({
    url: '/reimbursement/selectByFinance',
    method: 'post',
    data
  })
}
//组长查询
export function selectByHeadman(data) {
  return request({
    url: '/reimbursement/selectByHeadman',
    method: 'post',
    data
  })
}
//小组长审批
export function headamApproval(data) {
  return request({
    url: '/reimbursement/headamApproval',
    method: 'post',
    data
  })
}
//财务审批
export function financeApproval(data) {
  return request({
    url: '/reimbursement/financeApproval',
    method: 'post',
    data
  })
}
//撤回
export function reimbursementId(reimbursementId) {
  return request({
  url:`/reimbursement/withdraw/${reimbursementId}`,
  method: 'post'
  })
}
//重新提交
export function resubmit(data) { 
  return request({
    //url: `/reimbursement/resubmit/${reimbursementId}`, 
 url:'/reimbursement/resubmit/',
    method: 'post',
    data
  })
}