import api from './api'


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

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

export function getCustomerListPage(data) {
	return api.get(`/crm/customer/page2`, data, {
		login: false
	})
}


export function getDictData(data) {
	return api.get(`/system/dict-data/type`, data, {
		login: false
	})
}

export function createRecord(data) {
	return api.post(`/crm/record/create`, data, {
		login: false
	})
}

export function getCustomer(data) {
	return api.get(`/crm/customer/get`, data, {
		login: false
	})
}

export function getRecordPage(data) {
	return api.get(`/crm/record/page`, data, {
		login: false
	})
}

export function getContactsPage(data) {
	return api.get(`/crm/customer-contacts/page`, data, {
		login: false
	})
}

export function createContact(data) {
	return api.post(`/crm/customer-contacts/create`, data, {
		login: false
	})
}

export function updateContact(data) {
	return api.put(`/crm/customer-contacts/update`, data, {
		login: false
	})
}

export function getContacts(data) {
	return api.get(`/crm/customer-contacts/get`, data, {
		login: false
	})
}

export function getCustomerDoOpen(data) {
	return api.get(`/crm/customer/do-open`, data, {
		login: false
	})
}

export function getCustomerReceive(data) {
	return api.get(`/crm/customer/receive`, data, {
		login: false
	})
}

export function delCustomer(data) {
	return api.delete(`/crm/customer/delete`, data, {
		login: false
	})
}

export function transferCustomer(data) {
	return api.post(`/crm/customer/transfer`, data, {
		login: false
	})
}

//获得销售业绩结算记录分页
export function getSalesPerformancePage(data) {
	return api.get(`/crm/sales-performance-settlement/page`, data, {
		login: false
	})
}

//获得销售业绩结算记录
export function getSalesPerformance(data) {
	return api.get(`/crm/sales-performance-settlement/get`, data, {
		login: false
	})
}

//更新销售业绩结算记录
export function updateSalesPerformance(data) {
	return api.put(`/crm/sales-performance-settlement/update`, data, {
		login: false
	})
}

export function getUserTreeList(data) {
	return api.get(`/crm/user-live-tree/list`, data, {
		login: false
	})
}