import {request} from '@/service/ajax'

const newsUrl = '/api/task/'
// 获取基本信息
export const getTaskType = (data) => request(newsUrl + 'type', 'post', { ...data },false)
export const getTaskTypeInfo = (data) => request(newsUrl + 'type-info', 'post', { ...data },true)
//获取任务基本选项信息
export const getTaskOptions = (data) => request(newsUrl + 'options', 'post', { ...data },true)
//获取联系人关系
export const getTaskRelations = (data) => request(newsUrl + 'relations', 'post', { ...data },true)
export const getClientInfo = (data) => request(newsUrl + 'client', 'post', { ...data },true)
export const addTask = (data) => request(newsUrl + 'add', 'post', { ...data },true)
// 任务详情
export const getTaskDetail = (data) => request(newsUrl + 'detail', 'post', { ...data },true)
//任务接单
export const takeTask = (data) => request(newsUrl + 'take', 'post', { ...data },true)
//审核
export const auditTask = (data) => request(newsUrl + 'audit', 'post', { ...data },true)
export const setMsg = (data) => request(newsUrl + 'add-msg', 'post', { ...data },true)
export const getMsgList = (data) => request(newsUrl + 'msg-list', 'post', { ...data },false)
export const getExecuteList = (data) => request(newsUrl + 'execute-list', 'post', { ...data },false)
export const setExecute = (data) => request(newsUrl + 'set-execute', 'post', { ...data },false)
export const getTaskStage = (data) => request(newsUrl + 'stage', 'post', { ...data },false)
export const setExecuteTask = (data) => request(newsUrl + 'execute', 'post', { ...data },true)
//获取可接单列表
export const getTaskReceiving = (data) => request(newsUrl + 'receiving', 'post', { ...data },false)
export const getTaskList = (data) => request(newsUrl + 'task-list', 'post', { ...data },false)
export const endTask = (data) => request(newsUrl + 'end', 'post', { ...data },false)
export const cancellation = (data) => request(newsUrl + 'cancellation', 'post', { ...data },false)
export const delTask = (data) => request(newsUrl + 'del', 'post', { ...data },false)
export const getStageList = (data) => request(newsUrl + 'stage-list', 'post', { ...data },false)
export const getStageUser = (data) => request(newsUrl + 'stage-user', 'post', { ...data },false)
export const getBusinessStageList = (data) => request(newsUrl + 'business-stage', 'post', { ...data },false)
export const getBusinessCache = (data) => request(newsUrl + 'get-cache', 'post', { ...data },false)
export const setBusinessCache = (data) => request(newsUrl + 'set-cache', 'post', { ...data },false)
export const delBusinessCache = (data) => request(newsUrl + 'del-cache', 'post', { ...data },true)

// 草稿Api
export const addDraft = (data) => request(newsUrl + 'draft-add', 'post', { ...data },true)
export const getDraftList = (data) => request(newsUrl + 'draft-list', 'post', { ...data },true)
export const getDraftItem = (data) => request(newsUrl + 'draft-item', 'post', { ...data },true)
export const delDraft = (data) => request(newsUrl + 'draft-del', 'post', { ...data },true)
//阶段操作
export const setStageOperate = (data) => request(newsUrl + 'operate', 'post', { ...data },true)
export const getReturnedBankList = (data) => request(newsUrl + 'banks', 'post', { ...data },true)
//录入数据校验
export const verifyBusinessModuleKey = (data) => request(newsUrl + 'verify', 'post', { ...data },true)

export const getWeekList = (data) => request(newsUrl + 'week', 'post', { ...data },true)
export const getDayBacklogList = (data) => request(newsUrl + 'backlog', 'post', { ...data },true)
export const setDayBacklog = (data) => request(newsUrl + 'status', 'post', { ...data },true)
export const getProductData = (data) => request(newsUrl + 'product-data', 'post', { ...data },true)
export const setPostLoan = (data) => request(newsUrl + 'set-loan', 'post', { ...data },true)


// 贷后管理列表
export const getLoanList = (data) => request(newsUrl + 'loan-list', 'post', { ...data },true)
export const getAdjust = (data) => request(newsUrl + 'adjust', 'post', { ...data },true)
