Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
customer-admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
customer-admin
Commits
af886a5e
提交
af886a5e
authored
10月 26, 2021
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码提交
上级
504f6cb1
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
10 行增加
和
25 行删除
+10
-25
api.js
src/modules/customer/api.js
+2
-2
api.js
src/modules/system/customergroup/api.js
+4
-3
AddCustomer.vue
src/modules/system/customergroup/components/AddCustomer.vue
+4
-20
没有找到文件。
src/modules/customer/api.js
浏览文件 @
af886a5e
...
...
@@ -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
)
{
...
...
src/modules/system/customergroup/api.js
浏览文件 @
af886a5e
...
...
@@ -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
})
}
// 编辑客户组
...
...
src/modules/system/customergroup/components/AddCustomer.vue
浏览文件 @
af886a5e
...
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论