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

export default {
	list: function (params) {
		return request({
			url: prefix + '/enrollmentRegistration/list',
			method: 'get',
			params: params
		})
	},
	save (inputForm) {
		return request({
			url: prefix +  `/enrollmentRegistration/save`,
			method: 'post',
			data: inputForm
		})
	},
	save2 (inputForm) {
		return request({
			url: prefix +  `/enrollmentRegistration/save2`,
			method: 'post',
			data: inputForm
		})
	},
	updateInfo (inputForm) {
		return request({
			url: prefix +  `/enrollmentRegistration/updateInfo`,
			method: 'post',
			data: inputForm
		})
	},
	saveWageCard (inputForm) {
		return request({
			url: prefix +  `/enrollmentRegistration/saveWageCard`,
			method: 'post',
			data: inputForm
		})
	},
	saveSocialCard (inputForm) {
		return request({
			url: prefix +  `/enrollmentRegistration/saveSocialCard`,
			method: 'post',
			data: inputForm
		})
	},
	saveKeyCard (inputForm) {
		return request({
			url: prefix +  `/enrollmentRegistration/saveKeyCard`,
			method: 'post',
			data: inputForm
		})
	},
	saveRiceCard (inputForm) {
		return request({
			url: prefix +  `/enrollmentRegistration/saveRiceCard`,
			method: 'post',
			data: inputForm
		})
	},
	findById (id) {
		return request({
			url: prefix + '/enrollmentRegistration/findById',
			method: 'get',
			params: {id: id}
		})
	},
	findWageCardById (id) {
		return request({
			url: prefix + '/enrollmentRegistration/findWageCardById',
			method: 'get',
			params: {id: id}
		})
	},
	findSocialCardById (id) {
		return request({
			url: prefix + '/enrollmentRegistration/findSocialCardById',
			method: 'get',
			params: {id: id}
		})
	},
	findKeyCardById (id) {
		return request({
			url: prefix + '/enrollmentRegistration/findKeyCardById',
			method: 'get',
			params: {id: id}
		})
	},
	findRiceCardById (id) {
		return request({
			url: prefix + '/enrollmentRegistration/findRiceCardById',
			method: 'get',
			params: {id: id}
		})
	},
	updateStatusById (param) {
		return request({
			url: prefix + '/enrollmentRegistration/updateStatusById',
			method: 'post',
			data: param
		})
	},
	updateWageCardStatusById (param) {
		return request({
			url: prefix + '/enrollmentRegistration/updateWageCardStatusById',
			method: 'post',
			data: param
		})
	},
	updateSocialCardStatusById (param) {
		return request({
			url: prefix + '/enrollmentRegistration/updateSocialCardStatusById',
			method: 'post',
			data: param
		})
	},
	updateKeyCardStatusById (param) {
		return request({
			url: prefix + '/enrollmentRegistration/updateKeyCardStatusById',
			method: 'post',
			data: param
		})
	},
	updateRiceCardStatusById (param) {
		return request({
			url: prefix + '/enrollmentRegistration/updateRiceCardStatusById',
			method: 'post',
			data: param
		})
	},
	remove (id) {
		return request({
			url: prefix + '/enrollmentRegistration/remove',
			method: 'get',
			params: {id: id}
		})
	},
	findIdCardOnly (idCard) {
		return request({
			url: prefix + '/enrollmentRegistration/findIdCardOnly',
			method: 'get',
			params: {idCard: idCard}
		})
	},
	findMobilePhoneOnly (mobilePhone) {
		return request({
			url: prefix + '/enrollmentRegistration/findMobilePhoneOnly',
			method: 'get',
			params: {mobilePhone: mobilePhone}
		})
	},
	findByUserId (userId) {
		return request({
			url: prefix + '/enrollmentRegistration/findByUserId',
			method: 'get',
			params: {userId: userId}
		})
	},
	downloadFile () {
		return request({
			url: prefix + '/enrollmentRegistration/downloadFile',
			method: 'get',
			params: {},
			responseType: 'blob'
		})
	},
	downloadDepartFile (handoverId) {
		return request({
			url: prefix + '/enrollmentRegistration/downloadDepartFile',
			method: 'get',
			params: {handoverId: handoverId},
			responseType: 'blob'
		})
	}
}
