Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
customer-admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
customer-admin
Commits
656d8954
提交
656d8954
authored
10月 26, 2021
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码提交
上级
624a9da7
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
132 行增加
和
60 行删除
+132
-60
api.js
src/modules/customer/api.js
+4
-0
CreateContact.vue
src/modules/customer/components/CreateContact.vue
+8
-8
CreateCoopProject.vue
src/modules/customer/components/CreateCoopProject.vue
+23
-9
Project.vue
src/modules/customer/components/Project.vue
+12
-5
AddCustomer.vue
src/modules/system/customergroup/components/AddCustomer.vue
+12
-6
AddCustomerGroup.vue
...ules/system/customergroup/components/AddCustomerGroup.vue
+21
-11
AddEmployees.vue
src/modules/system/customergroup/components/AddEmployees.vue
+22
-10
Customer.vue
src/modules/system/customergroup/components/Customer.vue
+10
-4
Employees.vue
src/modules/system/customergroup/components/Employees.vue
+10
-3
List.vue
src/modules/system/customergroup/views/List.vue
+10
-4
没有找到文件。
src/modules/customer/api.js
浏览文件 @
656d8954
...
...
@@ -64,3 +64,7 @@ export function createFollowRecord(id, data) {
export
function
deleteFollowRecord
(
id
)
{
return
httpRequest
.
delete
(
`/api/customer/admin/v1/record/
${
id
}
`
)
}
// 获取合作项目详情
export
function
getprojectDetail
(
data
)
{
return
httpRequest
.
get
(
`/api/customer/admin/v1/project/
${
data
.
id
}
`
,
data
)
}
src/modules/customer/components/CreateContact.vue
浏览文件 @
656d8954
...
...
@@ -2,48 +2,48 @@
<el-dialog
v-bind=
"$attrs"
v-on=
"$listeners"
top=
"20vh"
:title=
"title"
width=
"60%"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-row>
<el-col
span=
"12"
>
<el-col
:
span=
"12"
>
<el-form-item
label=
"姓名"
prop=
"name"
>
<el-input
v-model=
"form.name"
/>
</el-form-item>
</el-col>
<el-col
span=
"12"
>
<el-col
:
span=
"12"
>
<el-form-item
label=
"职责"
prop=
"position"
>
<el-input
v-model=
"form.position"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
span=
"12"
>
<el-col
:
span=
"12"
>
<el-form-item
label=
"部门"
prop=
"department"
>
<el-input
v-model=
"form.department"
/>
</el-form-item>
</el-col>
<el-col
span=
"12"
>
<el-col
:
span=
"12"
>
<el-form-item
label=
"电话"
prop=
"mobile"
>
<el-input
v-model=
"form.mobile"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
span=
"12"
>
<el-col
:
span=
"12"
>
<el-form-item
label=
"邮箱"
prop=
"email"
>
<el-input
v-model=
"form.email"
/>
</el-form-item>
</el-col>
<el-col
span=
"12"
>
<el-col
:
span=
"12"
>
<el-form-item
label=
"微信号"
prop=
"wechat"
>
<el-input
v-model=
"form.wechat"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
span=
"12"
>
<el-col
:
span=
"12"
>
<el-form-item
label=
"QQ"
prop=
"qq"
>
<el-input
v-model=
"form.qq"
/>
</el-form-item>
</el-col>
<el-col
span=
"12"
>
<el-col
:
span=
"12"
>
<el-form-item
label=
"附属手机"
prop=
"sub_mobile"
>
<el-input
v-model=
"form.sub_mobile"
/>
</el-form-item>
...
...
src/modules/customer/components/CreateCoopProject.vue
浏览文件 @
656d8954
<
template
>
<el-dialog
v-bind=
"$attrs"
v-on=
"$listeners"
top=
"20vh"
:title=
"title"
>
<el-dialog
v-bind=
"$attrs"
v-on=
"$listeners"
top=
"20vh"
:title=
"title"
width=
"60%"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-row>
<el-col
span=
"12"
>
<el-col
:
span=
"12"
>
<el-form-item
label=
"项目"
prop=
"tag"
>
<el-select
v-model=
"form.tag"
placeholder=
"请选择项目"
size=
"small"
style=
"width: 100%"
>
<el-option
label=
"产业学院"
:value=
"1"
></el-option>
...
...
@@ -10,7 +10,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col
span=
"12"
>
<el-col
:
span=
"12"
>
<el-form-item
label=
"项目进度"
prop=
"status"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择进度"
size=
"small"
style=
"width: 100%"
>
<el-option
label=
"待跟进"
:value=
"1"
></el-option>
...
...
@@ -24,12 +24,16 @@
</el-col>
</el-row>
<el-row>
<el-col
span=
"12"
>
<el-col
:
span=
"12"
>
<el-form-item
label=
"负责人"
prop=
"project_sso_ids"
>
<app-user-search
v-model=
"form.project_sso_ids"
:options=
"
{ multiple: true }">
</app-user-search>
<app-user-search
v-model=
"form.project_sso_ids"
:defaultList=
"form.charge_persons"
:options=
"
{ multiple: true }"
>
</app-user-search>
</el-form-item>
</el-col>
<el-col
span=
"12"
>
<el-col
:
span=
"12"
>
<el-form-item
label=
"合作意向"
prop=
"cooperation_intention"
>
<el-select
v-model=
"form.cooperation_intention"
...
...
@@ -99,13 +103,23 @@ export default {
isEdit
:
{
type
:
Boolean
,
default
:
false
},
formData
:
{
type
:
Object
,
default
:
()
=>
({})
}
},
watch
:
{
row
:
{
formData
:
{
immediate
:
true
,
handler
(
row
)
{
this
.
form
=
Object
.
assign
({},
this
.
form
,
row
)
handler
(
formData
)
{
this
.
form
.
project_sso_ids
=
[]
if
(
formData
.
charge_persons
)
{
formData
.
charge_persons
.
forEach
(
item
=>
{
this
.
form
.
project_sso_ids
.
push
(
item
.
id
)
})
this
.
form
=
Object
.
assign
({},
this
.
form
,
formData
)
}
}
}
},
...
...
src/modules/customer/components/Project.vue
浏览文件 @
656d8954
...
...
@@ -18,6 +18,7 @@
:isEdit=
"isEdit"
v-if=
"isShowDialog"
:id=
"id"
:formData=
"formData"
/>
</app-list>
</div>
...
...
@@ -25,7 +26,7 @@
<
script
>
// 组件
import
CreateCoopProject
from
'../components/CreateCoopProject.vue'
import
{
getCoopList
,
delCooProject
}
from
'../api'
import
{
getCoopList
,
delCooProject
,
getprojectDetail
}
from
'../api'
export
default
{
name
:
'Contact'
,
components
:
{
CreateCoopProject
},
...
...
@@ -33,7 +34,8 @@ export default {
return
{
isShowDialog
:
false
,
isEdit
:
false
,
row
:
{}
row
:
{},
formData
:
{}
}
},
props
:
{
...
...
@@ -72,10 +74,11 @@ export default {
label
:
'负责人'
,
align
:
'center'
,
computed
({
row
})
{
const
find
=
row
.
charge_persons
.
find
(
item
=>
{
return
item
.
username
const
userName
=
[]
row
.
charge_persons
.
forEach
(
item
=>
{
userName
.
push
(
item
.
username
)
})
return
find
.
username
return
userName
.
join
(
'
\
n'
)
}
},
{
...
...
@@ -112,6 +115,7 @@ export default {
this
.
$refs
.
list
.
refetch
()
},
handleAdd
()
{
this
.
formData
=
{}
this
.
row
=
{}
this
.
isEdit
=
false
this
.
isShowDialog
=
true
...
...
@@ -120,6 +124,9 @@ export default {
this
.
row
=
row
this
.
isEdit
=
true
this
.
isShowDialog
=
true
getprojectDetail
({
id
:
row
.
id
}).
then
(
res
=>
{
this
.
formData
=
res
.
data
})
},
handleDelete
(
row
)
{
delCooProject
({
id
:
row
.
id
}).
then
(
res
=>
{
...
...
src/modules/system/customergroup/components/AddCustomer.vue
浏览文件 @
656d8954
...
...
@@ -3,7 +3,7 @@
<app-card>
<app-list
v-bind=
"tableOptions"
ref=
"list"
@
selection-change=
"handleSelectionChange"
>
<template
v-slot:filter-userSearch=
"
{ params }">
<app-user-search
v-model=
"params.created_by"
:options=
"
{ multiple: true }"
>
</app-user-search>
<app-user-search
v-model=
"params.created_by"
></app-user-search>
</
template
>
<
template
#
footer
>
<el-button
@
click=
"$emit('update:visible', false)"
style=
"margin-left: 20px"
>
取消
</el-button>
...
...
@@ -73,11 +73,17 @@ export default {
const
param
=
this
.
multipleSelection
const
arr
=
param
.
map
(
item
=>
item
.
id
)
const
params
=
{
group_id
:
this
.
id
,
customer_ids
:
arr
}
createCustomer
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
'添加客户成功'
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'success'
)
})
createCustomer
(
params
)
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
'添加客户成功'
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'success'
)
}
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
})
}
}
}
...
...
src/modules/system/customergroup/components/AddCustomerGroup.vue
浏览文件 @
656d8954
<
template
>
<el-dialog
v-bind=
"$attrs"
v-on=
"$listeners"
width=
"
2
0%"
top=
"30vh"
:title=
"title"
>
<el-dialog
v-bind=
"$attrs"
v-on=
"$listeners"
width=
"
4
0%"
top=
"30vh"
:title=
"title"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
label-position=
"top"
>
<el-form-item
label=
"客户组名称"
prop=
"name"
label-width=
"100px"
>
<el-input
v-model=
"form.name"
/>
...
...
@@ -60,19 +60,29 @@ export default {
// 编辑/更新客户组
edit
()
{
const
params
=
Object
.
assign
({
id
:
this
.
row
.
id
},
this
.
form
)
editCustomerGroup
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
'客户组创建成功'
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'success'
,
res
.
data
)
})
editCustomerGroup
(
params
)
.
then
(
res
=>
{
this
.
$message
.
success
(
'客户组创建成功'
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'success'
,
res
.
data
)
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
})
},
// 新建客户组
create
()
{
createCustomerGroup
(
this
.
form
).
then
(
res
=>
{
this
.
$message
.
success
(
'客户组创建成功'
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'success'
,
res
.
data
)
})
createCustomerGroup
(
this
.
form
)
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
'客户组创建成功'
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'success'
,
res
.
data
)
}
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
})
}
}
}
...
...
src/modules/system/customergroup/components/AddEmployees.vue
浏览文件 @
656d8954
<
template
>
<el-dialog
v-bind=
"$attrs"
v-on=
"$listeners"
width=
"
2
0%"
top=
"30vh"
title=
"添加员工"
>
<el-dialog
v-bind=
"$attrs"
v-on=
"$listeners"
width=
"
4
0%"
top=
"30vh"
title=
"添加员工"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-position=
"top"
>
<el-form-item
label=
"员工名称"
prop=
"id"
size=
"medium"
label-width=
"100px"
>
<el-select
...
...
@@ -83,19 +83,31 @@ export default {
}
}
// 搜索员工
getEmployee
(
params
).
then
(
res
=>
{
this
.
loading
=
false
this
.
employeeList
=
res
.
data
.
items
})
getEmployee
(
params
)
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
loading
=
false
this
.
employeeList
=
res
.
data
.
items
}
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
})
},
submit
()
{
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
const
params
=
Object
.
assign
({
group_id
:
this
.
id
,
staff_ids
:
this
.
form
.
id
})
createEmployee
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
'添加员工成功'
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'success'
)
})
createEmployee
(
params
)
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
'添加员工成功'
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'success'
)
}
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
})
})
}
}
...
...
src/modules/system/customergroup/components/Customer.vue
浏览文件 @
656d8954
...
...
@@ -69,10 +69,16 @@ export default {
handleRemove
(
row
)
{
const
arr
=
[]
arr
.
push
(
row
.
id
)
delCustomer
({
ids
:
arr
}).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功'
})
this
.
$refs
.
list
.
refetch
()
})
delCustomer
({
ids
:
arr
})
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功'
})
this
.
$refs
.
list
.
refetch
()
}
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
})
}
}
}
...
...
src/modules/system/customergroup/components/Employees.vue
浏览文件 @
656d8954
...
...
@@ -72,9 +72,16 @@ export default {
handleRemove
(
row
)
{
const
arr
=
[]
arr
.
push
(
row
.
id
)
delEmployee
({
ids
:
arr
}).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功'
})
})
delEmployee
({
ids
:
arr
})
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功'
})
this
.
success
()
}
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
})
}
}
}
...
...
src/modules/system/customergroup/views/List.vue
浏览文件 @
656d8954
...
...
@@ -95,10 +95,16 @@ export default {
},
// 删除
handleRemove
(
row
)
{
deleteGroup
({
id
:
row
.
id
}).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功'
})
this
.
$refs
.
list
.
refetch
()
})
deleteGroup
({
id
:
row
.
id
})
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功'
})
this
.
$refs
.
list
.
refetch
()
}
})
.
catch
(
error
=>
{
this
.
$message
.
error
(
error
.
message
)
})
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论