import axios from '@/libs/axios.js'

// 客户列表
export const customerList = (params) => {
	const url=`cust/queryPage/${params.pageNo}/${params.pageSize}`
	delete params.pageNo
	delete params.pageSize
	return axios.request({
		url: url,
		data: params,
		method: 'post'
	})
}

// 新增客户
export const custSave = (params) => {
  return axios.request({
    url: 'cust/save',
    data: params,
    method: 'post'
  })
} 
// 根据sn修改客户信息
export const updateByCustomerSn = params => {
  return axios.request({
    url: 'cust/updateByCustomerSn',
    data: params,
    method: 'post'
  })
}
 // 客户详情
export const customerDetail = params => {
  return axios.request({
    url: `cust/findById/${params.id}`,
    data: {},
    method: 'get'
  })
}

// 客户类型
export const custType = (params) => {
  return axios.request({
    url: 'custType/findAll',
    data: params,
    method: 'post'
  })
} 

// 业务员
export const employeeAllList = (params) => {
  return axios.request({
    url: 'employee/queryList',
    data: {},
    method: 'post'
  })
}