Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
30ae2f0a
Commit
30ae2f0a
authored
Jun 24, 2022
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.jdshangmen.com/jiedao-app/jiedao-app-operator
into dev
parents
84b09b47
222c94e1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
397 additions
and
281 deletions
+397
-281
country.js
src/api/ecw/country.js
+62
-0
customerContacts.js
src/api/ecw/customerContacts.js
+10
-1
index.vue
src/components/CustomerFollow/index.vue
+204
-0
edit.vue
src/views/ecw/customer/edit.vue
+46
-20
query.vue
src/views/ecw/customer/query.vue
+42
-245
index.vue
src/views/ecw/customerComplaint/index.vue
+33
-15
No files found.
src/api/ecw/country.js
0 → 100644
View file @
30ae2f0a
import
request
from
'
@/utils/request
'
// 创建国家区号
export
function
createCountry
(
data
)
{
return
request
({
url
:
'
/ecw/country/create
'
,
method
:
'
post
'
,
data
:
data
})
}
// 更新国家区号
export
function
updateCountry
(
data
)
{
return
request
({
url
:
'
/ecw/country/update
'
,
method
:
'
put
'
,
data
:
data
})
}
// 删除国家区号
export
function
deleteCountry
(
id
)
{
return
request
({
url
:
'
/ecw/country/delete?id=
'
+
id
,
method
:
'
delete
'
})
}
// 获得国家区号
export
function
getCountry
(
id
)
{
return
request
({
url
:
'
/ecw/country/get?id=
'
+
id
,
method
:
'
get
'
})
}
// 获得所有国家区号
export
function
getCountryListAll
()
{
return
request
({
url
:
'
/ecw/country/list-all
'
,
method
:
'
get
'
})
}
// 获得国家区号分页
export
function
getCountryPage
(
query
)
{
return
request
({
url
:
'
/ecw/country/page
'
,
method
:
'
get
'
,
params
:
query
})
}
// 导出国家区号 Excel
export
function
exportCountryExcel
(
query
)
{
return
request
({
url
:
'
/ecw/country/export-excel
'
,
method
:
'
get
'
,
params
:
query
,
responseType
:
'
blob
'
})
}
src/api/ecw/customerContacts.js
View file @
30ae2f0a
...
...
@@ -37,7 +37,7 @@ export function getCustomerContacts(id) {
// 获得客户联系人列表
export
function
getCustomerContactsList
()
{
return
request
({
url
:
'
/ecw/customer-contacts/
page
'
,
url
:
'
/ecw/customer-contacts/
list
'
,
method
:
'
get
'
})
}
...
...
@@ -60,3 +60,12 @@ export function exportCustomerContactsExcel(query) {
responseType
:
'
blob
'
})
}
// 根据客户ID获得联系人列表
export
function
getCustomerContactsListByCustomer
(
query
)
{
return
request
({
url
:
'
/ecw/customer-contacts/list-by-customer
'
,
method
:
'
get
'
,
params
:
query
})
}
src/components/CustomerFollow/index.vue
0 → 100644
View file @
30ae2f0a
<
template
>
<div>
<div
style=
"display: flex;justify-content: right;margin-bottom: 15px"
>
<el-button
type=
"primary"
style=
"text-align: right"
@
click=
"customerFollow.dialogVisible = true"
>
新增
</el-button>
</div>
<el-table
:data=
"customerFollowList"
style=
"width: 100%"
>
<el-table-column
type=
"index"
label=
"#"
>
</el-table-column>
<el-table-column
prop=
"followType"
label=
"跟进类型"
:formatter=
"(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOW_TYPE, cellValue)"
>
</el-table-column>
<el-table-column
prop=
"contactName"
label=
"联系人"
>
</el-table-column>
<el-table-column
prop=
"followMethod"
label=
"跟进方式"
:formatter=
"(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOW_METHOD, cellValue)"
>
</el-table-column>
<el-table-column
prop=
"followTime"
label=
"跟进时间"
:formatter=
"(row, column, cellValue) => parseTime(cellValue)"
>
</el-table-column>
<el-table-column
prop=
"feedback"
label=
"客户反馈"
>
</el-table-column>
<el-table-column
prop=
"result"
label=
"处理结果"
>
</el-table-column>
<el-table-column
prop=
"followUserId"
label=
"跟进业务"
:formatter=
"(row, column, cellValue) => serviceUserList.find(e => e.id === cellValue).nickname"
>
</el-table-column>
</el-table>
<el-dialog
append-to-body
title=
"客户跟进"
:visible.sync=
"customerFollow.dialogVisible"
:close-on-click-modal=
"false"
width=
"680px"
>
<el-form
ref=
"customerFollowForm"
:model=
"customerFollow.form"
label-width=
"80px"
>
<el-row
:gutter=
"10"
>
<el-col>
<el-form-item
label=
"跟进类型"
required
>
<dict-selector
form-type=
"radio"
v-model=
"customerFollow.form.followType"
:type=
"DICT_TYPE.CUSTOMER_FOLLOW_TYPE"
></dict-selector>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"跟进时间"
required
>
<el-date-picker
v-model=
"customerFollow.form.followTime"
type=
"datetime"
placeholder=
"选择跟进时间"
></el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"联系人"
required
>
<el-select
v-model=
"customerFollow.form.contactName"
placeholder=
"请选择"
>
<el-option
v-for=
"(item, index) in customerContactsList"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"跟进业务"
required
>
<el-select
v-model=
"customerFollow.form.followUserId"
placeholder=
"请选择"
>
<el-option
v-for=
"item in serviceUserList"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"跟进方式"
required
>
<dict-selector
v-model=
"customerFollow.form.followMethod"
:type=
"DICT_TYPE.CUSTOMER_FOLLOW_METHOD"
></dict-selector>
</el-form-item>
</el-col>
<el-col>
<el-form-item
label=
"客户反馈"
required
>
<el-input
type=
"textarea"
v-model=
"customerFollow.form.feedback"
></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item
label=
"处理结果"
required
>
<el-input
type=
"textarea"
v-model=
"customerFollow.form.result"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"customerFollow.dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"customerFollowSubmit"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
createCustomerFollow
,
getCustomerFollowPage
}
from
"
@/api/ecw/customerFollow
"
import
{
DICT_TYPE
,
getDictDataLabel
}
from
'
@/utils/dict
'
import
{
getCustomerContactsListByCustomer
}
from
'
@/api/ecw/customerContacts
'
import
{
listServiceUser
}
from
"
@/api/system/user
"
import
{
parseTime
}
from
'
@/utils/ruoyi
'
export
default
{
/**
* 客户跟进
* 客户投诉跟进
*/
name
:
"
CustomerFollow
"
,
props
:
{
customerId
:
Number
},
data
()
{
return
{
DICT_TYPE
,
getDictDataLabel
,
parseTime
,
customerFollowList
:
[],
serviceUserList
:
[],
customerContactsList
:
[],
customerFollow
:
{
dialogVisible
:
false
,
form
:
{}
},
}
},
created
()
{
this
.
resetCustomerFollowForm
()
if
(
!!
this
.
customerId
)
getCustomerContactsListByCustomer
({
customerId
:
this
.
customerId
}).
then
(
r
=>
{
this
.
customerContactsList
=
r
.
data
})
listServiceUser
().
then
(
r
=>
{
this
.
serviceUserList
=
r
.
data
})
this
.
getCustomerFollowList
()
},
methods
:
{
customerFollowSubmit
()
{
this
.
$refs
[
"
customerFollowForm
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
}
createCustomerFollow
(
this
.
customerFollow
.
form
).
then
(
r
=>
{
this
.
resetCustomerFollowForm
()
this
.
getCustomerFollowList
()
this
.
customerFollow
.
dialogVisible
=
false
})
})
},
resetCustomerFollowForm
()
{
this
.
customerFollow
.
form
=
{
"
bizId
"
:
this
.
customerId
,
"
contactName
"
:
undefined
,
"
feedback
"
:
undefined
,
"
followMethod
"
:
undefined
,
"
followTime
"
:
undefined
,
"
followType
"
:
undefined
,
"
followUserId
"
:
undefined
,
"
result
"
:
undefined
}
},
getCustomerFollowList
()
{
getCustomerFollowPage
({
bizId
:
this
.
customerId
}).
then
(
r
=>
{
this
.
customerFollowList
=
r
.
data
.
list
})
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/ecw/customer/edit.vue
View file @
30ae2f0a
...
...
@@ -34,10 +34,6 @@
<el-col
:span=
"12"
>
<el-form-item
label=
"客户类别"
prop=
"type"
>
<dict-selector
:type=
"DICT_TYPE.CUSTOMER_TYPE"
form-type=
"select"
multiple
v-model=
"form.type"
></dict-selector>
<!--
<el-select
v-model=
"form.type"
placeholder=
"请选择客户类别"
>
-->
<!--
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_TYPE)"
--
>
<!-- :key="dict.value" :label="dict.label" :value="dict.value" />-->
<!--
</el-select>
-->
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
...
...
@@ -51,8 +47,8 @@
<el-col
:span=
"13"
v-show=
"form.type && form.type.indexOf('3') !== -1"
>
<el-form-item
label=
"所属代理"
prop=
"agentId"
>
<el-select
v-model=
"form.agentId"
placeholder=
"请选择所属代理"
>
<el-option
v-for=
"
dict in getDictDatas(DICT_TYPE.COMMON_STATUS)
"
:key=
"
dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)
"
/>
<el-option
v-for=
"
item in serviceUserList
"
:key=
"
item.id"
:label=
"item.nickname"
:value=
"item.id
"
/>
</el-select>
</el-form-item>
</el-col>
...
...
@@ -75,7 +71,6 @@
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"主营类别"
prop=
"productType"
>
<!--
<el-cascader
:options=
"productTypeList"
:props=
"
{label: 'titleZh', value: 'id', lazy: true, lazyLoad}">
</el-cascader>
-->
<el-row
:gutter=
"10"
>
<el-col
:span=
"11"
>
<el-select
v-model=
"form.productType"
placeholder=
"请选择产品类别"
@
change=
"form.productId = ''"
>
...
...
@@ -109,8 +104,8 @@
<el-col
:span=
"12"
>
<el-form-item
label=
"跟进客服"
prop=
"customerService"
>
<el-select
v-model=
"form.customerService"
placeholder=
"请选择跟进客服"
>
<el-option
v-for=
"
dict in getDictDatas(DICT_TYPE.COMMON_STATUS)
"
:key=
"
dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)
"
/>
<el-option
v-for=
"
item in serviceUserList
"
:key=
"
item.id"
:label=
"item.nickname"
:value=
"item.id
"
/>
</el-select>
</el-form-item>
</el-col>
...
...
@@ -122,7 +117,7 @@
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户状态"
prop=
"status"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择客户状态"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择客户状态"
disabled
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
...
...
@@ -248,9 +243,9 @@
区号
<span
style=
"color: #ff0000"
>
*
</span>
</
template
>
<
template
v-slot=
"{row}"
>
<el-select
v-model=
"row.areaCode"
placeholder=
"请选择区号"
>
<el-option
v-for=
"
dict in getDictDatas(DICT_TYPE.AREA_CODE)
"
:key=
"
dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)
"
/>
<el-select
v-model=
"row.areaCode"
placeholder=
"请选择区号"
filterable
>
<el-option
v-for=
"
(item, index) in countryList
"
:key=
"
index"
:label=
"item.nameShort + item.nameZh + '(' + item.tel + ')'"
:value=
"item.tel
"
/>
</el-select>
</
template
>
</el-table-column>
...
...
@@ -384,6 +379,9 @@ import {getWarehouseList} from "@/api/ecw/warehouse"
import
CustomerLineTable
from
'
@/components/CustomerLineTable
'
import
{
getCustomerSelect
}
from
"
@/api/ecw/customer
"
import
{
listServiceUser
}
from
"
@/api/system/user
"
import
{
getZhongPaoPage
}
from
'
@/api/ecw/zhongPao
'
import
{
getCustomerContactsListByCustomer
}
from
'
@/api/ecw/customerContacts
'
import
{
getCountryListAll
}
from
'
@/api/ecw/country
'
export
default
{
name
:
"
edit
"
,
...
...
@@ -396,8 +394,13 @@ export default {
},
created
()
{
this
.
reset
()
if
(
this
.
customerId
!==
'
0
'
)
this
.
getCustomer
(
this
.
customerId
)
if
(
this
.
customerId
!==
'
0
'
)
{
this
.
getCustomer
(
this
.
customerId
).
then
(()
=>
{
getCustomerContactsListByCustomer
({
customerId
:
this
.
customerId
}).
then
(
r
=>
{
this
.
form
.
customerContacts
=
r
.
data
})
})
}
getNodeList
().
then
(
r
=>
{
this
.
nodeList
=
r
.
data
...
...
@@ -420,6 +423,11 @@ export default {
listServiceUser
().
then
(
r
=>
{
this
.
serviceUserList
=
r
.
data
})
getCountryListAll
().
then
(
r
=>
{
this
.
countryList
=
r
.
data
})
this
.
getZhongPao
()
},
data
(){
return
{
...
...
@@ -452,11 +460,13 @@ export default {
importCityList
:
[],
// 进口地址
customerSelect
:
[],
serviceUserList
:
[],
countryList
:
[],
zhongLines
:
[],
// 重货线路
paoLines
:
[],
// 泡货线路
}
},
methods
:
{
/** 取消按钮 */
cancel
()
{
...
...
@@ -471,10 +481,14 @@ export default {
}
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
this
.
form
.
customerContacts
.
forEach
(
e
=>
{
e
.
customerId
=
this
.
customerId
})
updateCustomer
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
//
this.getList();
});
return
;
}
...
...
@@ -482,7 +496,7 @@ export default {
createCustomer
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
//
this.getList();
});
});
},
...
...
@@ -511,7 +525,7 @@ export default {
customerLines
:
[],
lightUnit
:
undefined
,
promoter
:
undefined
,
status
:
undefined
,
status
:
1
,
founder
:
this
.
$store
.
getters
.
userId
,
department
:
undefined
,
invoiceTitle
:
undefined
,
...
...
@@ -530,8 +544,8 @@ export default {
this
.
resetForm
(
"
form
"
);
},
getCustomer
(
id
)
{
getCustomer
(
id
).
then
(
response
=>
{
this
.
form
=
{
...
this
.
form
,
...
response
.
data
};
return
getCustomer
(
id
).
then
(
response
=>
{
this
.
form
=
{
...
this
.
form
,
...
response
.
data
,
id
:
this
.
customerId
};
this
.
open
=
true
;
this
.
title
=
"
修改客户
"
;
});
...
...
@@ -561,6 +575,18 @@ export default {
// "userid": 0,
// "username": ""
})
},
getZhongPao
(){
// todo 接口不对,应该用list
getZhongPaoPage
().
then
(
r
=>
{
r
.
data
.
list
.
forEach
(
e
=>
{
if
(
e
.
type
===
1
)
{
this
.
form
.
lightUnit
=
e
.
edge
}
else
if
(
e
.
type
===
2
||
true
){
// todo 缺少type
this
.
form
.
weightUnit
=
e
.
edge
}
})
})
}
},
computed
:
{
...
...
src/views/ecw/customer/query.vue
View file @
30ae2f0a
...
...
@@ -6,10 +6,10 @@
<h2>
查看
</h2>
<div>
<el-button
type=
"primary"
size=
"small"
>
添加优惠
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"$router.push('/customer/edit/' +
customerI
d)"
>
编辑
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"$router.push('/customer/edit/' +
i
d)"
>
编辑
</el-button>
<el-button
type=
"primary"
size=
"small"
>
报价
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"customerFollow.dialogVisible = true"
>
跟进
</el-button>
<el-button
type=
"primary"
size=
"small"
>
客诉
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"
$refs['customerFollow'].
customerFollow.dialogVisible = true"
>
跟进
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"$refs['customerComplaint'].handleAdd()"
>
客诉
</el-button>
<el-button
type=
"danger"
size=
"small"
>
删除
</el-button>
</div>
</div>
...
...
@@ -18,23 +18,23 @@
<el-descriptions-item
label=
"客户编号"
>
{{
customer
.
number
}}
</el-descriptions-item>
<el-descriptions-item
label=
"客户名称"
>
{{
customer
.
name
}}
</el-descriptions-item>
<el-descriptions-item
label=
"结算方式"
>
{{
getDictDataLabel
(
DICT_TYPE
.
CUSTOMER_BALANCE
,
customer
.
balance
)
}}
</el-descriptions-item>
<el-descriptions-item
label=
"客户生日"
>
{{
customer
.
birthday
}}
</el-descriptions-item>
<el-descriptions-item
label=
"客户生日"
>
{{
parseTime
(
customer
.
birthday
,
'
{y
}
-{m
}
-{d
}
'
)
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
客户等级
"
>
{{
getDictDataLabel
(
DICT_TYPE
.
CUSTOMER_LEVEL
,
customer
.
level
)
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
国家
"
>
{{
getDictDataLabel
(
DICT_TYPE
.
COUNTRY
,
customer
.
country
)
}}
<
/el-descriptions-item
>
<!--
<
el
-
descriptions
-
item
label
=
"
业务员
"
>
{{
customer
}}
<
/el-descriptions-item>--
>
<
el
-
descriptions
-
item
label
=
"
客户来源
"
>
{{
getDictDataLabel
(
DICT_TYPE
.
CUSTOMER_SOURCE
,
customer
.
source
)
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
客户类别
"
>
{{
getDictDataLabel
(
DICT_TYPE
.
CUSTOMER_TYPE
,
customer
.
type
)
}}
<
/el-descriptions-item
>
<!--
<
el
-
descriptions
-
item
label
=
"
联系方式
"
>
{{
customer
}}
<
/el-descriptions-item>--
>
<el-descriptions-item
label=
"推介人"
>
{{
customer
.
promoter
}}
</el-descriptions-item>
<el-descriptions-item
label=
"跟进客服"
>
{{
customer
.
customer
Service
}}
</el-descriptions-item>
<
el
-
descriptions
-
item
label
=
"
推介人
"
>
{{
promoter
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
跟进客服
"
>
{{
customerService
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
公司名称
"
>
{{
customer
.
company
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
联系地址
"
>
{{
customer
.
address
}}
<
/el-descriptions-item
>
<el-descriptions-item
label=
"创建时间"
>
{{
customer
.
createTime
}}
</el-descriptions-item>
<
el
-
descriptions
-
item
label
=
"
创建时间
"
>
{{
parseTime
(
customer
.
createTime
)
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
状态
"
>
{{
getDictDataLabel
(
DICT_TYPE
.
CUSTOMER_STATUS
,
customer
.
status
)
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
主营类别
"
>
{{
productType
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
常提货网点
"
>
{{
pickupPoint
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
图片
"
>
<el-image
:src=
"customer.picture"
style=
"width: 100px;height: 100px"
></el-image>
<
el
-
image
v
-
show
=
"
!!customer.picture
"
:
src
=
"
customer.picture
"
style
=
"
width: 100px;height: 100px
"
><
/el-image
>
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
备注
"
>
{{
customer
.
remarks
}}
<
/el-descriptions-item
>
<!--
<
el
-
descriptions
-
item
label
=
"
信用等级
"
>
{{
customer
}}
<
/el-descriptions-item>--
>
...
...
@@ -45,7 +45,7 @@
<
h3
>
联系人
<
/h3
>
<
el
-
table
:data=
"customer
.customer
Contacts"
:
data
=
"
customerContacts
"
style
=
"
width: 100%
"
border
>
...
...
@@ -68,6 +68,9 @@
prop
=
"
phoneNew
"
label
=
"
联系方式
"
>
<
template
v
-
slot
=
"
{row
}
"
>
{{
row
.
areaCode
+
row
.
phoneNew
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
username
"
...
...
@@ -144,127 +147,10 @@
<
/el-table
>
<
/el-tab-pane
>
<
el
-
tab
-
pane
label
=
"
跟进
"
>
<el-table
:data=
"customerFollowList"
style=
"width: 100%"
>
<el-table-column
prop=
""
label=
"#"
>
</el-table-column>
<el-table-column
prop=
"followType"
label=
"跟进类型"
>
</el-table-column>
<el-table-column
prop=
"contactName"
label=
"联系人"
>
</el-table-column>
<el-table-column
prop=
"followMethod"
label=
"跟进方式"
>
</el-table-column>
<el-table-column
prop=
"followTime"
label=
"跟进时间"
>
</el-table-column>
<el-table-column
prop=
"feedback"
label=
"客户反馈"
>
</el-table-column>
<el-table-column
prop=
"result"
label=
"处理结果"
>
</el-table-column>
<el-table-column
prop=
"followUserId"
label=
"跟进业务"
>
</el-table-column>
</el-table>
<
customer
-
follow
ref
=
"
customerFollow
"
:
customer
-
id
=
"
id
"
><
/customer-follow
>
<
/el-tab-pane
>
<
el
-
tab
-
pane
label
=
"
客户投诉
"
>
<el-table
:data=
"[]"
style=
"width: 100%"
>
<el-table-column
prop=
""
label=
"序号"
>
</el-table-column>
<el-table-column
prop=
""
label=
"投诉编号"
>
</el-table-column>
<el-table-column
prop=
""
label=
"投诉类型"
>
</el-table-column>
<el-table-column
prop=
""
label=
"投诉时间"
>
</el-table-column>
<el-table-column
prop=
""
label=
"投诉内容"
>
</el-table-column>
<el-table-column
prop=
""
label=
"登记客服"
>
</el-table-column>
<el-table-column
prop=
""
label=
"提单号"
>
</el-table-column>
<el-table-column
prop=
""
label=
"状态"
>
</el-table-column>
<el-table-column
prop=
""
label=
"查明原因"
>
</el-table-column>
<el-table-column
prop=
""
label=
"处理时间"
>
</el-table-column>
<el-table-column
prop=
""
label=
"处理结果"
>
</el-table-column>
<el-table-column
prop=
""
label=
"赔偿金额"
>
</el-table-column>
<el-table-column
prop=
""
label=
"操作"
>
<template
v-slot=
"
{row}">
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
""
v-hasPermi=
"['ecw:customer:query']"
>
编辑
</el-button>
</
template
>
</el-table-column>
</el-table>
<
customer
-
complaint
ref
=
"
customerComplaint
"
:
customer
-
id
=
"
id
"
hidden
-
search
><
/customer-complaint
>
<
/el-tab-pane
>
<
el
-
tab
-
pane
label
=
"
账单
"
>
...
...
@@ -285,82 +171,20 @@
<
/el-col
>
<
/el-row
>
<el-dialog
title=
"客户跟进"
:visible.sync=
"customerFollow.dialogVisible"
:close-on-click-modal=
"false"
width=
"680px"
>
<el-form
ref=
"customerFollowForm"
:model=
"customerFollow.form"
label-width=
"80px"
>
<el-row
:gutter=
"10"
>
<el-col>
<el-form-item
label=
"跟进类型"
required
>
<dict-selector
form-type=
"radio"
v-model=
"customerFollow.form.followType"
:type=
"DICT_TYPE.CUSTOMER_FOLLOW_TYPE"
></dict-selector>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"跟进时间"
required
>
<el-date-picker
v-model=
"customerFollow.form.followTime"
type=
"datetime"
placeholder=
"选择跟进时间"
></el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"联系人"
required
>
<el-select
v-model=
"customerFollow.form.contactName"
placeholder=
"请选择"
>
<el-option
v-for=
"item in customerContactsList"
:key=
"item.name"
:label=
"item.name"
:value=
"item.name"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"跟进业务"
required
>
<el-select
v-model=
"customerFollow.form.followUserId"
placeholder=
"请选择"
>
<el-option
v-for=
"item in serviceUserList"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"跟进方式"
required
>
<dict-selector
v-model=
"customerFollow.form.followMethod"
:type=
"DICT_TYPE.CUSTOMER_FOLLOW_METHOD"
></dict-selector>
</el-form-item>
</el-col>
<el-col>
<el-form-item
label=
"客户反馈"
required
>
<el-input
type=
"textarea"
v-model=
"customerFollow.form.feedback"
></el-input>
</el-form-item>
</el-col>
<el-col>
<el-form-item
label=
"处理结果"
required
>
<el-input
type=
"textarea"
v-model=
"customerFollow.form.result"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"customerFollow.dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"customerFollowSubmit"
>
确 定
</el-button>
</span>
</el-dialog>
<
/div
>
<
/template
>
<
script
>
import
{
getCustomer
}
from
'
@/api/ecw/customer
'
import
{
getCustomer
,
getCustomerSelect
}
from
'
@/api/ecw/customer
'
import
{
DICT_TYPE
,
getDictDataLabel
}
from
'
@/utils/dict
'
import
{
getProductTypeList
}
from
'
@/api/ecw/productType
'
import
{
getNodeList
}
from
'
@/api/ecw/node
'
import
DictSelector
from
"
@/components/DictSelector
"
import
{
getCustomerContactsList
}
from
"
@/api/ecw/customerContacts
"
import
{
listServiceUser
}
from
"
@/api/system/user
"
import
{
createCustomerFollow
,
getCustomerFollowPage
}
from
"
@/api/ecw/customerFollow
"
import
CustomerFollow
from
"
@/components/CustomerFollow
"
import
{
parseTime
}
from
'
@/utils/ruoyi
'
import
CustomerComplaint
from
'
@/views/ecw/customerComplaint
'
import
{
listServiceUser
}
from
'
@/api/system/user
'
import
{
getCustomerContactsListByCustomer
}
from
'
@/api/ecw/customerContacts
'
export
default
{
name
:
'
query
'
,
...
...
@@ -368,38 +192,42 @@ export default {
customerId
:
String
}
,
components
:
{
DictSelector
DictSelector
,
CustomerFollow
,
CustomerComplaint
}
,
created
()
{
getNodeList
().
then
(
r
=>
{
this
.
nodeList
=
r
.
data
}
)
getCustomer
(
this
.
customerI
d
).
then
(
response
=>
{
getCustomer
(
this
.
i
d
).
then
(
response
=>
{
this
.
customer
=
{
...
this
.
customer
,
...
response
.
data
}
getCustomerContactsListByCustomer
({
customerId
:
this
.
id
}
).
then
(
r
=>
{
this
.
customerContacts
=
r
.
data
}
)
}
)
getProductTypeList
().
then
(
r
=>
{
this
.
productTypeList
=
r
.
data
}
)
this
.
resetCustomerFollowForm
()
getCustomerContactsList
().
then
(
r
=>
{
// todo 接口不对,分页了
this
.
customerContactsList
=
r
.
data
.
list
getCustomerSelect
().
then
(
r
=>
{
this
.
customerSelect
=
r
.
data
}
)
listServiceUser
().
then
(
r
=>
{
this
.
serviceUserList
=
r
.
data
}
)
this
.
getCustomerFollowList
()
}
,
data
()
{
return
{
DICT_TYPE
,
getDictDataLabel
,
parseTime
,
nodeList
:
[],
productTypeList
:
[],
customer
ContactsLis
t
:
[],
customer
Selec
t
:
[],
serviceUserList
:
[],
customer
FollowList
:
[],
customer
Contacts
:
[],
customer
:
{
id
:
undefined
,
number
:
undefined
,
...
...
@@ -419,7 +247,6 @@ export default {
source
:
undefined
,
picture
:
undefined
,
customerService
:
undefined
,
customerContacts
:
[],
customerLines
:
[],
promoter
:
undefined
,
status
:
undefined
,
...
...
@@ -438,45 +265,6 @@ export default {
weightUnit
:
undefined
,
createTime
:
undefined
}
,
customerFollow
:
{
dialogVisible
:
true
,
form
:
{}
},
}
},
methods
:
{
customerFollowSubmit
()
{
this
.
$refs
[
"
customerFollowForm
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
}
createCustomerFollow
(
this
.
customerFollow
.
form
).
then
(
r
=>
{
this
.
resetCustomerFollowForm
()
this
.
getCustomerFollowList
()
this
.
customerFollow
.
dialogVisible
=
false
})
})
},
resetCustomerFollowForm
()
{
this
.
customerFollow
.
form
=
{
"
bizId
"
:
this
.
customerId
,
"
contactName
"
:
undefined
,
"
feedback
"
:
undefined
,
"
followMethod
"
:
undefined
,
"
followTime
"
:
undefined
,
"
followType
"
:
undefined
,
"
followUserId
"
:
undefined
,
"
result
"
:
undefined
}
},
getCustomerFollowList
()
{
getCustomerFollowPage
({
bizId
:
this
.
customerId
}).
then
(
r
=>
{
this
.
customerFollowList
=
r
.
data
.
list
})
}
}
,
computed
:
{
...
...
@@ -487,6 +275,15 @@ export default {
pickupPoint
(){
const
pickupPoint
=
this
.
nodeList
.
find
(
p
=>
p
.
id
===
parseInt
(
this
.
customer
.
pickupPoint
))
return
pickupPoint
?
pickupPoint
.
titleZh
:
''
}
,
promoter
()
{
return
this
.
customerSelect
.
find
(
e
=>
e
.
id
===
this
.
customer
.
promoter
)?.
name
||
''
}
,
customerService
()
{
return
this
.
serviceUserList
.
find
(
e
=>
e
.
id
===
this
.
customer
.
customerService
)?.
nickname
||
''
}
,
id
()
{
return
this
.
customerId
?
parseInt
(
this
.
customerId
)
:
undefined
}
}
}
...
...
src/views/ecw/customerComplaint/index.vue
View file @
30ae2f0a
...
...
@@ -2,7 +2,7 @@
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch
&& !!!customerId
"
label-width=
"68px"
>
<el-form-item
label=
"客户名称"
prop=
"customerId"
>
<el-select
v-model=
"queryParams.customerId"
placeholder=
"请选择客户名称"
clearable
size=
"small"
>
<el-option
v-for=
"customer in myFollowCustomerList"
:key=
"customer.id"
:value=
"customer.id"
...
...
@@ -41,7 +41,7 @@
</el-form>
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
:gutter=
"10"
v-show=
"!!!customerId"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['ecw:customer-complaint:create']"
>
新增
</el-button>
...
...
@@ -92,16 +92,20 @@
@
pagination=
"getList"
/>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"
5
00px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"
9
00px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"客户名称"
prop=
"customerId"
>
<el-select
v-model=
"form.customerId"
placeholder=
"请选择客户名称"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
<el-select
v-model=
"form.customerId"
placeholder=
"请选择客户名称"
:disabled=
"!!customerId"
>
<el-option
v-for=
"item in customerSelect"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"投诉类型"
prop=
"type"
>
<el-select
v-model=
"form.type"
placeholder=
"请选择投诉类型"
>
<el-option
v-for=
"dict in
this.
getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_TYPE)"
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
...
...
@@ -116,11 +120,14 @@
</el-form-item>
<el-form-item
label=
"处理状态"
prop=
"status"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择处理状态"
>
<el-option
v-for=
"dict in
this.
getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_STATUS)"
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_COMPLAINT_STATUS)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-form>
<customer-follow
:customer-id=
"form.id"
></customer-follow>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
...
...
@@ -131,11 +138,20 @@
<
script
>
import
{
createCustomerComplaint
,
updateCustomerComplaint
,
deleteCustomerComplaint
,
getCustomerComplaint
,
getCustomerComplaintPage
,
exportCustomerComplaintExcel
}
from
"
@/api/ecw/customerComplaint
"
;
import
{
getMyFlowCustomerList
}
from
"
@/api/ecw/customer
"
;
import
{
getCustomerSelect
}
from
'
@/api/ecw/customer
'
import
CustomerFollow
from
"
../../../components/CustomerFollow
"
export
default
{
name
:
"
CustomerComplaint
"
,
/**
* 可以单独作为页面,也可以作为组件被被客户详情页调用。
* 作为组件时要传入 customerId,用于限制范围和隐藏搜索筛选
*/
props
:
{
customerId
:
Number
},
components
:
{
CustomerFollow
},
data
()
{
return
{
...
...
@@ -158,7 +174,7 @@ export default {
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
customerId
:
null
,
customerId
:
this
.
customerId
,
type
:
null
,
orderId
:
null
,
ladingbillId
:
null
,
...
...
@@ -173,14 +189,16 @@ export default {
customerId
:
[{
required
:
true
,
message
:
"
客户名称不能为空
"
,
trigger
:
"
change
"
}],
},
myFollowCustomerList
:
[]
myFollowCustomerList
:
[],
customerSelect
:
[]
};
},
created
()
{
this
.
getList
();
// 获得邮件账号
get
MyFlowCustomerList
().
then
(
response
=>
{
this
.
myFollowCustomerList
=
response
.
data
;
get
CustomerSelect
().
then
(
r
=>
{
this
.
customerSelect
=
r
.
data
})
},
methods
:
{
...
...
@@ -206,7 +224,7 @@ export default {
reset
()
{
this
.
form
=
{
id
:
undefined
,
customerId
:
undefine
d
,
customerId
:
this
.
customerI
d
,
type
:
undefined
,
orderId
:
undefined
,
ladingbillId
:
undefined
,
...
...
@@ -293,7 +311,7 @@ export default {
},
/** 格式化邮件账号 */
formatCustomerName
(
customerId
)
{
for
(
const
customer
of
this
.
myFollowCustomerLis
t
)
{
for
(
const
customer
of
this
.
customerSelec
t
)
{
if
(
customer
.
id
===
customerId
)
{
return
customer
.
name
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment