import request from '@/utils/request'
// 用印类型信息列表
export function typeList(query) {
  return request({
    url: '/bpm/oa-stamp-seal/list',
    method: 'get',
    params: query
  })
}
// 创建流程
export function create(data) {
  return request({
    url: '/bpm/oa-stamp/commit',
    method: 'post',
    data: data
  })
}
//驳回或撤回后再次提交通用用事项审批流程信息
export function reCommit(data) {
  return request({
    url: '/bpm/oa-stamp/reCommit',
    method: 'post',
    data: data
  })
}
// 暂存数据保存
export function save(data) {
  return request({
    url: '/bpm/oa-stamp/staging',
    method: 'post',
    data: data
  })
}
// 暂存数据删除
export function deleteById(id) {
  return request({
    url: 'bpm/oa-stamp/delete?id=' + id,
    method: 'delete'
  })
}

// 关闭审批流程信息
export function closeById(id) {
  return request({
    url: '/bpm/oa-stamp/close?id=' + id,
    method: 'delete'
  })
}

// 获得详情
export function getDetail(id) {
  return request({
    url: '/bpm/oa-stamp/get?id=' + id,
    method: 'get'
  })
}

// 获得列表
export function getListData(query) {
  return request({
    url: '/bpm/oa-stamp/page',
    method: 'get',
    params: query
  })
}
// 导出列表
export function exportList(query) {
  return request({
    url: '/bpm/oa-stamp/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

//审批同意通用事项审批流程信息
export function agree(data) {
  return request({
    url: '/bpm/oa-stamp/agree',
    method: 'post',
    data: data
  })
}

//驳回通用事项审批流程信息
export function disagree(data) {
  return request({
    url: '/bpm/oa-stamp/disagree',
    method: 'post',
    data: data
  })
}

//撤回通用事项审批流程信息
export function revocation(data) {
  return request({
    url: '/bpm/oa-stamp/revocation',
    method: 'post',
    data: data
  })
}

