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
72057481
Commit
72057481
authored
Sep 05, 2024
by
yujinyao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户跟进2
parent
2011369e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
547 additions
and
362 deletions
+547
-362
customerFollow.js
src/api/ecw/customerFollow.js
+8
-0
customerFollow.vue
src/views/ecw/customer/components/customerFollow.vue
+256
-356
customerFollowSelectOffer.vue
...ews/ecw/customer/components/customerFollowSelectOffer.vue
+147
-0
query.vue
src/views/ecw/customer/query.vue
+136
-6
No files found.
src/api/ecw/customerFollow.js
View file @
72057481
...
...
@@ -84,3 +84,11 @@ export function addCustomerFollow(data) {
})
}
export
function
editCustomerFollow
(
data
)
{
return
request
({
url
:
'
/customer/followup/update
'
,
method
:
'
put
'
,
data
})
}
src/views/ecw/customer/components/customerFollow.vue
View file @
72057481
<
template
>
<div>
<div
style=
"display: flex;justify-content: right;margin-bottom: 15px"
>
<el-button
type=
"primary"
style=
"text-align: right"
@
click=
"customerFollow.dialogVisible = true"
>
{{
$t
(
'
新增
'
)
}}
</el-button>
</div>
<el-table
:data=
"customerFollowList"
style=
"width: 100%"
>
<el-table-column
prop=
"number"
:label=
"$t('编号')"
>
</el-table-column>
<el-table-column
prop=
"followType"
:label=
"$t('跟进类型')"
:formatter=
"(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_TYPE, cellValue)"
>
</el-table-column>
<el-table-column
prop=
"contactName"
:label=
"$t('联系人')"
>
</el-table-column>
<el-table-column
prop=
"followMethod"
:label=
"$t('跟进方式')"
:formatter=
"(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD, cellValue)"
>
</el-table-column>
<el-table-column
prop=
"followTime"
:label=
"$t('跟进时间')"
:formatter=
"(row, column, cellValue) => parseTime(cellValue)"
>
</el-table-column>
<el-table-column
prop=
"feedback"
:label=
"$t('客户反馈')"
>
</el-table-column>
<el-table-column
prop=
"result"
:label=
"$t('处理结果')"
>
</el-table-column>
<el-table-column
prop=
"followUserName"
:label=
"$t('客户经理')"
>
</el-table-column>
<el-table-column
:label=
"$t('跟进时间')"
align=
"center"
>
<template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
followTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('下次跟进时间')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
nextTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"200px"
:label=
"$t('操作')"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:customer:follow-update']"
>
{{
$t
(
"
编辑
"
)
}}
</el-button
>
<el-button
size=
"mini"
v-has-permi=
"['ecw:customer:follow-add-plan']"
type=
"text"
icon=
"el-icon-collection"
@
click=
"addPlan(scope.row)"
>
{{
$t
(
"
增加计划
"
)
}}
</el-button
>
</
template
>
</el-table-column>
</el-table>
<pagination
:total=
"total"
:page.sync=
"pageNo"
:limit.sync=
"pageSize"
@
pagination=
"getCustomerFollowList"
/>
<el-dialog
append-to-body
:title=
"$t('客户跟进')"
:visible.sync=
"customerFollow.dialogVisible"
:close-on-click-modal=
"false"
:before-close=
"customerFollowClose"
width=
"900px"
>
<div
class=
"customer-follow"
>
<el-dialog
append-to-body
:title=
"$t('客户跟进')"
:visible.sync=
"customerFollow.dialogVisible"
:before-close=
"customerFollowClose"
width=
"900px"
>
<el-form
ref=
"customerFollowForm"
:model=
"form"
label-width=
"120px"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('编号')"
prop=
"number"
>
<el-input
v-model=
"form.number"
:placeholder=
"$t('请输入编号')"
disabled
/>
<el-input
v-model=
"form.number"
:placeholder=
"$t('请输入编号')"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('跟进状态')"
>
<el-select
v-model=
"form.status"
:placeholder=
"$t('请选择')"
disabled
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_STATUS)"
:key=
"dict.value"
:label=
"isChinese ? dict.label : dict.labelEn"
:value=
"parseInt(dict.value)"
/>
<el-select
v-model=
"form.status"
:placeholder=
"$t('请选择')"
disabled
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_STATUS)"
:key=
"dict.value"
:label=
"isChinese ? dict.label : dict.labelEn"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('客户编号')"
>
<el-input
v-model=
"form.customerId"
:placeholder=
"$t('请输入客户编号')"
disabled
/>
<el-input
v-model=
"form.customerId"
:placeholder=
"$t('请输入客户编号')"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('跟进类型')"
required
>
<el-select
v-model=
"form.followType"
:placeholder=
"$t('请选择')"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_TYPE)"
:key=
"dict.value"
:label=
"isChinese ? dict.label : dict.labelEn"
:value=
"parseInt(dict.value)"
/>
<el-select
v-model=
"form.followType"
:placeholder=
"$t('请选择')"
@
change=
"handleFollowType"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_TYPE)"
:key=
"dict.value"
:label=
"isChinese ? dict.label : dict.labelEn"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"13"
v-if=
"form.followType == '2'"
>
<el-form-item
:label=
"$t('报价单')"
>
<el-input
v-model=
"form.offerId"
:placeholder=
"$t('请输入报价单')"
disabled
/>
<el-input
v-model=
"form.offerId"
:placeholder=
"$t('请输入报价单')"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('跟进时间')"
required
>
<el-date-picker
v-model=
"form.followTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
format=
"yyyy-MM-dd HH:mm:ss"
type=
"datetime"
:placeholder=
"$t('选择跟进时间
')"
></el-date-picker>
<el-date-picker
v-model=
"form.followTime"
type=
"datetime"
format=
"yyyy-MM-dd HH:mm:ss"
:placeholder=
"$t('请选择
')"
></el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('联系人')"
required
>
<el-select
v-model=
"form.contactName"
:placeholder=
"$t('请选择')"
>
<el-option
v-for=
"(item, index) in customerContactsList"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
>
<el-option
v-for=
"(item, index) in customerContactsList"
:key=
"index"
:label=
"item.name"
:value=
"item.name"
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -171,11 +48,7 @@
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('客户经理')"
required
>
<el-select
v-model=
"form.followUserId"
:placeholder=
"$t('请选择')"
>
<el-option
v-for=
"item in serviceUserList"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.id"
>
<el-option
v-for=
"item in serviceUserList"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -187,57 +60,29 @@
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('上一级跟进单')"
prop=
"parentNumber"
>
<el-input
v-model=
"form.parentNumber"
:placeholder=
"$t('请输入上一级跟进单')"
/>
<el-input
v-model=
"form.parentNumber"
:placeholder=
"$t('请输入上一级跟进单')"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('跟进结果')"
prop=
"followMethod"
>
<el-select
v-model=
"form.resultType"
:placeholder=
"$t('请选择')"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_RESULT_TYPE)"
:key=
"dict.value"
:label=
"isChinese ? dict.label : dict.labelEn"
:value=
"parseInt(dict.value)"
/>
<el-select
v-model=
"form.resultType"
:placeholder=
"$t('请选择')"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_RESULT_TYPE)"
:key=
"dict.value"
:label=
"isChinese ? dict.label : dict.labelEn"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('目的')"
prop=
"purpose"
>
<el-input
type=
"textarea"
:rows=
"2"
v-model=
"form.purpose"
:placeholder=
"$t('请输入目的')"
maxlength=
"200"
show-word-limit
/>
<el-input
type=
"textarea"
:rows=
"2"
v-model=
"form.purpose"
:placeholder=
"$t('请输入目的')"
maxlength=
"200"
show-word-limit
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('下一步计划')"
prop=
"nextPlan"
>
<el-input
type=
"textarea"
:rows=
"2"
v-model=
"form.nextPlan"
:placeholder=
"$t('请输入下一步计划')"
/>
<el-input
type=
"textarea"
:rows=
"2"
v-model=
"form.nextPlan"
:placeholder=
"$t('请输入下一步计划')"
/>
</el-form-item>
</el-col>
<el-col
:span=
"20"
v-show=
"false
"
>
<el-col
:span=
"20
"
>
<el-form-item
:label=
"$t('跟进情况')"
>
<div
class=
"follow-deal"
>
【客户反馈:】
<br
/>
{{ form.feedback }}
<br
/>
【处理结果:】
<br
/>
{{ form.result }}
</div>
<el-input
rows=
"3"
class=
"text_style"
type=
"textarea"
placeholder=
"【客户反馈:】
<br>
价格高先不出货\n【处理结果:】\n下次联系" v-model="form.feedback" maxlength="500" show-word-limit />
</el-form-item>
</el-col>
<el-col
:span=
"20"
>
...
...
@@ -247,62 +92,35 @@
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('下次跟进时间')"
>
<el-date-picker
v-model=
"form.nextTime"
type=
"datetime"
value-format=
"timestamp"
:placeholder=
"$t('请选择')"
:picker-options=
"pickerOptions"
>
<el-date-picker
v-model=
"form.nextTime"
type=
"datetime"
format=
"yyyy-MM-dd HH:mm:ss"
:placeholder=
"$t('请选择')"
:picker-options=
"pickerOptions"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('创建人')"
prop=
"founder"
>
<el-select
v-model=
"form.founder"
disabled
>
<el-option
v-for=
"item in allSimplList"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.id"
>
<el-select
v-model=
"form.creatorName"
disabled
>
<el-option
v-for=
"item in allSimplList"
: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=
"$t('创建时间')"
prop=
"createTime"
>
<el-date-picker
v-model=
"form.createTime"
type=
"datetime"
value-format=
"timestamp"
disabled
:placeholder=
"$t('选择创建时间')"
>
<el-date-picker
v-model=
"form.createTime"
type=
"datetime"
value-format=
"timestamp"
disabled
:placeholder=
"$t('选择创建时间')"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('最后更新人')"
>
<el-select
v-model=
"form.updater"
disabled
>
<el-option
v-for=
"item in allSimplList"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.id"
>
<el-select
v-model=
"form.updaterName"
disabled
>
<el-option
v-for=
"item in allSimplList"
: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=
"$t('最后更新时间')"
>
<el-date-picker
v-model=
"form.updateTime"
type=
"datetime"
value-format=
"timestamp"
disabled
>
<el-date-picker
v-model=
"form.updateTime"
type=
"datetime"
value-format=
"timestamp"
disabled
>
</el-date-picker>
</el-form-item>
</el-col>
...
...
@@ -311,22 +129,41 @@
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"warning"
@
click=
"goBack"
>
{{
$t
(
'
返 回
'
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"customerFollowSubmit(0)"
>
{{
$t
(
'
保 存
'
)
}}
</el-button>
<el-button
type=
"success"
@
click=
"customerFollowSubmit(1)
"
>
{{$t('提交结果')}}
</el-button>
<el-button
type=
"success"
@
click=
"customerFollowSubmit(1)"
v-if=
"!isEdit
"
>
{{
$t
(
'
提交结果
'
)
}}
</el-button>
</div>
</el-dialog>
</div>
<customer-follow-select-offer
ref=
"customerFollowSelectOffer"
@
select=
"selectOffer"
/>
</div>
</
template
>
<
script
>
import
{
createCustomerFollow
,
getCustomerFollowPage
,
getCustomerFollowPage2
,
addCustomerFollow
,
getCustomerFollowList
}
from
"
@/api/ecw/customerFollow
"
import
{
DICT_TYPE
,
getDictDataLabel
}
from
'
@/utils/dict
'
import
{
getCustomerContactsListByCustomer
}
from
'
@/api/ecw/customerContacts
'
import
{
createCustomerFollow
,
getCustomerFollowPage
,
getCustomerFollowPage2
,
addCustomerFollow
,
getCustomerFollowList
,
editCustomerFollow
}
from
"
@/api/ecw/customerFollow
"
import
{
getOfferPage
}
from
"
@/api/ecw/offer
"
import
CustomerFollowSelectOffer
from
"
./customerFollowSelectOffer
"
;
import
{
DICT_TYPE
,
getDictDataLabel
}
from
'
@/utils/dict
'
import
{
getCustomerContactsListByCustomer
}
from
'
@/api/ecw/customerContacts
'
import
{
listAllSimpl
,
listServiceUser
,
listSimpleUsers
,
}
from
"
@/api/system/user
"
;
import
{
parseTime
}
from
'
@/utils/ruoyi
'
import
{
parseTime
}
from
'
@/utils/ruoyi
'
import
FileUpload
from
"
@/components/FileUpload
"
;
export
default
{
/**
...
...
@@ -340,15 +177,18 @@ export default {
*/
id
:
Number
,
customerId
:
Number
,
customerQuery
:{
type
:
Boolean
,
default
:
false
customerQuery
:
{
type
:
Boolean
,
default
:
false
}
},
components
:
{
FileUpload
},
components
:
{
FileUpload
,
CustomerFollowSelectOffer
},
data
()
{
return
{
fileType
:
[
"
doc
"
,
"
xls
"
,
"
ppt
"
,
"
txt
"
,
"
pdf
"
,
"
png
"
,
"
jpg
"
,
"
jpeg
"
],
fileType
:
[
"
doc
"
,
"
xls
"
,
"
ppt
"
,
"
txt
"
,
"
pdf
"
,
"
png
"
,
"
jpg
"
,
"
jpeg
"
],
DICT_TYPE
,
getDictDataLabel
,
parseTime
,
...
...
@@ -359,29 +199,42 @@ export default {
customerFollow
:
{
dialogVisible
:
false
,
form
:
{
followType
:
'
3
'
followType
:
'
3
'
}
},
offerDialogVisible
:
true
,
form
:
{},
pageNo
:
1
,
pageSize
:
10
,
total
:
10
,
pageNo
:
1
,
pageSize
:
10
,
total
:
10
,
allSimplList
:
[],
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
<
Date
.
now
()
}
}
},
isEdit
:
false
,
queryParams
:
{},
followTime
:
[],
nextTime
:
[],
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
},
offerList
:
[],
offerTotal
:
0
}
},
computed
:
{
isChinese
(){
isChinese
()
{
return
this
.
$i18n
.
locale
===
'
zh_CN
'
}
},
created
()
{
// this.resetCustomerFollowForm()
if
(
!!
this
.
customerId
)
getCustomerContactsListByCustomer
({
customerId
:
this
.
customerId
}).
then
(
r
=>
{
if
(
!!
this
.
customerId
)
getCustomerContactsListByCustomer
({
customerId
:
this
.
customerId
}).
then
(
r
=>
{
this
.
customerContactsList
=
r
.
data
this
.
form
.
customerId
=
this
.
customerId
this
.
form
.
bizId
=
this
.
id
...
...
@@ -393,10 +246,27 @@ export default {
listAllSimpl
().
then
((
r
)
=>
{
this
.
allSimplList
=
r
.
data
;
});
this
.
getCustomerFollowList
()
this
.
reset
()
//
this.getCustomerFollowList()
//
this.reset()
},
methods
:
{
getOfferList
()
{
getOfferPage
(
this
.
queryParams
).
then
(
response
=>
{
this
.
offerList
=
response
.
data
.
list
;
this
.
offerTotal
=
response
.
data
.
total
;
});
},
handleFollowType
(
val
)
{
console
.
log
(
val
)
if
(
val
==
'
2
'
)
{
// this.$emit('selectOffer')
console
.
log
(
2222
)
this
.
$refs
[
'
customerFollowSelectOffer
'
].
offerDialogVisible
=
true
}
},
selectOffer
(
offerId
)
{
this
.
form
.
offerId
=
offerId
},
reset
()
{
this
.
form
=
{
attatchment
:
undefined
,
...
...
@@ -415,9 +285,9 @@ export default {
purpose
:
undefined
,
resultType
:
undefined
,
status
:
undefined
,
founder
:
this
.
$store
.
getters
.
userId
,
creatorName
:
this
.
$store
.
getters
.
userId
,
createTime
:
new
Date
().
getTime
(),
updater
:
this
.
$store
.
getters
.
userId
,
updater
Name
:
this
.
$store
.
getters
.
userId
,
updateTime
:
new
Date
().
getTime
()
};
},
...
...
@@ -427,23 +297,23 @@ export default {
if
(
!
valid
)
{
return
}
if
(
!
this
.
form
.
followType
)
{
if
(
!
this
.
form
.
followType
)
{
this
.
$modal
.
msgError
(
"
请选择跟进类型
"
);
return
}
if
(
!
this
.
form
.
followTime
)
{
if
(
!
this
.
form
.
followTime
)
{
this
.
$modal
.
msgError
(
this
.
$t
(
'
请选择跟进时间
'
));
return
}
if
(
!
this
.
form
.
contactName
)
{
if
(
!
this
.
form
.
contactName
)
{
this
.
$modal
.
msgError
(
this
.
$t
(
'
请选择联系人
'
));
return
}
if
(
!
this
.
form
.
followUserId
)
{
if
(
!
this
.
form
.
followUserId
)
{
this
.
$modal
.
msgError
(
this
.
$t
(
'
请选择跟进业务
'
));
return
}
if
(
!
this
.
form
.
followMethod
)
{
if
(
!
this
.
form
.
followMethod
)
{
this
.
$modal
.
msgError
(
this
.
$t
(
'
请选择跟进方式
'
));
return
}
...
...
@@ -462,7 +332,8 @@ export default {
})
},
saveSubmitData
(
status
)
{
addCustomerFollow
({
let
func
=
this
.
form
.
id
?
editCustomerFollow
:
addCustomerFollow
func
({
...
this
.
form
,
status
}).
then
(
r
=>
{
...
...
@@ -479,7 +350,7 @@ export default {
this
.
customerFollowClose
()
})
},
customerFollowClose
(){
customerFollowClose
()
{
this
.
resetCustomerFollowForm
()
this
.
customerFollow
.
dialogVisible
=
false
},
...
...
@@ -488,30 +359,59 @@ export default {
// this.$refs.dictType.changeValue(this.customerFollow.form.followType);
this
.
$refs
.
dictMethod
.
changeValue
(
this
.
customerFollow
.
form
.
followMethod
);
},
handleQuery
()
{
this
.
pageNo
=
1
this
.
followTime
=
[]
this
.
getCustomerFollowList
()
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"
queryForm
"
);
this
.
queryParams
=
{
followType
:
null
,
followMethod
:
null
,
resultType
:
null
,
status
:
null
};
this
.
handleQuery
();
},
getCustomerFollowList
()
{
if
(
this
.
customerQuery
){
getCustomerFollowList
({
customerId
:
this
.
customerId
,
pageNo
:
this
.
pageNo
,
pageSize
:
this
.
pageSize
}).
then
(
r
=>
{
this
.
customerFollowList
=
r
.
data
.
list
;
this
.
total
=
r
.
data
.
total
;
if
(
this
.
customerQuery
)
{
getCustomerFollowList
({
customerId
:
this
.
customerId
,
pageNo
:
this
.
pageNo
,
pageSize
:
this
.
pageSize
}).
then
(
r
=>
{
this
.
$message
.
info
(
this
.
$t
(
"
操作成功
"
))
this
.
$emit
(
'
refresh
'
)
})
}
else
{
getCustomerFollowPage2
({
bizId
:
this
.
id
,
followType
:
3
,
pageNo
:
this
.
pageNo
,
pageSize
:
this
.
pageSize
}).
then
(
r
=>
{
this
.
customerFollowList
=
r
.
data
.
list
;
this
.
total
=
r
.
data
.
total
;
}
else
{
getCustomerFollowPage2
({
bizId
:
this
.
id
,
followType
:
3
,
pageNo
:
this
.
pageNo
,
pageSize
:
this
.
pageSize
}).
then
(
r
=>
{
this
.
$emit
(
'
refresh
'
)
})
}
},
handleUpdate
()
{
//
handleAdd
()
{
this
.
isEdit
=
false
this
.
customerFollow
.
dialogVisible
=
true
this
.
reset
()
},
handleUpdate
(
row
,
flag
)
{
this
.
isEdit
=
flag
this
.
customerFollow
.
dialogVisible
=
true
this
.
form
=
row
},
addPlan
()
{
//
}
}
}
</
script
>
<
style
scoped
>
.text_style
{
white-space
:
pre-wrap
;
}
</
style
>
src/views/ecw/customer/components/customerFollowSelectOffer.vue
0 → 100644
View file @
72057481
<
template
>
<el-dialog
append-to-body
:title=
"$t('报价单')"
:visible.sync=
"offerDialogVisible"
:close-on-click-modal=
"false"
width=
"80%"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
label-width=
"100px"
>
<el-form-item
:label=
"$t('编号')"
prop=
"searchNumber"
>
<el-input
v-model=
"queryParams.searchNumber"
:placeholder=
"$t('请输入报价单号、订单号')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('客户')"
prop=
"searchCustomer"
>
<el-input
v-model=
"queryParams.searchCustomer"
:placeholder=
"$t('请输入客户')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('客户经理')"
prop=
"followUpSalesmanId"
>
<user-selector
v-model=
"queryParams.followUpSalesmanId"
clearable
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
{{
$t
(
'
搜索
'
)
}}
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
{{
$t
(
'
重置
'
)
}}
</el-button>
</el-form-item>
</el-form>
<el-table
:data=
"offerList"
border
size=
"mini"
>
<el-table-column
align=
"center"
width=
"80"
>
<template
slot-scope=
"
{row}">
<el-radio
v-model=
"offerId"
:label=
"row.offerId"
>
</el-radio>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('报价单号')"
align=
"left"
prop=
"number"
width=
"200px"
>
<
template
slot-scope=
"{row}"
>
<el-link
type=
"primary"
@
click.native=
"$router.push('/offer/detail?offerId=' + row.offerId)"
>
{{
row
.
number
}}
</el-link>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('订单编号')"
align=
"left"
prop=
"orderNo"
/>
<el-table-column
:label=
"$t('客户名称')"
align=
"left"
prop=
"relationName"
/>
<el-table-column
:label=
"$t('目的地')"
align=
"center"
prop=
"objectiveName"
/>
<el-table-column
:label=
"$t('销售阶段')"
align=
"left"
width=
"180"
>
<
template
slot-scope=
"{row}"
>
<dict-tag
:type=
"DICT_TYPE.ECW_OFFER_STATUS"
:value=
"row.status"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('预计结束时间')"
align=
"left"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
stopTime
,
"
{y
}
-{m
}
-{d
}
"
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('运输方式')
"
align
=
"
left
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
dict
-
tag
:
type
=
"
DICT_TYPE.ECW_TRANSPORT_TYPE
"
:
value
=
"
scope.row.transportId
"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('预计销售额')
"
align
=
"
left
"
prop
=
"
estCost
"
>
<
template
slot
-
scope
=
"
{row
}
"
>
<
div
class
=
""
v
-
for
=
"
(item, feeIndex) in row.estCostVO.feeDtoList
"
:
key
=
"
feeIndex
"
>
<
dict
-
tag
:
type
=
"
DICT_TYPE.ECW_COST_FEE_TYPE
"
:
value
=
"
item.feeType
"
/>
{{
item
.
amount
}}
{{
currencyMap
[
item
.
currencyId
]
}}
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('客户经理')
"
align
=
"
left
"
prop
=
"
creatorName
"
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('创建时间')
"
align
=
"
center
"
>
<
template
slot
-
scope
=
"
scope
"
>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
<
/template
>
<
/el-table-column
>
<
/el-table
>
<!--
分页组件
-->
<
pagination
v
-
show
=
"
offerTotal > 0
"
:
total
=
"
offerTotal
"
:
page
.
sync
=
"
queryParams.pageNo
"
:
limit
.
sync
=
"
queryParams.pageSize
"
@
pagination
=
"
getOfferList
"
/>
<
div
slot
=
"
footer
"
class
=
"
dialog-footer
"
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
confirm
"
>
{{
$t
(
'
确定
'
)
}}
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/template
>
<
script
>
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
;
import
{
getOfferPage
}
from
"
@/api/ecw/offer
"
import
UserSelector
from
'
@/components/UserSelector
'
export
default
{
name
:
"
CustomerFollowSelectOffer
"
,
components
:
{
UserSelector
}
,
data
()
{
return
{
offerId
:
null
,
offerDialogVisible
:
false
,
queryParams
:
{
pageNo
:
1
,
pageSize
:
6
}
,
offerList
:
[],
offerTotal
:
0
,
currencyList
:
[],
}
}
,
created
()
{
getCurrencyList
().
then
(
res
=>
{
this
.
currencyList
=
res
.
data
}
)
this
.
getOfferList
()
}
,
computed
:{
currencyMap
(){
let
map
=
{
}
this
.
currencyList
.
forEach
(
item
=>
{
map
[
item
.
id
]
=
this
.
$l
(
item
,
'
title
'
)
}
)
return
map
}
,
exportCityList
()
{
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
2
)
}
,
importCityList
()
{
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
1
)
}
,
}
,
methods
:
{
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
();
}
,
/** 重置按钮操作 */
resetQuery
()
{
this
.
queryParams
=
{
pageNo
:
1
,
pageSize
:
10
}
this
.
handleQuery
();
}
,
getOfferList
()
{
getOfferPage
(
this
.
queryParams
).
then
(
response
=>
{
this
.
offerList
=
response
.
data
.
list
;
this
.
offerTotal
=
response
.
data
.
total
;
}
);
}
,
confirm
()
{
if
(
this
.
offerId
)
{
this
.
$emit
(
'
select
'
,
this
.
offerId
)
this
.
offerDialogVisible
=
false
}
else
{
this
.
$message
.
error
(
this
.
$t
(
"
请选择报价单
"
))
}
}
}
}
<
/script>
\ No newline at end of file
src/views/ecw/customer/query.vue
View file @
72057481
...
...
@@ -418,7 +418,90 @@
<
/el-card
>
<
/el-tab-pane
>
<
el
-
tab
-
pane
name
=
"
follow
"
:
label
=
"
$t('跟进')
"
>
<
customer
-
follow
v
-
if
=
"
activeName === 'follow'
"
customerQuery
ref
=
"
customerFollow
"
:
id
=
"
id
"
:
customer
-
id
=
"
id
"
><
/customer-follow
>
<
el
-
card
class
=
"
box-card
"
>
<
div
slot
=
"
header
"
class
=
"
clearfix
"
>
<
el
-
form
size
=
"
small
"
:
inline
=
"
true
"
label
-
width
=
"
100px
"
>
<
el
-
form
-
item
:
label
=
"
$t('跟进类型')
"
>
<
dict
-
selector
clearable
:
type
=
"
DICT_TYPE.CUSTOMER_FOLLOWUP_TYPE
"
v
-
model
=
"
followForm.followType
"
@
change
=
"
handleQuery
"
><
/dict-selector
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('跟进方式')
"
>
<
dict
-
selector
clearable
:
type
=
"
DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD
"
v
-
model
=
"
followForm.followMethod
"
@
change
=
"
handleQuery
"
><
/dict-selector
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('跟进结果')
"
>
<
el
-
select
clearable
v
-
model
=
"
followForm.resultType
"
:
placeholder
=
"
$t('请选择')
"
size
=
"
small
"
@
change
=
"
handleQuery
"
>
<
el
-
option
v
-
for
=
"
dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_RESULT_TYPE)
"
:
key
=
"
dict.value
"
:
label
=
"
isChinese ? dict.label : dict.labelEn
"
:
value
=
"
dict.value
"
/>
<
/el-select
>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('跟进状态')
"
>
<
el
-
select
clearable
v
-
model
=
"
followForm.status
"
:
placeholder
=
"
$t('请选择')
"
size
=
"
small
"
@
change
=
"
handleQuery
"
>
<
el
-
option
v
-
for
=
"
dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_STATUS)
"
:
key
=
"
dict.value
"
:
label
=
"
isChinese ? dict.label : dict.labelEn
"
:
value
=
"
dict.value
"
/>
<
/el-select
>
<
/el-form-item
>
<!--
<
el
-
form
-
item
:
label
=
"
$t('跟进时间')
"
>
<
el
-
date
-
picker
type
=
"
datetimerange
"
clearable
v
-
model
=
"
followTime
"
style
=
"
width: 320px
"
value
-
format
=
"
yyyy-MM-dd HH:mm:ss
"
range
-
separator
=
"
-
"
:
start
-
placeholder
=
"
$t('开始跟进时间')
"
:
end
-
placeholder
=
"
$t('结束跟进时间')
"
/>
<
/el-form-item
>
<
el
-
form
-
item
:
label
=
"
$t('下次跟进时间')
"
>
<
el
-
date
-
picker
type
=
"
datetimerange
"
clearable
v
-
model
=
"
nextTime
"
style
=
"
width: 320px
"
value
-
format
=
"
yyyy-MM-dd HH:mm:ss
"
range
-
separator
=
"
-
"
:
start
-
placeholder
=
"
$t('开始下次跟进时间')
"
:
end
-
placeholder
=
"
$t('结束下次跟进时间')
"
/>
<
/el-form-item
>
-->
<
el
-
form
-
item
>
<
el
-
button
type
=
"
primary
"
icon
=
"
el-icon-search
"
@
click
=
"
getCustomerFollowList
"
>
{{
$t
(
"
搜索
"
)
}}
<
/el-button
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
()=>{
followFrom = { pageNo:1,pageSize:10
}
; getCustomerFollowList();
}
"
>
{{
$t
(
'
重置
'
)
}}
<
/el-button
>
<
el
-
button
type
=
"
success
"
@
click
=
"
customerFollowFn('follow')
"
>
{{
$t
(
'
新增
'
)
}}
<
/el-button
>
<
/el-form-item
>
<
/el-form
>
<
/div
>
<
el
-
table
:
data
=
"
customerFollowList
"
style
=
"
width: 100%
"
>
<
el
-
table
-
column
prop
=
"
number
"
:
label
=
"
$t('编号')
"
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
followType
"
:
label
=
"
$t('跟进类型')
"
:
formatter
=
"
(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_TYPE, cellValue)
"
><
/el-table-column
>
<
el
-
table
-
column
prop
=
"
offerId
"
:
label
=
"
$t('报价单')
"
><
/el-table-column
>
<
el
-
table
-
column
prop
=
"
followTime
"
:
label
=
"
$t('跟进时间')
"
:
formatter
=
"
(row, column, cellValue) => parseTime(cellValue)
"
><
/el-table-column
>
<
el
-
table
-
column
prop
=
"
contactName
"
:
label
=
"
$t('联系人')
"
><
/el-table-column
>
<
el
-
table
-
column
prop
=
"
followUserName
"
:
label
=
"
$t('客户经理')
"
><
/el-table-column
>
<
el
-
table
-
column
prop
=
"
followMethod
"
:
label
=
"
$t('跟进方式')
"
:
formatter
=
"
(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD, cellValue)
"
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
purpose
"
:
label
=
"
$t('目的')
"
><
/el-table-column
>
<
el
-
table
-
column
prop
=
"
feedback
"
:
label
=
"
$t('客户反馈')
"
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
resultType
"
:
label
=
"
$t('跟进结果')
"
:
formatter
=
"
(row, column, cellValue) => getDictDataLabel(DICT_TYPE.CUSTOMER_FOLLOWUP_RESULT_TYPE, cellValue)
"
><
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('下次跟进时间')
"
align
=
"
center
"
>
<
template
slot
-
scope
=
"
scope
"
>
{{
parseTime
(
scope
.
row
.
nextTime
)
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('关联跟进记录')
"
align
=
"
center
"
><
/el-table-column
>
<
el
-
table
-
column
prop
=
"
nextPlan
"
:
label
=
"
$t('下次计划')
"
align
=
"
center
"
><
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('跟进状态')
"
align
=
"
center
"
>
<
template
slot
-
scope
=
"
scope
"
>
{{
getDictDataLabel
(
DICT_TYPE
.
CUSTOMER_FOLLOWUP_STATUS
,
scope
.
row
.
status
)
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
creatorName
"
:
label
=
"
$t('创建人')
"
align
=
"
center
"
><
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('创建时间')
"
align
=
"
center
"
>
<
template
slot
-
scope
=
"
scope
"
>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
updaterName
"
:
label
=
"
$t('最后更新人')
"
align
=
"
center
"
><
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('最后更新时间')
"
align
=
"
center
"
>
<
template
slot
-
scope
=
"
scope
"
>
{{
parseTime
(
scope
.
row
.
updateTime
)
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
width
=
"
200px
"
:
label
=
"
$t('操作')
"
align
=
"
center
"
class
-
name
=
"
small-padding fixed-width
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
handleCustomerFollow(scope.row, true)
"
v
-
hasPermi
=
"
['ecw:customer:follow-update']
"
>
{{
$t
(
"
编辑
"
)
}}
<
/el-button
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-collection
"
@
click
=
"
handleCustomerFollow(scope.row, false)
"
v
-
has
-
permi
=
"
['ecw:customer:follow-add-plan']
"
>
{{
$t
(
"
增加计划
"
)
}}
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
pagination
:
total
=
"
customerFollowTotal
"
:
page
.
sync
=
"
followForm.pageNo
"
:
limit
.
sync
=
"
followForm.pageSize
"
@
pagination
=
"
getCustomerFollowList
"
/>
<
/el-card
>
<
/el-tab-pane
>
<
el
-
tab
-
pane
name
=
"
complain
"
:
label
=
"
$t('客户投诉')
"
>
<
customer
-
complaint
v
-
if
=
"
activeName === 'complain'
"
ref
=
"
customerComplaint
"
:
customer
-
id
=
"
id
"
hidden
-
search
><
/customer-complaint
>
...
...
@@ -740,6 +823,8 @@
<
el
-
button
@
click
=
"
dialogVisible = false
"
>
{{
$t
(
'
取消
'
)
}}
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
customer
-
follow
ref
=
"
customerFollow
"
:
id
=
"
id
"
:
customer
-
id
=
"
id
"
@
refresh
=
"
getCustomerFollowList
"
@
selectOffer
=
"
handleCustomerFollowSelectOffer
"
/>
<
/div
>
<
/template
>
...
...
@@ -777,6 +862,9 @@ import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue";
import
{
getListTree
}
from
"
@/api/ecw/region
"
;
import
{
getWarehouseList
}
from
"
@/api/ecw/warehouse
"
;
import
{
deleteOffer
,
cancel
,
recovery
}
from
"
@/api/ecw/offer
"
;
import
{
getCustomerFollowList
}
from
"
@/api/ecw/customerFollow
"
export
default
{
name
:
'
query
'
,
components
:
{
...
...
@@ -784,7 +872,7 @@ export default {
Template
,
CustomerFollow
,
CustomerComplaint
,
customerLog
,
customerLog
}
,
created
()
{
// 获取币种
...
...
@@ -836,16 +924,16 @@ export default {
this
.
destCountryId
=
''
this
.
destWarehouseId
=
''
this
.
objectiveId
=
''
this
.
queryParams
.
page
=
1
this
.
getorderList
()
//订单
break
case
'
quote
'
:
this
.
destCountryId
=
''
this
.
destWarehouseId
=
''
this
.
objectiveId
=
''
this
.
infoListOfferFrom
.
pageNo
=
1
this
.
getInfoListOfferPage
()
//报价
break
case
'
follow
'
:
this
.
getCustomerFollowList
()
case
'
bill
'
:
this
.
infoListReceiptFn
()
//账单
break
...
...
@@ -1049,6 +1137,15 @@ export default {
destCountryId
:
null
,
objectiveId
:
null
,
destWarehouseId
:
null
,
customerFollowVisible
:
true
,
followForm
:
{
pageNo
:
1
,
pageSize
:
10
}
,
followTime
:
[],
nextTime
:
[],
customerFollowTotal
:
0
,
customerFollowList
:
[]
}
}
,
computed
:
{
...
...
@@ -1098,12 +1195,25 @@ export default {
this
.
activeName
=
val
this
.
$nextTick
(()
=>
{
if
(
val
===
'
follow
'
){
this
.
$refs
[
'
customerFollow
'
].
customerFollow
.
dialogVisible
=
true
;
this
.
customerFollowVisible
=
true
this
.
$nextTick
(
_
=>
{
this
.
$refs
[
'
customerFollow
'
].
handleAdd
()
}
)
}
else
{
this
.
$refs
[
'
customerComplaint
'
].
handleAdd
()
}
}
)
}
,
handleCustomerFollow
(
row
,
flag
)
{
this
.
customerFollowVisible
=
true
this
.
$nextTick
(
_
=>
{
this
.
$refs
[
'
customerFollow
'
].
handleUpdate
(
row
,
flag
)
}
)
}
,
handleCustomerFollowSelectOffer
()
{
this
.
$refs
[
'
customerFollowSelectOffer
'
].
offerDialogVisible
=
true
}
,
checkPermi
,
userIdFormatter
(
row
,
column
,
cellValue
){
const
member
=
this
.
memberList
.
find
(
e
=>
e
.
id
===
cellValue
)
...
...
@@ -1186,6 +1296,26 @@ export default {
this
.
infoListOfferTotal
=
r
.
data
.
total
;
}
)
}
,
getCustomerFollowList
()
{
let
queryParams
=
{
}
if
(
this
.
followTime
&&
this
.
followTime
.
length
==
2
)
{
queryParams
.
beginFollowTime
=
this
.
followTime
[
0
]
queryParams
.
endFollowTime
=
this
.
followTime
[
0
]
}
if
(
this
.
nextTime
&&
this
.
nextTime
.
length
==
2
)
{
queryParams
.
beginNextTime
=
this
.
nextTime
[
0
]
queryParams
.
endNextTime
=
this
.
nextTime
[
1
]
}
queryParams
=
Object
.
assign
({
}
,
queryParams
,
this
.
followForm
)
getCustomerFollowList
({
...
queryParams
,
customerId
:
this
.
customerId
}
).
then
(
r
=>
{
this
.
customerFollowList
=
r
.
data
.
list
;
this
.
customerFollowTotal
=
r
.
data
.
total
;
}
)
}
,
// 数据
getOrderStatistics
(){
orderStatistics
({
customerId
:
this
.
id
}
).
then
(
r
=>
{
...
...
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