import request from '$project/utils/request'
import Qs from 'qs';

//个人申请调班提交
export function adjustShiftSubmit(params) {
	return request({
		url: '/mobile/adjustShiftApi/adjustShiftSubmit',
		data: Qs.stringify(params),
		method: 'post',
	})
}


//根据登录人查询自己部门能使用的排班
export function ownerCompanyShift(params) {
	return request({
		url: '/mobile/adjustShiftApi/ownerCompanyShift',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//根据登录人查询自己部门能使用的排班
export function allShift() {
	return request({
		url: '/mobile/adjustShiftApi/allShift',
		data: Qs.stringify(),
		method: 'post',
	})
}

//根据登录人查询自己的排班
export function ownerShift(params) {
	return request({
		url: '/mobile/adjustShiftApi/ownerShift',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//根据id查询申请调班详情
export function adjustShiftDetail(id) {
	var 	params= {
			id:id
		}
	return request({
		url: '/mobile/adjustShiftApi/adjustShiftDetail',
		data: Qs.stringify(params),
		method: 'post',
	})
}



//根据登录人查询待审核的调班记录
export function waitExamineShiftList(params) {
 
	return request({
		url: '/mobile/examineApi/waitExamineShiftList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//审核
export function examineSubmit(params) {
 
	return request({
		url: '/mobile/examineApi/examineSubmit',
		data: Qs.stringify(params),
		method: 'post',
	})
}



//根据登录人查询已审核的调班记录
export function alreadyExamineShiftList(params) {
 
	return request({
		url: '/mobile/examineApi/alreadyExamineShiftList',
		data: Qs.stringify(params),
		method: 'post',
	})
}
//个人调班记录
export function adjustShiftList(params) {
 
	return request({
		url: '/mobile/adjustShiftApi/adjustShiftList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//安排调班选择人员时展示的部门
export function arrangeShiftCompanyList(params,batchJob) {
 
	return request({
		url: '/mobile/adjustShiftApi/arrangeShiftCompanyList',
		data: Qs.stringify({
			companyId:params,
			batchJob:batchJob
		}),
		method: 'post',
	})
}

//安排调班选择人员时展示的人员
export function arrangeShiftPersonList(params) {
 
	return request({
		url: '/mobile/adjustShiftApi/arrangeShiftPersonList',
		data: Qs.stringify({
			companyId:params
		}),
		method: 'post',
	})
}


//根据id查询安排调班详情
export function arrangeShiftDetail(id) {
	var 	params= {
			id:id
		}
	return request({
		url: '/mobile/adjustShiftApi/arrangeShiftDetail',
		data: Qs.stringify(params),
		method: 'post',
	})
}
//安排调班提交
export function arrangeShiftSubmit(params) {
 
	return request({
		url: '/mobile/adjustShiftApi/arrangeShiftSubmit',
		data: Qs.stringify(params),
		method: 'post',
	})
}
//安排调班列表
export function arrangeShiftList(params) {
 
	return request({
		url: '/mobile/adjustShiftApi/arrangeShiftList',
		data: Qs.stringify(params),
		method: 'post',
	})
}



//批量补卡记录列表
export function supplementWorkBatchList(params) {
 
	return request({
		url: '/mobile/workAttendance/supplementWorkBatchList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//批量补卡申请提交
export function supplementWorkBatchSubmit(params) {
 
	return request({
		url: '/mobile/workAttendance/supplementWorkBatchSubmit',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//根据id查询批量补卡详情
export function supplementWorkBatchDetail(id) {
	var 	params= {
 		id:id
 	}
	return request({
		url: '/mobile/workAttendance/supplementWorkBatchDetail',
		data: Qs.stringify(params),
		method: 'post',
	})
}





//列表
export function CarryThingsList(params) {
 
	return request({
		url: '/mobile/carryThingsOutFactoryApi/CarryThingsList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//携物出厂 提交
export function submitCarryThings(params) {
 
	return request({
		url: '/mobile/carryThingsOutFactoryApi/submitCarryThings',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//详情
export function carryThingsDetail(id) {
	var 	params= {
 		id:id
 	}
	return request({
		url: '/mobile/carryThingsOutFactoryApi/carryThingsDetail',
		data: Qs.stringify(params),
		method: 'post',
	})
}


export function personShiftInfo(time) {
	var 	params= {
 		date:time
 	}
	return request({
		url: '/mobile/personInfoApi/personShiftInfo',
		data: Qs.stringify(params),
		method: 'post',
	})
}
