import { axios } from '@/utils/request'

//  急件 列表  有分页
export const urgentList = (params) => {
  const url = `/urgent/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  急件 打印
export const urgentPrint = (params) => {
  return axios({
    url: '/urgent/print',
    data: params,
    method: 'post'
  })
}
//  急件 打印预览
export const urgentPrintPreview = (params) => {
  return axios({
    url: '/urgent/printPreview',
    data: params,
    method: 'post'
  })
}
//  急件 冲减
export const urgentWriteDown = (params) => {
  return axios({
    url: `/urgent/writeDownBySn/${params.urgentBillSn}`,
    data: {},
    method: 'get'
  })
}
//  急件 详情
export const urgentDetail = (params) => {
  return axios({
    url: `/urgent/findById/${params.id}`,
    data: {},
    method: 'get'
  })
}
//  急件 详情  根据sn查
export const urgentDetailSn = (params) => {
  return axios({
    url: `/urgent/findBySn/${params.sn}`,
    method: 'get'
  })
}
//  急件详情列表  有分页
export const urgentDetailList = (params) => {
  const url = `/urgentDetail/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
