/*
 * @Author: zc
 * @description 业务管理-工单回访
 */
import request from '@/utils/request';
import qs from "qs";
/**
 * @description 工单回访列表
 * @param {object} params
 */
export const visitList = (params: object) => {
    return request({
        url: `/api/v1/Order/visit`,
        method: 'get',
        params,
        paramsSerializer: (params:any) => qs.stringify(params)
    });
};
/**
 * @description 工单回访列表导出
 * @param {object} data
 */
export const visitListExport = (data: object) => {
    return request({
        url: `/api/v1/Order/visit/export`,
        method: 'post',
        data,
        responseType: 'blob'
    }, {
        reduce_data_format: false
    });
};
/**
 * @description 工单回访保存
 * @param data
 */
export const visitOrder = (data: object) => {
    return request({
        url: `/api/v1/Order/visit`,
        method: 'post',
        data
    });
};
/**
 * @description 工单回访详情页基础数据
 * @param id
 */
export const visitDetailBaseData = (id: string) => {
    return request({
        url: `/api/v1/Order/visit/${id}`,
        method: 'get'
    });
};
/**
 * @description 工单回访明细列表(已回访明细)
 * @param params
 */
export const visitDetailList = (params: object) => {
    return request({
        url: `/api/v1/Order/visit/detail`,
        method: 'get',
        params
    });
};
/**
 * @description 回访查询基础数据
 */
export const visitSearchBaseData = () => {
    return request({
        url: `/api/v1/Order/visit/basedata`,
        method: 'get'
    });
}
/**
 * @description 回访扭转列表基础数据
 * @param {object} params
 */
export const visitTurnBaseData = (params?: object) => {
    return request({
        url: `/api/v1/Order/visit/judge-query-basedata`,
        method: 'get',
        params
    });
};
/**
 * @description 回访扭转列表
 * @param {object} params
 */
export const visitTurnList = (params: object) => {
    return request({
        url: `/api/v1/Order/visit/judge-query`,
        method: 'get',
        params,
    });
};
/**
 * @description 回访扭转列表导出
 * @param {object} data
 */
export const visitTurnExport = (data: object) => {
  return request({

    url: `/api/v1/Order/visit/judge-query-export`,
    method: 'post',
    data,
    responseType: 'blob',
  }, {
    reduce_data_format: false
  });
}
/**
 * @description 扭转满意度
 * @param {object} data
 */
export const visitTurnSatisfaction = (data: object) => {
    return request({
        url: `/api/v1/Order/visit/judge`,
        method: 'post',
        data
    });
};
/**
 * @description 发送回访短信
 * @param {object} data
 */
export const visitSendSms = (data: object) => {
    return request({
        url: `/api/v1/Order/visit/sms`,
        method: 'post',
        data
    });
};
/**
 * @description 批量回访保存基础信息
 * @param {object} params
 */
export const visitAddBaseData = (params?: object) => {
    return request({
        url: `/api/v1/Order/visit/batch-basedata`,
        method: 'get',
        params
    });
};
/**
 * @description 批量回访保存
 * @param {object} data
 */
export const visitAddBatch = (data: object) => {
    return request({
        url: `/api/v1/Order/visit/batch`,
        method: 'post',
        data
    });
};
/**
 * @description 设置未接通
 * @param {object} data
 */
export const visitSetUnconnected = (data: object) => {
    return request({
        url: `/api/v1/Order/visit/put_through`,
        method: 'put',
        data
    });
};
/**
 * @description 部门满意度统计明细列表
 * @param {object} params
 */
export const visitDepartmentSatisfactionList = (params: object) => {
    return request({
        url: `/api/v1/Order/org-visitdetail-list`,
        method: 'get',
        params,
        paramsSerializer: (params:any) => qs.stringify(params)
    });
}
/**
 * @description 部门满意度统计明细列表导出
 * @param {object} data
 */
export const visitDepartmentSatisfactionListExport = (data: object) => {
    return request({
        url: `/api/v1/Order/org-visitdetail-list-export`,
        method: 'post',
        data,
        responseType: 'blob'
    }, {
        reduce_data_format: false
    });
}