import request from '@/utils/httpRequest'
import { BUSINESS_PATH as prefix } from "../AppPath";

export default class DimissionService{
	list (param) {
		return request({
			url: prefix +'/employeeDimission/findPageList',
			method: 'get',
			params: param
		})
	}

	saveForm (inputForm) {
		return request({
			url: prefix + `/employeeDimission/saveForm`,
			method: 'post',
			data: inputForm
		})
	}

	saveHeir (inputForm) {
		return request({
			url: prefix + `/employeeDimission/saveHeir`,
			method: 'post',
			data: inputForm
		})
	}

	queryById (id) {
		return request({
			url: prefix +'/employeeDimission/findById',
			method: 'get',
			params: {id: id}
		})
	}

	findHeirById (id) {
		return request({
			url: prefix +'/employeeDimission/findHeirById',
			method: 'get',
			params: {id: id}
		})
	}

	updateStatusById(data) {
		return request({
			url: prefix + "/employeeDimission/updateStatusById",
			method: "post",
			data: data,
		})
	}

	updateHeirStatusById(data) {
		return request({
			url: prefix + "/employeeDimission/updateHeirStatusById",
			method: "post",
			data: data,
		})
	}

	delete (ids) {
		return request({
			url: prefix+"/employeeDimission/delete",
			method: 'delete',
			params: {id: ids}
		})
	}


	adminEditForm(param){
		return request({
			url: prefix + "/employeeDimission/adminEditForm",
			method: "post",
			data: param,
		})
	}

	exportExcel (params) {
		return request({
			url: prefix + "/employeeDimission/export",
			method: "get",
			params: params,
			responseType: "blob",
		});
	}


}
