/**
 * 实验室任务接口
*/
import request from '../../index'
import type { ISendBack } from '@/views/business/manager/task/task-interface'
import type { IListQuery } from '@/views/business/taskMeasure/labTask/labTask-interface'
const prefix = '/business/distribute'
// 列表查询
export function getLabTaskList(data: IListQuery) {
  return request({
    url: `${prefix}/deptExecutive/List?offset=${data.offset}&limit=${data.limit}`,
    method: 'post',
    data,
  })
}

// 导出列表
export function exportLabTaskList(data: Omit<IListQuery, 'limit' | 'offset'>) {
  return request({
    url: `${prefix}/deptExecutive/export`,
    method: 'post',
    responseType: 'blob',
    data,
  })
}

// 详情(实验室任务、我的任务)
export function getTaskDetail(data: any) {
  return request({
    url: `${prefix}/executive/detail/detail`,
    method: 'post',
    data,
  })
}

// 退回(待检测/检测中->退回)
export function sendBackProcess(data: ISendBack) {
  return request({
    url: `${prefix}/executive/sendBack`,
    method: 'post',
    data,
  })
}

// 收入（待检测->检测中）->收入)
export function myExecutiveReceive(data: any) {
  return request({
    url: '/business/labExecutive/myExecutive/receive',
    method: 'post',
    data,
  })
}

// 我的检测-检测完成
export function myExecutiveDone(data: any) {
  return request({
    url: '/business/labExecutive/myExecutive/complete',
    method: 'post',
    data,
  })
}
