import request from '@/utils/request'
import Qs from 'qs';

/**
 * 出差相关
 * @param params
 */

//提交出差申请
export function submitBusiness(params) {
	return request({
		url: '/mobile/businessOutApiController/submitBusiness',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//出差申请详情
export function businessOutDetail(id) {
	return request({
		url: '/mobile/businessOutApiController/businessOutDetail',
		data: Qs.stringify({
			id: id
		}),
		method: 'post',
	})
}

//出差申请审核
export function businessOutApproval(params) {
	return request({
		url: '/mobile/businessOutApiController/businessOutApproval',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//获取审核人列表
export function getBusinessOutApprovalPerson(params) {
	return request({
		url: '/mobile/workAttendance/approvalList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//出差申请列表
export function pageList(params) {
	return request({
		url: '/mobile/businessOutApiController/businessOutApprovalPersonList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//出差申请审核列表
export function verifyList(params) {
	return request({
		url: '/mobile/businessOutApiController/businessOutApprovalList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//出差结束
export function businessOutEnd(params) {
	return request({
		url: '/mobile/businessOutApiController/businessOutEnd',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//添加备注
export function addRemark(params) {
	return request({
		url: '/mobile/businessOutApiController/addRemarkForBusinessOut',
		data: Qs.stringify(params),
		method: 'post',
	})
}
