/*
 * @Author: zc
 * @description 业务管理-终止管理
 */
import request from '@/utils/request';
/**
 * @description 查询可以申请终止列表
 * @param {object} params
 */
export const terminatesApplyList = (params: object) =>{
  return  request({
    url: '/api/v1/OrderTerminate/may-terminate',
    method: 'get',
    params,
  });
}
/**
 * @description 查询终止列表基础数据
 * @param {object} params
 */
export const terminatesListBase = (params?: object) =>{
  return  request({
    url: '/api/v1/OrderTerminate/base',
    method: 'get',
    params,
  });
}
/**
 * @description 查询终止列表
 * @param {object} params
 */
export const orderListTerminate = (params: object) =>{
  return  request({
    url: '/api/v1/OrderTerminate',
    method: 'get',
    params,
  });
}
/**
 * @description 终止列表导出
 * @param {object} data
 */
export const exportTerminateList = (data: object) =>{
  return  request({
    url: '/api/v1/OrderTerminate/export',
    method: 'post',
    data,
		responseType: 'blob',
  }, {
    reduce_data_format: false
  });
}
/**
 * @description 终止流程开启
 * @param {object} data
 */
export const terminateStartFlow = (data: object) =>{
  return  request({
    url: '/api/v1/OrderTerminate/startflow',
    method: 'post',
    data,
  });
}
/**
 * @description 终止流程修改后下一步流程
 * @param {object} data
 */
export const terminateNextFlow = (data: object) =>{
  return  request({
    url: '/api/v1/OrderTerminate/initial_nextFlow',
    method: 'post',
    data,
  });
}
/**
 * @description 查询工单终止流程开启参数
 * @param {object} params
 */
export const terminateStartFlowParams = (params?: object) =>{
  return  request({
    url: '/api/v1/OrderTerminate/screen/startflow',
    method: 'get',
    params,
  });
}
/**
 * @description 查询工单终止流程参数
 * @param {string} id
 */
export const terminateFlowParams = (id: string) =>{
  return  request({
    url: `/api/v1/OrderTerminate/workflow/${id}`,
    method: 'get',
  });
}
/**
 * @description 查询工单终止流程参数下一步可选节点
 * @param {string} workflowId
 */
export const terminateNextFlowParams = (workflowId: string) =>{
  return  request({
    url: `/api/v1/OrderTerminate/${workflowId}/nextsteps`,
    method: 'get',
  });
}
/**
 * @description 查询工单终止详情
 * @param {string} id
 */
export const terminateDetail = (id: string) =>{
  return  request({
    url: `/api/v1/OrderTerminate/${id}`,
    method: 'get',
  });
}
/**
 * @description 修改理由
 * @param {object} data
 */
export const terminateUpdate = (data: object) =>{
  return  request({
    url: '/api/v1/OrderTerminate/update_content',
    method: 'put',
    data,
  });
}