import request from '@/utils/request';

export function computeTime(data){
  return request({
    url: '/workstudy/worklog/computeTime',
    method: 'post',
    data
  })
}

export function cancelLog(id) {
  return request({
    url: '/workstudy/worklog/cancelLog/' + id,
    method: 'post',
  });
}

export function listView(params) {
  return request({
    url: '/workstudy/worklog/listView',
    method: 'get',
    params
  })
}

export function listWorkLogMonthTotal(params) {
  return request({
    url: '/workstudy/worklog/listWorkLogMonthTotal',
    method: 'get',
    params: params
  })
}


export function manyAudit(data) {
  return request({
    url: '/workstudy/worklog/manyAudit',
    method: 'post',
    data
  })
}

export function computeTimeByStuNo() {
  return request({
    url: '/workstudy/worklog/computeTimeByStuNo',
    method: 'get',
  });
}


export function computeTimeById(id) {
  return request({
    url: '/workstudy/worklog/computeTimeById/' + id,
    method: 'get',
  });
}


export function listZdlsAll(query) {
  return request({
    url: '/workstudy/worklog/listZdlsAll',
    method: 'get',
    params: query
  })
}

export function doAudit(data) {
  return request({
    url: '/workstudy/worklog/doAudit',
    method: 'post',
    data
  })
}


export function listZdls(query) {
  return request({
    url: '/workstudy/worklog/listZdls',
    method: 'get',
    params: query
  })
}

export function cancelApply(id) {
  return request({
    url: '/workstudy/worklog/cancelApply/' + id,
    method: 'post'
  })
}


export function listOwnApply(query) {
  return request({
    url: '/workstudy/worklog/listOwnApply',
    method: 'get',
    params: query
  })
}



export function doApply(data) {
  return request({
    url: '/workstudy/worklog/doApply',
    method: 'post',
    data: data
  })
}


export function doSave(data) {
  return request({
    url: '/workstudy/worklog/doSave',
    method: 'post',
    data: data
  })
}

// 查询勤工助学工作记录列表
export function listWorklog(query) {
  return request({
    url: '/workstudy/worklog/list',
    method: 'get',
    params: query
  })
}

// 查询勤工助学工作记录详细
export function getWorklog(id) {
  return request({
    url: '/workstudy/worklog/' + id,
    method: 'get'
  })
}

// 新增勤工助学工作记录
export function addWorklog(data) {
  return request({
    url: '/workstudy/worklog/add',
    method: 'post',
    data: data
  })
}

// 修改勤工助学工作记录
export function updateWorklog(data) {
  return request({
    url: '/workstudy/worklog/update',
    method: 'post',
    data: data
  })
}

// 删除勤工助学工作记录
export function delWorklog(id) {
  return request({
    url: '/workstudy/worklog/' + id,
    method: 'post'
  })
}
