import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/dmPrintingRequest',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/dmPrintingRequest/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/dmPrintingRequest',
    method: 'put',
    data
  })
}

/** 新增审批人 */
export function addAapprovalUser(data) {
  return request({
    url: 'api/dmPrintingRequest/addAapprovalUser',
    method: 'post',
    data
  })
}

/** 撤回审批人 */
export function recallApprovalUser(data) {
  return request({
    url: 'api/dmPrintingRequest/recallApprovalUser',
    method: 'put',
    data
  })
}

export function getInfo(data) {
  return request({
    url: 'api/dmPrintingRequest/info?id=' + data,
    method: 'get'
  })
}

export default { add, edit, del, addAapprovalUser, recallApprovalUser, getInfo }
