/*
 * @Author: zc
 * @description 业务管理-省退回
 */
import request from '@/utils/request';
/**
 * @description 工单退回列表基础数据
 * @param {object} params
 */
export const returnBase = (params?: object) => {
	return request({
		url: `/api/v1/Order/order_previous/base-data`,
		method: 'get',
		params,
	});
};
/**
 * @description 省退回申请列表
 * @param {object} params
 */
export const provinceReturnList = (params: object) => {
	return request({
		url: `/api/v1/Order/send_back`,
		method: 'get',
		params,
	});
};
/**
 * @description 省退回申请新增
 * @param {object} data
 */
export const returnAdd = (data: object) => {
	return request({
		url: `/api/v1/Order/send_back/apply`,
		method: 'post',
		data,
	});
};
/**
 * @description 省退回申请审核
 * @param {object} data
 */
export const returnAudit = (data: object) => {
	return request({
		url: `/api/v1/Order/send_back/audit`,
		method: 'post',
		data,
	});
};
/**
 * @description 省退回申请返回结果
 * @param {object} id
 */
export const returnResult = (id: string) => {
	return request({
		url: `/api/v1/Order/send_back/result`,
		method: 'get',
	});
};
/**
 * @description 省退回申请详情
 * @param {object} id
 */
export const returnDetail = (id: string) => {
	return request({
		url: `/api/v1/Order/send_back/${id}`,
		method: 'get',
	});
};
/**
 * @description 工单退回审核列表
 * @param {object} params
 */
export const returnAuditList = (params: object) => {
	return request({
		url: `/api/v1/Order/order_previous_list`,
		method: 'get',
		params,
	});
};
/**
 * @description 工单退回审批列表导出
 * @param {object} data
 */
export const returnExport = (data: object) => {
	return request(
		{
			url: `/api/v1/Order/order_previous_list/_export`,
			method: 'post',
			data,
			responseType: 'blob',
		},
		{
			reduce_data_format: false,
		}
	);
};
/**
 * @description 工单退回批量审核
 * @param {object} data
 */
export const returnAuditAddBatch = (data: object) => {
	return request({
		url: `/api/v1/Order/order_previous_audit_batch`,
		method: 'post',
		data,
	});
};
/**
 * @description 工单退回审核
 * @param {object} data
 */
export const returnAuditAdd = (data: object) => {
	return request({
		url: `/api/v1/Order/order_previous_audit`,
		method: 'post',
		data,
	});
};
/**
 * @description 工单退回详情
 * @param {string} id
 */
export const returnAuditDetail = (id: string) => {
	return request({
		url: `/api/v1/Order/order_previous/${id}`,
		method: 'get',
	});
};
