import http from '@/http/http.js'
const request = http.request

/**
 * 交班记录-分页
 * @returns
 */
export function getHandoverRecord(data, urlType = 'account') {
	return request({
		url: `${urlType}/admin/handoverRecord/page`,
		method: "GET",
		data: {
			...data
		}
	})
}

/**
 * 交班记录-查看
 * @returns
 */
export function getHandoverRecordView(id, urlType = 'account') {
	return request({
		url: `${urlType}/admin/handoverRecord/${id}`,
		method: "GET",
	})
}

/**
 * 交班记录-导出
 * @returns
 */
export function getHandoverRecordExport(id, urlType = 'account') {
	return request({
		url: `${urlType}/admin/handoverRecord/export/${id}`,
		method: "GET",
	})
}

/**
 * 收银机-交班数据统计
 * @returns
 */
export function getHandoverRecordTotal(data, urlType = 'account') {
	return request({
		url: `${urlType}/admin/handoverRecord/total`,
		method: "GET",
		data: {
			...data
		}
	})
}

/**
 * 收银机-交班/关班
 * @returns
 */
export function getHandoverRecordHandover(data, urlType = 'account') {
	return request({
		url: `${urlType}/admin/handoverRecord/handover`,
		method: "POST",
		data: {
			...data
		}
	})
}