import api from './api'


export function getContractPage(data) {
	return api.get('/crm/contract/page', data, {
		login: false
	})
}

export function getContractNo(data) {
	return api.get('/crm/contract/getCode', data, {
		login: false
	})
}

export function getContractByCustomerId(data) {
	return api.get('/bpm/oa/contract/getContractByCustomerId', data, {
		login: false
	})
}

export function createContract(data) {
	return api.post('/crm/contract/create', data, {
		login: false
	})
}

export function getContract(data) {
	return api.get('/crm/contract/get', data, {
		login: false
	})
}

export function getContractProductListByContractId(data) {
	return api.get('/crm/contract/contract-product/list-by-contract-id', data, {
		login: false
	})
}

export function updateContract(data) {
	return api.put('/crm/contract/update', data, {
		login: false
	})
}

export function check(data) {
	return api.post('/crm/contract/check', data, {
		login: false
	})
}


//改成OA之后的
export function getOAContractPage(data) {
	return api.get('/bpm/oa/contract/page', data, {
		login: false
	})
}
//创建
export function createOAContract(data) {
	return api.post('/bpm/oa/contract/create', data, {
		login: false
	})
}
//详情
export function getOAContract(data) {
	return api.get('/bpm/oa/contract/get', data, {
		login: false
	})
}
//详情
export function getByProcessInstanceId(data) {
	return api.get('/bpm/oa/contract/getByProcessInstanceId', data, {
		login: false
	})
}
//获得同部门的合同审批
export function getListByDeptId(data) {
	return api.get('/bpm/oa/contract/getListByDeptId', data, {
		login: false
	})
}
// 获取部门类型为公司的部门信息
export function getCompanyDept(data) {
	return api.get('/system/dept/getCompanyDept', data, {
		login: false
	})
}
