提交 af886a5e authored 作者: matian's avatar matian

代码提交

上级 504f6cb1
......@@ -26,7 +26,7 @@ export function createContact(data) {
}
// 获取联系人
export function getContactList(params) {
return httpRequest.get(`/api/customer/admin/v1/${params.customer_id}/contacts`, params)
return httpRequest.get(`/api/customer/admin/v1/${params.customer_id}/contacts`, { params })
}
// 更新联系人
export function UpdateContact(data) {
......@@ -38,7 +38,7 @@ export function delContact(data) {
}
// 获取合作项目
export function getCoopList(params) {
return httpRequest.get(`/api/customer/admin/v1/${params.customer_id}/projects`, params)
return httpRequest.get(`/api/customer/admin/v1/${params.customer_id}/projects`, { params })
}
// 创建合作项目
export function createCooProject(data) {
......
......@@ -7,17 +7,18 @@ export function createCustomerGroup(data) {
// 获取客户组列表
export function getCustomerGroup(params) {
return httpRequest.get('/api/customer/admin/v1/groups', params)
return httpRequest.get('/api/customer/admin/v1/groups', { params })
}
// 获取被分配到客户组的客户
export function customerDetail(params) {
return httpRequest.get(`/api/customer//admin/v1/${params.group_id}/group-customers`, params)
return httpRequest.get(`/api/customer/admin/v1/${params.group_id}/group-customers`, { params })
}
// 获取客户列表
export function getEmployeeList(params) {
return httpRequest.get(`/api/customer/admin/v1/${params.group_id}/customers`, params)
console.log(params)
return httpRequest.get(`/api/customer/admin/v1/${params.group_id}/customers`, { params })
}
// 编辑客户组
......
......@@ -15,7 +15,7 @@
</template>
<script>
import { getEmployeeList, createCustomer, getEmployee } from '../api'
import { getEmployeeList, createCustomer } from '../api'
import AppUserSearch from '@/components/base/AppUserSearch.vue'
export default {
......@@ -24,9 +24,6 @@ export default {
},
data() {
return {
employeeList: {
items: []
},
multipleSelection: []
}
},
......@@ -51,7 +48,8 @@ export default {
{
type: 'input',
prop: 'name',
placeholder: '客户名称'
placeholder: '客户名称',
label: '客户名称:'
},
{ prop: 'created_by', slots: 'filter-userSearch', label: '创建员工:' }
],
......@@ -67,27 +65,13 @@ export default {
}
},
methods: {
fetchEmployeeList() {
const params = {
id: '',
name: '',
username: '',
nickname: '',
email: '',
mobile: ''
}
// 搜索员工
getEmployee(params).then(res => {
this.employeeList = res.data
})
},
handleSelectionChange(val) {
this.multipleSelection = val
},
// 添加员工
submit() {
const param = this.multipleSelection
const arr = param.map(item => item.id)
console.log(arr)
const params = { group_id: this.id, customer_ids: arr }
createCustomer(params).then(res => {
this.$message.success('添加客户成功')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论