Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
customer-admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
customer-admin
Commits
504f6cb1
提交
504f6cb1
authored
10月 26, 2021
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:合作项目增加接口
上级
a4ccd0e4
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
255 行增加
和
161 行删除
+255
-161
AppList.vue
src/components/base/AppList.vue
+11
-17
AppUserSearch.vue
src/components/base/AppUserSearch.vue
+20
-9
api.js
src/modules/customer/api.js
+20
-0
Contact.vue
src/modules/customer/components/Contact.vue
+11
-4
CreateContact.vue
src/modules/customer/components/CreateContact.vue
+2
-2
CreateCoopProject.vue
src/modules/customer/components/CreateCoopProject.vue
+51
-21
CustomerFormDialog.vue
src/modules/customer/components/CustomerFormDialog.vue
+56
-44
Project.vue
src/modules/customer/components/Project.vue
+66
-50
Details.vue
src/modules/customer/views/Details.vue
+2
-2
Index.vue
src/modules/customer/views/Index.vue
+16
-12
没有找到文件。
src/components/base/AppList.vue
浏览文件 @
504f6cb1
...
@@ -38,9 +38,9 @@
...
@@ -38,9 +38,9 @@
</el-form>
</el-form>
<div
class=
"filter-bar"
>
<div
class=
"filter-bar"
>
<div
class=
"filte-bar-left-btns"
>
<div
class=
"filte-bar-left-btns"
>
<
template
v-if=
"searchResetSeparateLine"
>
<
template
v-if=
"searchResetSeparateLine"
>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"small"
@
click=
"search"
>
搜索
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"small"
@
click=
"search"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh-left"
size=
"small"
@
click=
"reset"
>
重置
</el-button>
<el-button
icon=
"el-icon-refresh-left"
size=
"small"
@
click=
"reset"
>
重置
</el-button>
</
template
>
</
template
>
</div>
</div>
<div
class=
"filter-bar-right"
>
<div
class=
"filter-bar-right"
>
...
@@ -53,13 +53,7 @@
...
@@ -53,13 +53,7 @@
<slot></slot>
<slot></slot>
<div
class=
"table-list-bd"
>
<div
class=
"table-list-bd"
>
<slot
name=
"body"
v-bind=
"{ data: dataList }"
>
<slot
name=
"body"
v-bind=
"{ data: dataList }"
>
<el-table
<el-table
:data=
"dataList"
v-loading=
"loading"
v-bind=
"$attrs"
v-on=
"$listeners"
ref=
"table"
>
:data=
"dataList"
v-loading=
"loading"
v-bind=
"$attrs"
v-on=
"$listeners"
ref=
"table"
>
<
template
v-for=
"item in columns"
>
<
template
v-for=
"item in columns"
>
<el-table-column
v-bind=
"item"
:key=
"item.prop"
v-if=
"visible(item)"
>
<el-table-column
v-bind=
"item"
:key=
"item.prop"
v-if=
"visible(item)"
>
<template
v-slot:default=
"scope"
v-if=
"item.slots || item.computed"
>
<template
v-slot:default=
"scope"
v-if=
"item.slots || item.computed"
>
...
@@ -99,7 +93,7 @@ export default {
...
@@ -99,7 +93,7 @@ export default {
remote
:
{
type
:
Object
,
default
:
()
=>
({})
},
remote
:
{
type
:
Object
,
default
:
()
=>
({})
},
// 筛选
// 筛选
filters
:
{
type
:
Array
,
default
:
()
=>
[]
},
filters
:
{
type
:
Array
,
default
:
()
=>
[]
},
searchResetSeparateLine
:
{
type
:
Boolean
,
default
:
false
},
searchResetSeparateLine
:
{
type
:
Boolean
,
default
:
false
},
// 列表项
// 列表项
columns
:
{
type
:
Array
,
default
:
()
=>
[]
},
columns
:
{
type
:
Array
,
default
:
()
=>
[]
},
// 列表数据
// 列表数据
...
@@ -225,15 +219,15 @@ export default {
...
@@ -225,15 +219,15 @@ export default {
.table-list-filter
{
.table-list-filter
{
flex
:
1
;
flex
:
1
;
}
}
.filter-bar
{
.filter-bar
{
display
:flex
;
display
:
flex
;
margin-bottom
:
15px
;
margin-bottom
:
15px
;
}
}
.filte-bar-left-btns
{
.filte-bar-left-btns
{
flex
:
1
;
flex
:
1
;
}
}
.el-form--inline
.el-form-item
{
.el-form--inline
.el-form-item
{
margin-right
:
30px
;
margin-right
:
30px
;
}
}
.table-list-bd
{
.table-list-bd
{
flex
:
1
;
flex
:
1
;
...
...
src/components/base/AppUserSearch.vue
浏览文件 @
504f6cb1
<
template
>
<
template
>
<el-select
v-model=
"userId"
v-bind=
"options"
placeholder=
"输入邮箱/手机号码搜索"
filterable
remote
:remote-method=
"fetchUserList"
:loading=
"searchUsersloading"
@
change=
"handleChange"
>
<el-select
<el-option
:label=
"user.realname || user.nickname "
:value=
"user.id"
v-for=
"user in userList"
:key=
"user.id"
>
v-model=
"userId"
v-bind=
"options"
placeholder=
"输入邮箱/手机号码搜索"
filterable
remote
:remote-method=
"fetchUserList"
:loading=
"searchUsersloading"
@
change=
"handleChange"
multiple
>
<el-option
:label=
"user.realname || user.nickname"
:value=
"user.id"
v-for=
"user in userList"
:key=
"user.id"
>
<span
style=
"float: left"
>
<span
style=
"float: left"
>
{{
user
.
realname
||
user
.
nickname
}}
{{
user
.
realname
||
user
.
nickname
}}
<template
v-if=
"user.mobile"
>
(手机号:
{{
user
.
mobile
}}
)
</
template
>
<template
v-if=
"user.mobile"
>
(手机号:
{{
user
.
mobile
}}
)
</
template
>
</span>
</span>
<span
style=
"float: right; color: #8492a6; font-size: 13px; margin:0 20px 0 10px;"
v-if=
"user.email"
>
邮箱:{{ user.email }}
</span>
<span
style=
"float: right; color: #8492a6; font-size: 13px; margin: 0 20px 0 10px"
v-if=
"user.email"
<span
style=
"float: right; color: #8492a6; font-size: 13px; margin:0 20px 0 10px;"
v-else
>
ID:{{ user.id }}
</span>
>
邮箱:{{ user.email }}
</span
>
<span
style=
"float: right; color: #8492a6; font-size: 13px; margin: 0 20px 0 10px"
v-else
>
ID:{{ user.id }}
</span>
</el-option>
</el-option>
</el-select>
</el-select>
</template>
</template>
...
@@ -88,7 +100,7 @@ export default {
...
@@ -88,7 +100,7 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.el-select
{
.el-select
{
width
:
100%
;
width
:
100%
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/modules/customer/api.js
浏览文件 @
504f6cb1
...
@@ -32,3 +32,23 @@ export function getContactList(params) {
...
@@ -32,3 +32,23 @@ export function getContactList(params) {
export
function
UpdateContact
(
data
)
{
export
function
UpdateContact
(
data
)
{
return
httpRequest
.
put
(
`/api/customer/admin/v1/contact/
${
data
.
id
}
`
,
data
)
return
httpRequest
.
put
(
`/api/customer/admin/v1/contact/
${
data
.
id
}
`
,
data
)
}
}
// 删除联系人
export
function
delContact
(
data
)
{
return
httpRequest
.
delete
(
`/api/customer/admin/v1/contact/
${
data
.
id
}
`
,
data
)
}
// 获取合作项目
export
function
getCoopList
(
params
)
{
return
httpRequest
.
get
(
`/api/customer/admin/v1/
${
params
.
customer_id
}
/projects`
,
params
)
}
// 创建合作项目
export
function
createCooProject
(
data
)
{
return
httpRequest
.
post
(
`/api/customer/admin/v1/
${
data
.
customer_id
}
/project`
,
data
)
}
// 编辑合作项目
export
function
editCooProject
(
data
)
{
return
httpRequest
.
put
(
`/api/customer/admin/v1/project/
${
data
.
id
}
`
,
data
)
}
// 删除合作项目
export
function
delCooProject
(
data
)
{
return
httpRequest
.
delete
(
`/api/customer/admin/v1/project/
${
data
.
id
}
`
,
data
)
}
src/modules/customer/components/Contact.vue
浏览文件 @
504f6cb1
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
// 组件
// 组件
import
CreateContact
from
'./CreateContact.vue'
import
CreateContact
from
'./CreateContact.vue'
import
AppList
from
'@/components/base/AppList.vue'
import
AppList
from
'@/components/base/AppList.vue'
import
{
getContactList
}
from
'../api'
import
{
getContactList
,
delContact
}
from
'../api'
export
default
{
export
default
{
components
:
{
AppList
,
CreateContact
},
components
:
{
AppList
,
CreateContact
},
data
()
{
data
()
{
...
@@ -77,16 +77,23 @@ export default {
...
@@ -77,16 +77,23 @@ export default {
},
},
handleEdit
(
row
)
{
handleEdit
(
row
)
{
this
.
Edit
=
fals
e
this
.
isEdit
=
tru
e
this
.
row
=
row
this
.
row
=
row
this
.
isShowDialog
=
true
this
.
isShowDialog
=
true
},
},
handleAdd
()
{
handleAdd
()
{
this
.
Edit
=
tru
e
this
.
isEdit
=
fals
e
this
.
row
=
{}
this
.
row
=
{}
this
.
isShowDialog
=
true
this
.
isShowDialog
=
true
},
},
handleDelete
()
{}
handleDelete
(
row
)
{
delContact
({
id
:
row
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
'删除成功'
)
this
.
success
()
}
})
}
}
}
}
}
</
script
>
</
script
>
...
...
src/modules/customer/components/CreateContact.vue
浏览文件 @
504f6cb1
...
@@ -85,8 +85,8 @@ export default {
...
@@ -85,8 +85,8 @@ export default {
this
.
isEdit
?
this
.
edit
()
:
this
.
create
()
this
.
isEdit
?
this
.
edit
()
:
this
.
create
()
})
})
},
},
edit
(
row
)
{
edit
()
{
const
params
=
Object
.
assign
({
id
:
row
.
id
},
this
.
form
)
const
params
=
Object
.
assign
({
id
:
this
.
row
.
id
},
this
.
form
)
UpdateContact
(
params
).
then
(
res
=>
{
UpdateContact
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
'新建联系人成功'
)
this
.
$message
.
success
(
'新建联系人成功'
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'update:visible'
,
false
)
...
...
src/modules/customer/components/CreateCoopProject.vue
浏览文件 @
504f6cb1
<
template
>
<
template
>
<el-dialog
v-bind=
"$attrs"
v-on=
"$listeners"
top=
"40vh"
:title=
"title"
>
<el-dialog
v-bind=
"$attrs"
v-on=
"$listeners"
top=
"40vh"
:title=
"title"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
label=
"项目"
prop=
"tag"
>
<el-form-item
label=
"项目"
prop=
"tag"
>
<el-select
v-model=
"form.
source
"
placeholder=
"请选择项目"
size=
"small"
style=
"width: 100%"
>
<el-select
v-model=
"form.
tag
"
placeholder=
"请选择项目"
size=
"small"
style=
"width: 100%"
>
<el-option
label=
"产业学院"
:value=
"1"
></el-option>
<el-option
label=
"产业学院"
:value=
"1"
></el-option>
<el-option
label=
"1+X"
:value=
"2"
></el-option>
<el-option
label=
"1+X"
:value=
"2"
></el-option>
</el-select>
</el-select>
...
@@ -18,11 +18,7 @@
...
@@ -18,11 +18,7 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"负责人"
prop=
"project_sso_ids"
>
<el-form-item
label=
"负责人"
prop=
"project_sso_ids"
>
<el-select
v-model=
"form.project_sso_ids"
placeholder=
"请选择负责人(可多选)"
size=
"small"
style=
"width: 100%"
>
<app-user-search
v-model=
"form.project_sso_ids"
></app-user-search>
<el-option
label=
"公司资源"
:value=
"1"
></el-option>
<el-option
label=
"自己开拓"
:value=
"2"
></el-option>
<el-option
label=
"第三方介绍"
:value=
"3"
></el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"合作意向"
prop=
"cooperation_intention"
>
<el-form-item
label=
"合作意向"
prop=
"cooperation_intention"
>
<el-select
v-model=
"form.cooperation_intention"
placeholder=
"请选择合作意向度"
size=
"small"
style=
"width: 100%"
>
<el-select
v-model=
"form.cooperation_intention"
placeholder=
"请选择合作意向度"
size=
"small"
style=
"width: 100%"
>
...
@@ -39,7 +35,7 @@
...
@@ -39,7 +35,7 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
/>
<el-input
type=
"textarea"
v-model=
"form.remark"
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
style=
"margin-left: 20px"
@
click=
"submit"
>
提交
</el-button>
<el-button
type=
"primary"
style=
"margin-left: 20px"
@
click=
"submit"
>
提交
</el-button>
...
@@ -50,8 +46,11 @@
...
@@ -50,8 +46,11 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
createContact
}
from
'../api'
import
AppUserSearch
from
'@/components/base/AppUserSearch.vue'
import
{
createCooProject
,
editCooProject
}
from
'../api'
export
default
{
export
default
{
components
:
{
AppUserSearch
},
data
()
{
data
()
{
return
{
return
{
form
:
{
form
:
{
...
@@ -59,20 +58,40 @@ export default {
...
@@ -59,20 +58,40 @@ export default {
status
:
''
,
status
:
''
,
cooperation_intention
:
''
,
cooperation_intention
:
''
,
remark
:
''
,
remark
:
''
,
project_sso_ids
:
''
project_sso_ids
:
[]
},
},
rules
:
{
rules
:
{
tag
:
[{
required
:
true
,
message
:
''
,
trigger
:
'blur'
}],
tag
:
[{
required
:
true
,
message
:
''
,
trigger
:
'change'
}],
status
:
[{
required
:
true
,
message
:
''
,
trigger
:
'blur'
}],
status
:
[{
required
:
true
,
message
:
''
,
trigger
:
'change'
}],
project_sso_ids
:
[{
required
:
true
,
message
:
''
,
trigger
:
'blur'
}],
cooperation_intention
:
[{
required
:
true
,
message
:
''
,
trigger
:
'change'
}]
cooperation_intention
:
[{
required
:
true
,
message
:
''
,
trigger
:
'blur'
}]
}
}
}
}
},
},
props
:
{
props
:
{
data
:
{
id
:
{
type
:
String
,
default
:
''
},
row
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
({})
default
:
()
=>
({})
},
isEdit
:
{
type
:
Boolean
,
default
:
false
}
},
watch
:
{
row
:
{
immediate
:
true
,
handler
(
row
)
{
this
.
form
=
Object
.
assign
({},
this
.
form
,
row
)
}
}
},
computed
:
{
title
()
{
return
this
.
isEdit
?
'编辑合作项目'
:
'创建合作项目'
}
}
},
},
...
@@ -80,12 +99,23 @@ export default {
...
@@ -80,12 +99,23 @@ export default {
// 提交
// 提交
submit
()
{
submit
()
{
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
this
.
$refs
.
form
.
validate
().
then
(()
=>
{
const
params
=
Object
.
assign
({
group_id
:
this
.
id
},
this
.
form
)
this
.
isEdit
?
this
.
edit
()
:
this
.
create
()
createContact
(
params
).
then
(
res
=>
{
})
this
.
$message
.
success
(
'新建联系人成功'
)
},
this
.
$emit
(
'update:visible'
,
false
)
create
()
{
this
.
$emit
(
'success'
,
res
.
data
)
const
params
=
Object
.
assign
({
customer_id
:
this
.
id
},
this
.
form
)
})
createCooProject
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
'新建合作项目成功'
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'success'
,
res
.
data
)
})
},
edit
()
{
const
params
=
Object
.
assign
({
id
:
this
.
row
.
id
},
this
.
form
)
editCooProject
(
params
).
then
(
res
=>
{
this
.
$message
.
success
(
'更新合作项目成功'
)
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'success'
,
res
.
data
)
})
})
}
}
}
}
...
...
src/modules/customer/components/CustomerFormDialog.vue
浏览文件 @
504f6cb1
<
template
>
<
template
>
<el-dialog
custom-class=
"create-custom-dialog"
:title=
"info.id ? '更新客户信息' : '创建客户'"
:visible=
"value"
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
top=
"50px"
@
close=
"handleClose"
>
<el-dialog
custom-class=
"create-custom-dialog"
:title=
"info.id ? '更新客户信息' : '创建客户'"
:visible=
"value"
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
top=
"50px"
@
close=
"handleClose"
>
<!--
<div
slot=
"title"
>
<!--
<div
slot=
"title"
>
</div>
-->
</div>
-->
<el-form
:model=
"form"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"90px"
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"90px"
>
<el-form-item
label=
"客户名称"
prop=
"name"
>
<el-form-item
label=
"客户名称"
prop=
"name"
>
<el-input
v-model=
"form.name"
size=
"small"
placeholder=
"请输入客户名称"
/>
<el-input
v-model=
"form.name"
size=
"small"
placeholder=
"请输入客户名称"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"客户简称"
>
<el-form-item
label=
"客户简称"
>
<el-input
v-model=
"form.short_name"
size=
"small"
placeholder=
"请输入客户简称"
/>
<el-input
v-model=
"form.short_name"
size=
"small"
placeholder=
"请输入客户简称"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"客户来源"
prop=
"source"
class=
"form-item-select"
style=
"margin-right:
20px;
"
>
<el-form-item
label=
"客户来源"
prop=
"source"
class=
"form-item-select"
style=
"margin-right:
20px
"
>
<el-select
v-model=
"form.source"
placeholder=
"请选择客户来源"
size=
"small"
style=
"width:
100%;
"
>
<el-select
v-model=
"form.source"
placeholder=
"请选择客户来源"
size=
"small"
style=
"width:
100%
"
>
<el-option
label=
"公司资源"
:value=
"1"
></el-option>
<el-option
label=
"公司资源"
:value=
"1"
></el-option>
<el-option
label=
"自己开拓"
:value=
"2"
></el-option>
<el-option
label=
"自己开拓"
:value=
"2"
></el-option>
<el-option
label=
"第三方介绍"
:value=
"3"
></el-option>
<el-option
label=
"第三方介绍"
:value=
"3"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"客户分类"
prop=
"type"
class=
"form-item-select"
>
<el-form-item
label=
"客户分类"
prop=
"type"
class=
"form-item-select"
>
<el-select
v-model=
"form.type"
placeholder=
"请选择客户分类"
size=
"small"
style=
"width:
100%;
"
>
<el-select
v-model=
"form.type"
placeholder=
"请选择客户分类"
size=
"small"
style=
"width:
100%
"
>
<el-option
label=
"普通客户"
:value=
"1"
></el-option>
<el-option
label=
"普通客户"
:value=
"1"
></el-option>
<el-option
label=
"重点客户"
:value=
"2"
></el-option>
<el-option
label=
"重点客户"
:value=
"2"
></el-option>
</el-select>
</el-select>
...
@@ -26,10 +34,10 @@
...
@@ -26,10 +34,10 @@
<app-area
v-model=
"form.region"
/>
<app-area
v-model=
"form.region"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"详细地址"
>
<el-form-item
label=
"详细地址"
>
<el-input
v-model=
"form.address"
size=
"small"
placeholder=
"请输入详细地址"
/>
<el-input
v-model=
"form.address"
size=
"small"
placeholder=
"请输入详细地址"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
type=
"textarea"
size=
"small"
rows=
"4"
placeholder=
"请输入备注"
/>
<el-input
v-model=
"form.remark"
type=
"textarea"
size=
"small"
rows=
"4"
placeholder=
"请输入备注"
/>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
size=
"mini"
@
click=
"$emit('dialogClose')"
>
取消
</el-button>
<el-button
size=
"mini"
@
click=
"$emit('dialogClose')"
>
取消
</el-button>
...
@@ -50,7 +58,7 @@ export default {
...
@@ -50,7 +58,7 @@ export default {
},
},
info
:
{
info
:
{
type
:
Object
,
type
:
Object
,
default
:()
=>
{
default
:
()
=>
{
return
{}
return
{}
}
}
}
}
...
@@ -96,7 +104,7 @@ export default {
...
@@ -96,7 +104,7 @@ export default {
this
.
$emit
(
'input'
,
false
)
this
.
$emit
(
'input'
,
false
)
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
ruleForm
.
validate
(
(
valid
)
=>
{
this
.
$refs
.
ruleForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
info
.
id
?
this
.
fetchUpdateCustomer
()
:
this
.
fetchCreateCustomer
()
this
.
info
.
id
?
this
.
fetchUpdateCustomer
()
:
this
.
fetchCreateCustomer
()
}
}
...
@@ -105,56 +113,60 @@ export default {
...
@@ -105,56 +113,60 @@ export default {
fetchCreateCustomer
()
{
fetchCreateCustomer
()
{
const
params
=
Object
.
assign
({},
this
.
form
)
const
params
=
Object
.
assign
({},
this
.
form
)
params
.
region
=
this
.
form
.
region
.
join
(
'-'
)
params
.
region
=
this
.
form
.
region
.
join
(
'-'
)
createCustomer
(
params
).
then
(
res
=>
{
createCustomer
(
params
)
if
(
res
.
code
===
0
&&
res
.
data
&&
res
.
data
.
id
)
{
.
then
(
res
=>
{
this
.
$message
.
success
(
'创建客户成功'
)
if
(
res
.
code
===
0
&&
res
.
data
&&
res
.
data
.
id
)
{
this
.
$emit
(
'input'
,
false
)
this
.
$message
.
success
(
'创建客户成功'
)
this
.
$emit
(
'change'
)
this
.
$emit
(
'input'
,
false
)
}
else
{
this
.
$emit
(
'change'
)
}
else
{
this
.
$message
.
error
(
'创建客户失败'
)
}
})
.
catch
(()
=>
{
this
.
$message
.
error
(
'创建客户失败'
)
this
.
$message
.
error
(
'创建客户失败'
)
}
})
}).
catch
(()
=>
{
this
.
$message
.
error
(
'创建客户失败'
)
})
},
},
fetchUpdateCustomer
()
{
fetchUpdateCustomer
()
{
const
params
=
Object
.
assign
({},
this
.
form
)
const
params
=
Object
.
assign
({},
this
.
form
)
params
.
region
=
this
.
form
.
region
.
join
(
'-'
)
params
.
region
=
this
.
form
.
region
.
join
(
'-'
)
updateCustomer
(
this
.
info
.
id
,
params
).
then
(
res
=>
{
updateCustomer
(
this
.
info
.
id
,
params
)
if
(
res
.
code
===
0
&&
res
.
data
&&
res
.
data
.
status
)
{
.
then
(
res
=>
{
this
.
$message
.
success
(
'更新客户成功'
)
if
(
res
.
code
===
0
&&
res
.
data
&&
res
.
data
.
status
)
{
this
.
$emit
(
'input'
,
false
)
this
.
$message
.
success
(
'更新客户成功'
)
this
.
$emit
(
'change'
)
this
.
$emit
(
'input'
,
false
)
}
else
{
this
.
$emit
(
'change'
)
}
else
{
this
.
$message
.
error
(
'更新客户失败'
)
}
})
.
catch
(()
=>
{
this
.
$message
.
error
(
'更新客户失败'
)
this
.
$message
.
error
(
'更新客户失败'
)
}
})
}).
catch
(()
=>
{
this
.
$message
.
error
(
'更新客户失败'
)
})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
::v-deep
.case-dialog
{
::v-deep
.case-dialog
{
width
:
95%
;
width
:
95%
;
max-width
:
1160px
;
max-width
:
1160px
;
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
::v-deep
.el-dialog__header
{
::v-deep
.el-dialog__header
{
padding
:
12px
20px
20px
;
padding
:
12px
20px
20px
;
}
}
::v-deep
.el-dialog__headerbtn
{
::v-deep
.el-dialog__headerbtn
{
top
:
12px
;
top
:
12px
;
}
}
::v-deep
.el-dialog__body
{
::v-deep
.el-dialog__body
{
padding
:
0
20px
20px
;
padding
:
0
20px
20px
;
}
}
::v-deep
.form-item-select
{
::v-deep
.form-item-select
{
display
:
inline-block
;
display
:
inline-block
;
width
:
calc
(
50%
-
10px
);
width
:
calc
(
50%
-
10px
);
}
}
::v-deep
.el-cascader
{
::v-deep
.el-cascader
{
width
:
100%
;
width
:
100%
;
}
}
</
style
>
</
style
>
src/modules/customer/components/Project.vue
浏览文件 @
504f6cb1
<
template
>
<
template
>
<div
class=
"base-info"
>
<div
class=
"base-info"
>
<div
class=
"bar"
>
<div
class=
"bar"
>
<el-button
type=
"primary"
size=
"small"
>
添加合作项目
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"handleAdd"
>
添加合作项目
</el-button>
</div>
</div>
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<app-list
v-bind=
"tableOptions"
ref=
"list"
>
<!-- 操作 -->
<!-- 操作 -->
...
@@ -11,78 +11,94 @@
...
@@ -11,78 +11,94 @@
<el-button
type=
"text"
@
click=
"handleDelete(row)"
size=
"mini"
>
删除
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(row)"
size=
"mini"
>
删除
</el-button>
</
template
>
</
template
>
</template>
</template>
<CreateCoopProject
:visible
.
sync=
"isShowDialog"
@
success=
"success"
:row=
"row"
:isEdit=
"isEdit"
v-if=
"isShowDialog"
:id=
"id"
/>
</app-list>
</app-list>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
// 组件
// 组件
import
AppList
from
'@/components/base/AppList.vue'
import
CreateCoopProject
from
'../components/CreateCoopProject.vue'
import
{
getCoopList
,
delCooProject
}
from
'../api'
export
default
{
export
default
{
name
:
'Contact'
,
name
:
'Contact'
,
components
:
{
AppList
},
components
:
{
CreateCoopProject
},
data
()
{
return
{
isShowDialog
:
false
,
isEdit
:
false
,
row
:
{}
}
},
props
:
{
id
:
{
type
:
String
,
default
:
''
}
},
computed
:
{
computed
:
{
// 列表配置
// 列表配置
tableOptions
()
{
tableOptions
()
{
return
{
return
{
// remote: {
remote
:
{
// httpRequest: getRoleList,
httpRequest
:
getCoopList
,
// params: { },
params
:
{
// },
customer_id
:
this
.
id
,
data
:
[
id
:
''
{
name
:
'员工A'
,
contact
:
'产业学院'
,
contact
:
'联系人A'
,
time
:
'2021-12-12 12:12'
,
contact_time
:
'2021-12-20 12:12'
,
way
:
'上门拜访'
,
creator
:
'员工A'
,
created_time
:
'2021-12-12 12:12'
,
remark
:
'1234334'
}
}
]
,
}
,
columns
:
[
columns
:
[
// { type: 'selection', minWidth: '40px' },
{
type
:
'index'
,
label
:
'序号'
},
{
prop
:
'name'
,
label
:
'项目'
,
minWidth
:
'120px'
},
{
prop
:
'tag'
,
label
:
'项目'
,
minWidth
:
'120px'
},
{
prop
:
'project'
,
label
:
'跟进项目'
,
minWidth
:
'120px'
},
{
prop
:
'charge_persons.username'
,
label
:
'负责人'
,
minWidth
:
'120px'
},
{
prop
:
'contact'
,
label
:
'联系人'
,
minWidth
:
'120px'
},
{
prop
:
'status'
,
label
:
'项目进度'
,
minWidth
:
'120px'
},
{
prop
:
'time'
,
label
:
'更进时间'
,
minWidth
:
'120px'
},
{
prop
:
'cooperation_intention'
,
label
:
'合作意向'
,
minWidth
:
'120px'
},
{
prop
:
'contact_time'
,
label
:
'下次联络时间'
,
minWidth
:
'150px'
},
{
prop
:
'created_by.username'
,
label
:
'创建人'
,
minWidth
:
'100px'
},
{
prop
:
'way'
,
label
:
'跟进方式'
,
minWidth
:
'150px'
},
{
prop
:
'created_at'
,
label
:
'创建时间'
,
minWidth
:
'120px'
},
{
prop
:
'creator'
,
label
:
'创建人'
,
minWidth
:
'100px'
},
{
prop
:
'remark'
,
label
:
'备注'
,
minWidth
:
'140px'
},
{
prop
:
'created_time'
,
label
:
'创建时间'
,
minWidth
:
'120px'
},
{
prop
:
'remark'
,
label
:
'更进记录'
,
minWidth
:
'140px'
},
{
label
:
'操作'
,
minWidth
:
'140px'
,
slots
:
'table-operate'
}
{
label
:
'操作'
,
minWidth
:
'140px'
,
slots
:
'table-operate'
}
]
]
}
}
}
}
},
},
data
()
{
return
{
form
:
{
name
:
'北京大学继续教育学院'
,
abbr
:
'北大继教'
,
source
:
'公司资源'
,
category
:
'院校类'
,
area
:
'北京市北京市海淀区'
,
address
:
'北京市海淀区颐和园路5号'
,
remark
:
'北京大学怎么怎么样等等'
}
}
},
methods
:
{
methods
:
{
handleEdit
()
{},
success
()
{
handleDelete
()
{}
this
.
$refs
.
list
.
refetch
()
},
handleAdd
()
{
this
.
row
=
{}
this
.
isEdit
=
false
this
.
isShowDialog
=
true
},
handleEdit
(
row
)
{
this
.
row
=
row
this
.
isEdit
=
true
this
.
isShowDialog
=
true
},
handleDelete
(
row
)
{
delCooProject
({
id
:
row
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
'删除成功'
)
this
.
success
()
}
})
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.bar
{
.bar
{
padding-bottom
:
10px
;
padding-bottom
:
10px
;
}
}
.item
{
.item
{
font-size
:
16px
;
font-size
:
16px
;
line-height
:
48px
;
line-height
:
48px
;
color
:
#494949
;
color
:
#494949
;
}
}
</
style
>
</
style
>
src/modules/customer/views/Details.vue
浏览文件 @
504f6cb1
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
<el-tab-pane
label=
"联系人"
name=
"contacts"
lazy
>
<el-tab-pane
label=
"联系人"
name=
"contacts"
lazy
>
<Contact
:id=
"id"
/>
<Contact
:id=
"id"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"合作项目"
name=
"project"
>
<el-tab-pane
label=
"合作项目"
name=
"project"
lazy
>
<
project
/>
<
Project
:id=
"id"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"跟进记录"
name=
"followRecord"
>
<el-tab-pane
label=
"跟进记录"
name=
"followRecord"
>
<follow-remark
/>
<follow-remark
/>
...
...
src/modules/customer/views/Index.vue
浏览文件 @
504f6cb1
...
@@ -279,23 +279,27 @@ export default {
...
@@ -279,23 +279,27 @@ export default {
confirmButtonText
:
'删除'
,
confirmButtonText
:
'删除'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
})
this
.
fetchRemove
(
data
)
.
then
(()
=>
{
}).
catch
(()
=>
{})
this
.
fetchRemove
(
data
)
})
.
catch
(()
=>
{})
},
},
// 删除请求
// 删除请求
fetchRemove
(
data
)
{
fetchRemove
(
data
)
{
console
.
log
(
data
)
console
.
log
(
data
)
deleteCustomer
(
data
.
id
).
then
(
res
=>
{
deleteCustomer
(
data
.
id
)
if
(
res
.
code
===
0
&&
res
.
data
&&
res
.
data
.
status
)
{
.
then
(
res
=>
{
this
.
$message
.
success
(
'删除用户成功'
)
if
(
res
.
code
===
0
&&
res
.
data
&&
res
.
data
.
status
)
{
this
.
refetchList
()
this
.
$message
.
success
(
'删除用户成功'
)
}
else
{
this
.
refetchList
()
}
else
{
this
.
$message
.
error
(
'删除用户失败'
)
}
})
.
catch
(
err
=>
{
this
.
$message
.
error
(
'删除用户失败'
)
this
.
$message
.
error
(
'删除用户失败'
)
}
})
}).
catch
(
err
=>
{
this
.
$message
.
error
(
'删除用户失败'
)
})
},
},
refetchList
()
{
refetchList
()
{
this
.
$refs
.
list
.
refetch
()
this
.
$refs
.
list
.
refetch
()
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论