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
f70a8bc1
Commit
f70a8bc1
authored
Sep 19, 2024
by
yujinyao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并客户2,客户信息显示
parent
50834765
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
458 additions
and
396 deletions
+458
-396
customer.js
src/api/ecw/customer.js
+8
-0
customerFollowSelectOffer.vue
...ews/ecw/customer/components/customerFollowSelectOffer.vue
+1
-1
customerMerge.vue
src/views/ecw/customer/components/customerMerge.vue
+437
-30
customerMergeSelectCustomer.vue
...s/ecw/customer/components/customerMergeSelectCustomer.vue
+0
-360
index.vue
src/views/ecw/customer/index.vue
+5
-0
query.vue
src/views/ecw/customer/query.vue
+7
-5
No files found.
src/api/ecw/customer.js
View file @
f70a8bc1
...
...
@@ -549,4 +549,12 @@ export function competitorListAll(){
url
:
'
customer/competitor/listAll
'
,
method
:
'
get
'
})
}
export
function
customerMergeCus
(
params
){
return
request
({
url
:
'
ecw/customer/mergeCus
'
,
method
:
'
get
'
,
params
})
}
\ No newline at end of file
src/views/ecw/customer/components/customerFollowSelectOffer.vue
View file @
f70a8bc1
...
...
@@ -76,7 +76,7 @@
<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>
<el-button
type=
"primary"
@
click=
"confirm"
>
{{$t('确
定')}}
</el-button>
</div>
</el-dialog>
</template>
...
...
src/views/ecw/customer/components/customerMerge.vue
View file @
f70a8bc1
<
template
>
<div
class=
"customer-merge"
>
<el-dialog
append-to-body
:title=
"$t('合并客户')"
:visible.sync=
"dialogVisible"
width=
"900px"
>
<el-form
ref=
"form"
label-width=
"1
2
0px"
>
<el-form
ref=
"form"
label-width=
"1
0
0px"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
$t
(
'
保留客户
'
)
}}
</span>
<el-button
type=
"success"
size=
"small"
style=
"float: right"
>
{{
$t
(
'
请选择
'
)
}}
</el-button>
<el-button
type=
"success"
size=
"small"
style=
"float: right"
@
click=
"selectCustomer(1)"
>
{{
$t
(
'
请选择
'
)
}}
</el-button>
</div>
<el-form-item
:label=
"$t('客户编号')+':'"
>
{{
retainCustomer
.
number
}}
</el-form-item>
<el-form-item
:label=
"$t('客户名称')+':'"
>
{{
$l
(
retainCustomer
,
"
name
"
)
}}
</el-form-item>
<el-form-item
:label=
"$t('客户经理')+':'"
>
{{
retainCustomer
.
customerServiceName
}}
</el-form-item>
<el-form-item
:label=
"$t('创建时间')+':'"
>
{{
parseTime
(
retainCustomer
.
createTime
)
}}
</el-form-item>
<el-form-item
:label=
"$t('联系方式')+':'"
>
+
{{
retainCustomer
.
defaultContactPhone
}}
</el-form-item>
</el-card>
</el-col>
...
...
@@ -25,67 +30,469 @@
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
{{
$t
(
'
被合并客户-非主客户
'
)
}}
</span>
<el-button
type=
"success"
size=
"small"
style=
"float: right"
>
{{
$t
(
'
请选择
'
)
}}
</el-button>
<el-button
type=
"success"
size=
"small"
style=
"float: right"
@
click=
"selectCustomer(2)"
>
{{
$t
(
'
请选择
'
)
}}
</el-button>
</div>
<el-form-item
:label=
"$t('客户编号')+':'"
>
{{
mergeCustomer
.
number
}}
</el-form-item>
<el-form-item
:label=
"$t('客户名称')+':'"
>
{{
$l
(
mergeCustomer
,
"
name
"
)
}}
</el-form-item>
<el-form-item
:label=
"$t('客户经理')+':'"
>
{{
mergeCustomer
.
customerServiceName
}}
</el-form-item>
<el-form-item
:label=
"$t('创建时间')+':'"
>
{{
parseTime
(
mergeCustomer
.
createTime
)
}}
</el-form-item>
<el-form-item
:label=
"$t('联系方式')+':'"
>
+
{{
mergeCustomer
.
defaultContactPhone
}}
</el-form-item>
</el-card>
</el-col>
</el-row>
<div
class=
"stips"
>
<h2>
{{
$t
(
'
注意事项
'
)
}}
</h2>
<ul>
<li>
1. 保留客户和非主客户,不能在两个不同的客户经理名下,请先确认两个客户在同一个客户经理名下
</li>
<li>
2. 被合并客户,提交后会直接删除
</li>
<li>
3. 合并后,非主客户的联系人,跟进记录,报价单,订单,客户投诉,品牌授权都迁移到保留客户中,其他信息不会迁移,如需要维护非主客户的客户档案信息到保留客户中,请先维护好再操作
</li>
</ul>
</div>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleSubmit"
>
{{
$t
(
'
确 定
'
)
}}
</el-button>
<el-button
@
click=
"dialogVisible = false"
>
{{
$t
(
'
取 消
'
)
}}
</el-button>
</div>
</el-dialog>
<el-dialog
append-to-body
:title=
"$t('选择客户')"
:visible.sync=
"customerDialogVisible"
: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=
"number"
>
<el-input
v-model.trim=
"queryParams.number"
:placeholder=
"$t('请输入客户编号')"
clearable
@
keyup.enter.native=
"handleQuery"
@
input=
"queryParams.number=queryParams.number.replace(/\s+/g, '')"
/>
</el-form-item>
<el-form-item
:label=
"$t('客户名称')"
prop=
"name"
>
<el-input
v-model.trim=
"queryParams.name"
:placeholder=
"$t('请输入客户名称')"
clearable
@
keyup.enter.native=
"handleQuery"
@
input=
"queryParams.name=queryParams.name.replace(/\s+/g, '')"
/>
</el-form-item>
<el-form-item
:label=
"$t('区号')"
>
<el-select
v-model=
"queryParams.areaCode"
:placeholder=
"$t('请选择区号')"
>
<el-option
v-for=
"(item, index) in countryList"
:key=
"index"
:label=
"
item.nameShort +
(isChinese ? item.nameZh : item.nameEn) +
' +' +
item.tel
"
:value=
"item.tel"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('联系方式')"
>
<el-input
:placeholder=
"$t('请输入联系方式')"
v-model.trim=
"queryParams.defaultContactPhone"
@
input=
"queryParams.defaultContactPhone=queryParams.defaultContactPhone.replace(/\s+/g, '')"
></el-input>
</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=
"list"
v-loading=
"loading"
border
size=
"mini"
>
<el-table-column
align=
"center"
width=
"80"
>
<template
slot-scope=
"
{row}">
<el-radio
v-model=
"customerId"
:label=
"row.id"
>
</el-radio>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('客户编号')"
align=
"center"
>
<
template
slot-scope=
"{ row }"
>
<el-link
type=
"primary"
@
click.native=
"$router.push('/customer/query/' + row.id)"
>
{{
row
.
number
}}
</el-link>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('客户名称')"
align=
"center"
>
<
template
slot-scope=
"{ row }"
>
<p
style=
"display: inline-block; white-space: pre-wrap"
>
{{
$l
(
row
,
"
name
"
)
}}
</p>
<el-tag
v-if=
"row.isInOpenSea"
size=
"mini"
>
{{
$t
(
"
公
"
)
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('主联系人')"
prop=
"defaultContactName"
></el-table-column>
<el-table-column
:label=
"$t('主联系方式')"
prop=
"defaultContactPhone"
>
<
template
v-slot=
"{ row }"
>
+
{{
row
.
defaultContactPhone
}}
<br
/>
<contacts
:id=
"row.id"
>
<el-button
type=
"text"
>
更多
</el-button>
</contacts>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('客户类别')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_TYPE"
:value=
"scope.row.type"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('角色')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_ROLE"
:value=
"scope.row.roles"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('客户经理')"
align=
"center"
prop=
"customerServiceName"
></el-table-column>
<el-table-column
:label=
"$t('国籍')"
align=
"center"
prop=
"country"
:formatter=
"countryFormatter"
></el-table-column>
<el-table-column
:label=
"$t('出货渠道')"
align=
"center"
>
<
template
slot-scope=
"{ row }"
>
{{
channel
(
row
.
transportType
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('客户来源')"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_SOURCE"
:value=
"scope.row.source"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('业务国家')"
>
<
template
slot-scope=
"{ row }"
>
{{
getBusiCountryNames
(
row
.
busiCountryIds
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('常用提货网点')"
>
<
template
slot-scope=
"{ row }"
>
{{
getPickupPointNames
(
row
.
pickupPoints
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('年度发货量')"
align=
"center"
>
<
template
slot-scope=
"{ row }"
>
{{
row
.
weightYearly
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('主营类别')"
>
<
template
slot-scope=
"{ row }"
>
{{
getProductTypeNames
(
row
.
productType
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('主要竞争对手')"
prop=
"competitorNames"
>
</el-table-column>
<el-table-column
:label=
"$t('年度发货次数')"
align=
"center"
>
<
template
slot-scope=
"{ row }"
>
{{
row
.
numYearly
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('推介人')"
>
<
template
slot-scope=
"{ row }"
>
{{
getPromoterName
(
row
.
promoter
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('入公海时间')"
align=
"center"
width=
"160"
>
<
template
v-slot=
"{ row }"
>
{{
parseTime
(
row
.
enterOpenSeaTime
?
row
.
enterOpenSeaTime
:
row
.
estimateEnterOpenSeaTime
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('入仓确认')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
type=
"success"
v-if=
"scope.row.arrivalConfirm == 1"
>
{{
$t
(
'
是
'
)
}}
</el-tag>
<el-tag
type=
"info"
v-else
>
{{
$t
(
'
否
'
)
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('控货无收货人')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
type=
"success"
v-if=
"scope.row.noConsignee"
>
{{
$t
(
'
是
'
)
}}
</el-tag>
<el-tag
type=
"info"
v-else
>
{{
$t
(
'
否
'
)
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('默认付款')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
type=
"success"
v-if=
"scope.row.defaultPay"
>
{{
$t
(
'
是
'
)
}}
</el-tag>
<el-tag
type=
"info"
v-else
>
{{
$t
(
'
否
'
)
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('归属时间')"
width=
"160"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
parseTime
(
scope
.
row
.
customerServiceConfirmedTime
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('首次成交时间')"
width=
"160"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
parseTime
(
scope
.
row
.
firstDealTime
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('获取方式')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_GET_METHOD"
:value=
"scope.row.getMethods"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('创建人')"
prop=
"createUsername"
align=
"center"
>
</el-table-column>
<el-table-column
:label=
"$t('创建时间')"
align=
"center"
width=
"160"
>
<
template
slot-scope=
"scope"
>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('最后更新时间')"
align=
"center"
width=
"160"
>
<
template
slot-scope=
"scope"
>
{{
parseTime
(
scope
.
row
.
updateTime
)
}}
</
template
>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"confirm"
>
{{$t('确 定')}}
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
getCustomerPage
,
customerMergeCus
}
from
"
@/api/ecw/customer
"
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
import
Contacts
from
"
./contacts.vue
"
;
export
default
{
name
:
"
CustomerMerge
"
,
components
:
{
Contacts
},
data
()
{
return
{
dialogVisible
:
false
,
form
:
{}
getDictDatas
,
DICT_TYPE
,
loading
:
false
,
customerId
:
null
,
customerDialogVisible
:
false
,
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
},
list
:
[],
total
:
0
,
type
:
1
,
retainCustomer
:
{},
mergeCustomer
:
{},
}
},
props
:
{
countryList
:
{
type
:
Array
,
default
:
()
=>
[]
},
getNodeLists
:
{
type
:
Array
,
default
:
()
=>
[]
},
productTypeList
:
{
type
:
Array
,
default
:
()
=>
[]
},
customerSelectFn
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
computed
:
{
isChinese
()
{
return
this
.
$i18n
.
locale
===
"
zh_CN
"
;
},
channel
()
{
return
(
val
)
=>
{
return
!!
val
?
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_CUSTOMER_TRANSPORT_TYPE
)
.
filter
((
i
)
=>
(
val
.
split
(
"
,
"
)
||
[]).
includes
(
i
.
value
))
.
map
((
i
)
=>
(
this
.
isChinese
?
i
.
label
:
i
.
labelEn
))
.
join
(
"
,
"
)
:
""
;
};
},
getBusiCountryNames
()
{
return
(
ids
)
=>
{
if
(
ids
)
{
const
idsArr
=
ids
.
split
(
'
,
'
)
const
strArr
=
[]
this
.
countryList
.
forEach
(
item
=>
{
if
(
idsArr
.
includes
(
item
.
id
.
toString
()))
{
strArr
.
push
(
this
.
isChinese
?
item
.
nameZh
:
item
.
nameEn
)
}
})
return
strArr
.
length
>
0
?
strArr
.
join
(
'
,
'
)
:
null
}
else
{
return
null
}
}
},
getPickupPointNames
()
{
return
(
ids
)
=>
{
if
(
ids
)
{
const
idsArr
=
ids
.
split
(
'
,
'
)
const
strArr
=
[]
this
.
getNodeLists
.
forEach
(
item
=>
{
if
(
idsArr
.
includes
(
item
.
id
.
toString
()))
{
strArr
.
push
(
this
.
isChinese
?
item
.
titleZh
:
item
.
titleEn
)
}
})
return
strArr
.
length
>
0
?
strArr
.
join
(
'
,
'
)
:
null
}
else
{
return
null
}
}
},
getProductTypeNames
()
{
return
(
ids
)
=>
{
if
(
ids
)
{
const
idsArr
=
ids
.
split
(
'
,
'
)
const
strArr
=
[]
this
.
productTypeList
.
forEach
(
item
=>
{
if
(
idsArr
.
includes
(
item
.
id
.
toString
()))
{
strArr
.
push
(
this
.
isChinese
?
item
.
titleZh
:
item
.
titleEn
)
}
})
return
strArr
.
length
>
0
?
strArr
.
join
(
'
,
'
)
:
null
}
else
{
return
null
}
}
},
getPromoterName
()
{
return
(
id
)
=>
{
if
(
id
)
{
let
strName
=
''
for
(
const
item
of
this
.
customerSelectFn
)
{
if
(
item
.
id
==
id
)
{
strName
=
item
.
name
break
}
}
return
strName
}
else
{
return
null
}
}
}
},
created
()
{
this
.
getList
()
},
methods
:
{
init
()
{
this
.
retainCustomer
=
{}
this
.
mergeCustomer
=
{}
},
selectCustomer
(
type
)
{
this
.
type
=
type
this
.
customerId
=
null
this
.
customerDialogVisible
=
true
},
handleSubmit
()
{
if
(
!
this
.
retainCustomer
.
id
)
{
this
.
$message
.
error
(
this
.
$t
(
"
请选择保留客户
"
))
return
}
if
(
!
this
.
mergeCustomer
.
id
)
{
this
.
$message
.
error
(
this
.
$t
(
"
请选择被合并客户
"
))
return
}
if
(
this
.
mergeCustomer
.
id
==
this
.
retainCustomer
.
id
)
{
this
.
$message
.
success
(
this
.
$t
(
"
保留客户和非主客户不能为同一客户
"
))
return
}
this
.
$confirm
(
'
保留客户和非主客户,不能在两个不同的客户经理名下,请先确认两个客户在同一个客户经理名下,不允许提交当非主客户/保留客户在移交过程中,不允许合并?
'
,
'
提示
'
,
{
confirmButtonText
:
this
.
$t
(
'
确定
'
),
cancelButtonText
:
this
.
$t
(
'
取消
'
)
}).
then
(()
=>
{
this
.
submitData
()
})
},
submitData
()
{
const
h
=
this
.
$createElement
;
this
.
$msgbox
({
title
:
'
注意事项
'
,
message
:
h
(
'
div
'
,
{
class
:
'
stips
'
},
[
h
(
'
p
'
,
null
,
'
1. 保留客户和非主客户,不能在两个不同的客户经理名下,请先确认两个客户在同一个客户经理名下
'
),
h
(
'
p
'
,
null
,
'
2. 被合并客户,提交后会直接删除
'
),
h
(
'
p
'
,
null
,
'
3. 合并后,非主客户的联系人,跟进记录,报价单,订单,客户投诉,品牌授权都迁移到保留客户中,其他信息不会迁移,如需要维护非主客户的客户档案信息到保留客户中,请先维护好再操作
'
),
]),
showCancelButton
:
true
,
confirmButtonText
:
this
.
$t
(
'
确定
'
),
cancelButtonText
:
this
.
$t
(
'
取消
'
)
}).
then
(
action
=>
{
if
(
action
==
'
confirm
'
)
{
customerMergeCus
({
customerIdDeleted
:
this
.
mergeCustomer
.
id
,
customerIdSaved
:
this
.
retainCustomer
.
id
}).
then
(
_
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
操作成功
"
))
this
.
customerDialogVisible
=
false
this
.
$emit
(
'
refresh
'
)
})
}
})
},
confirm
()
{
if
(
this
.
customerId
)
{
for
(
const
row
of
this
.
list
)
{
if
(
row
.
id
==
this
.
customerId
)
{
if
(
this
.
type
==
1
)
{
this
.
retainCustomer
=
row
}
else
{
this
.
mergeCustomer
=
row
}
break
}
}
this
.
customerDialogVisible
=
false
}
else
{
this
.
$message
.
error
(
this
.
$t
(
"
请选择客户
"
))
}
},
countryFormatter
(
row
,
column
,
cellValue
)
{
const
country
=
this
.
countryList
.
find
((
e
)
=>
e
.
id
===
cellValue
);
return
this
.
isChinese
?
country
?.
nameZh
:
country
?.
nameEn
;
},
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
queryParams
=
{
pageNo
:
1
,
pageSize
:
10
}
this
.
getList
();
},
getList
()
{
this
.
loading
=
true
;
getCustomerPage
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
});
}
}
}
</
script
>
<
style
scoped
>
.stips
h2
{
font-size
:
18px
;
color
:
#DD001B
;
text-align
:
center
;
}
.stips
ul
{
padding-left
:
0
;
}
.stips
ul
li
{
list-style
:
none
;
font-size
:
14px
;
line-height
:
2em
;
}
</
style
>
\ No newline at end of file
</
script
>
\ No newline at end of file
src/views/ecw/customer/components/customerMergeSelectCustomer.vue
deleted
100644 → 0
View file @
50834765
<
template
>
<el-dialog
append-to-body
:title=
"$t('选择客户')"
:visible.sync=
"customerDialogVisible"
: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=
"number"
>
<el-input
v-model.trim=
"queryParams.number"
:placeholder=
"$t('请输入客户编号')"
clearable
@
keyup.enter.native=
"handleQuery"
@
input=
"queryParams.number=queryParams.number.replace(/\s+/g, '')"
/>
</el-form-item>
<el-form-item
:label=
"$t('客户名称')"
prop=
"name"
>
<el-input
v-model.trim=
"queryParams.name"
:placeholder=
"$t('请输入客户名称')"
clearable
@
keyup.enter.native=
"handleQuery"
@
input=
"queryParams.name=queryParams.name.replace(/\s+/g, '')"
/>
</el-form-item>
<el-form-item
:label=
"$t('区号')"
>
<el-select
v-model=
"queryParams.areaCode"
:placeholder=
"$t('请选择区号')"
>
<el-option
v-for=
"(item, index) in countryList"
:key=
"index"
:label=
"
item.nameShort +
(isChinese ? item.nameZh : item.nameEn) +
' +' +
item.tel
"
:value=
"item.tel"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('联系方式')"
>
<el-input
:placeholder=
"$t('请输入联系方式')"
v-model.trim=
"queryParams.defaultContactPhone"
@
input=
"queryParams.defaultContactPhone=queryParams.defaultContactPhone.replace(/\s+/g, '')"
></el-input>
</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=
"list"
v-loading=
"loading"
border
size=
"mini"
>
<el-table-column
:label=
"$t('客户编号')"
align=
"center"
fixed
>
<template
v-slot=
"
{ row }">
<router-link
:to=
"`/customer/query/$
{row.id}`" class="link-type">
{{
row
.
number
}}
</router-link>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('客户名称')"
align=
"center"
fixed
>
<
template
slot-scope=
"{ row }"
>
<p
style=
"display: inline-block; white-space: pre-wrap"
>
{{
$l
(
row
,
"
name
"
)
}}
</p>
<el-tag
v-if=
"row.isInOpenSea"
size=
"mini"
>
{{
$t
(
"
公
"
)
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('主联系人')"
prop=
"defaultContactName"
></el-table-column>
<el-table-column
:label=
"$t('主联系方式')"
prop=
"defaultContactPhone"
>
<
template
v-slot=
"{ row }"
>
+
{{
row
.
defaultContactPhone
}}
<br
/>
<contacts
:id=
"row.id"
>
<el-button
type=
"text"
>
更多
</el-button>
</contacts>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('客户类别')"
align=
"center"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_TYPE"
:value=
"scope.row.type"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('角色')"
align=
"center"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_ROLE"
:value=
"scope.row.roles"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('客户经理')"
align=
"center"
prop=
"customerServiceName"
></el-table-column>
<el-table-column
:label=
"$t('国籍')"
align=
"center"
prop=
"country"
:formatter=
"countryFormatter"
></el-table-column>
<el-table-column
:label=
"$t('出货渠道')"
align=
"center"
>
<
template
slot-scope=
"{ row }"
>
{{
channel
(
row
.
transportType
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('客户来源')"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_SOURCE"
:value=
"scope.row.source"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('业务国家')"
>
<
template
slot-scope=
"{ row }"
>
{{
getBusiCountryNames
(
row
.
busiCountryIds
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('常用提货网点')"
>
<
template
slot-scope=
"{ row }"
>
{{
getPickupPointNames
(
row
.
pickupPoints
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('年度发货量')"
align=
"center"
>
<
template
slot-scope=
"{ row }"
>
{{
row
.
weightYearly
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('主营类别')"
>
<
template
slot-scope=
"{ row }"
>
{{
getProductTypeNames
(
row
.
productType
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('主要竞争对手')"
prop=
"competitorNames"
>
</el-table-column>
<el-table-column
:label=
"$t('年度发货次数')"
align=
"center"
>
<
template
slot-scope=
"{ row }"
>
{{
row
.
numYearly
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('推介人')"
>
<
template
slot-scope=
"{ row }"
>
{{
getPromoterName
(
row
.
promoter
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('入公海时间')"
align=
"center"
width=
"160"
>
<
template
v-slot=
"{ row }"
>
{{
parseTime
(
row
.
enterOpenSeaTime
?
row
.
enterOpenSeaTime
:
row
.
estimateEnterOpenSeaTime
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('入仓确认')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
type=
"success"
v-if=
"scope.row.arrivalConfirm == 1"
>
{{
$t
(
'
是
'
)
}}
</el-tag>
<el-tag
type=
"info"
v-else
>
{{
$t
(
'
否
'
)
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('控货无收货人')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
type=
"success"
v-if=
"scope.row.noConsignee"
>
{{
$t
(
'
是
'
)
}}
</el-tag>
<el-tag
type=
"info"
v-else
>
{{
$t
(
'
否
'
)
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('默认付款')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tag
type=
"success"
v-if=
"scope.row.defaultPay"
>
{{
$t
(
'
是
'
)
}}
</el-tag>
<el-tag
type=
"info"
v-else
>
{{
$t
(
'
否
'
)
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('归属时间')"
width=
"160"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
parseTime
(
scope
.
row
.
customerServiceConfirmedTime
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('首次成交时间')"
width=
"160"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
parseTime
(
scope
.
row
.
firstDealTime
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('获取方式')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_GET_METHOD"
:value=
"scope.row.getMethods"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('创建人')"
prop=
"createUsername"
align=
"center"
>
</el-table-column>
<el-table-column
:label=
"$t('创建时间')"
align=
"center"
width=
"160"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('最后更新时间')"
align=
"center"
width=
"160"
>
<
template
slot-scope=
"scope"
>
<span
>
{{
parseTime
(
scope
.
row
.
updateTime
)
}}
</span>
</
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
{
getCustomerPage
}
from
"
@/api/ecw/customer
"
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
;
export
default
{
name
:
"
CustomerMergeSelectCustomer
"
,
components
:
{
UserSelector
},
props
:
{
countryList
:
{
type
:
Array
,
default
:
()
=>
[]
},
getNodeLists
:
{
type
:
Array
,
default
:
()
=>
[]
},
productTypeList
:
{
type
:
Array
,
default
:
()
=>
[]
},
customerSelectFn
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
data
()
{
return
{
loading
:
false
,
customerId
:
null
,
offerDialogVisible
:
false
,
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
},
list
:
[],
total
:
0
}
},
created
()
{
},
computed
:{
channel
()
{
return
(
val
)
=>
{
return
!!
val
?
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_CUSTOMER_TRANSPORT_TYPE
)
.
filter
((
i
)
=>
(
val
.
split
(
"
,
"
)
||
[]).
includes
(
i
.
value
))
.
map
((
i
)
=>
(
this
.
isChinese
?
i
.
label
:
i
.
labelEn
))
.
join
(
"
,
"
)
:
""
;
};
},
getBusiCountryNames
()
{
return
(
ids
)
=>
{
if
(
ids
)
{
const
idsArr
=
ids
.
split
(
'
,
'
)
const
strArr
=
[]
this
.
countryList
.
forEach
(
item
=>
{
if
(
idsArr
.
includes
(
item
.
id
.
toString
()))
{
strArr
.
push
(
this
.
isChinese
?
item
.
nameZh
:
item
.
nameEn
)
}
})
return
strArr
.
length
>
0
?
strArr
.
join
(
'
,
'
)
:
null
}
else
{
return
null
}
}
},
getPickupPointNames
()
{
return
(
ids
)
=>
{
if
(
ids
)
{
const
idsArr
=
ids
.
split
(
'
,
'
)
const
strArr
=
[]
this
.
getNodeLists
.
forEach
(
item
=>
{
if
(
idsArr
.
includes
(
item
.
id
.
toString
()))
{
strArr
.
push
(
this
.
isChinese
?
item
.
titleZh
:
item
.
titleEn
)
}
})
return
strArr
.
length
>
0
?
strArr
.
join
(
'
,
'
)
:
null
}
else
{
return
null
}
}
},
getProductTypeNames
()
{
return
(
ids
)
=>
{
if
(
ids
)
{
const
idsArr
=
ids
.
split
(
'
,
'
)
const
strArr
=
[]
this
.
productTypeList
.
forEach
(
item
=>
{
if
(
idsArr
.
includes
(
item
.
id
.
toString
()))
{
strArr
.
push
(
this
.
isChinese
?
item
.
titleZh
:
item
.
titleEn
)
}
})
return
strArr
.
length
>
0
?
strArr
.
join
(
'
,
'
)
:
null
}
else
{
return
null
}
}
},
getPromoterName
()
{
return
(
id
)
=>
{
if
(
id
)
{
let
strName
=
''
for
(
const
item
of
this
.
customerSelectFn
)
{
if
(
item
.
id
==
id
)
{
strName
=
item
.
name
break
}
}
return
strName
}
else
{
return
null
}
}
}
},
methods
:
{
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
queryParams
=
{
pageNo
:
1
,
pageSize
:
10
}
this
.
getList
();
},
getList
()
{
this
.
loading
=
true
;
getCustomerPage
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
});
},
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/index.vue
View file @
f70a8bc1
...
...
@@ -1364,6 +1364,10 @@
<customer-merge
ref=
"customerMerge"
@
refresh=
"getList"
:countryList=
"countryList"
:getNodeLists=
"getNodeLists"
:productTypeList=
"getNodeLists"
:customerSelectFn=
"customerSelectFn"
v-if=
"customerMergeVisible"
></customer-merge>
<!--业绩类型 -->
...
...
@@ -1725,6 +1729,7 @@ export default {
handleMergeCus
()
{
this
.
customerMergeVisible
=
true
this
.
$nextTick
(
_
=>
{
this
.
$refs
[
'
customerMerge
'
].
init
()
this
.
$refs
[
'
customerMerge
'
].
dialogVisible
=
true
})
},
...
...
src/views/ecw/customer/query.vue
View file @
f70a8bc1
...
...
@@ -283,7 +283,7 @@
{{
row
.
pickNum
|
deliveryRate
(
row
.
sumNum
)
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('客户经理')
"
align
=
"
center
"
prop
=
"
customerName
"
/>
<
el
-
table
-
column
:
label
=
"
$t('客户经理')
"
align
=
"
center
"
prop
=
"
customer
Service
Name
"
/>
<
el
-
table
-
column
:
label
=
"
$t('业绩归属客户方')
"
align
=
"
center
"
prop
=
"
customerName
"
/>
<
/el-table
>
<
pagination
@
pagination
=
"
getorderList
"
:
page
.
sync
=
"
queryParams.page
"
:
limit
.
sync
=
"
queryParams.rows
"
:
total
=
"
orderTotal
"
><
/pagination
>
...
...
@@ -735,11 +735,13 @@
<
el
-
tab
-
pane
name
=
"
special
"
:
label
=
"
$t('特殊设置')
"
>
<
el
-
descriptions
:
column
=
"
2
"
>
<
el
-
descriptions
-
item
:
label
=
"
$t('是否显示提单价格')
"
>
<
el
-
switch
v
-
model
=
"
customer.isShowTidanPrice
"
disabled
><
/el-switch
>
<
el
-
switch
v
-
model
=
"
customer.isShowTidanPrice
"
disabled
/
>
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('到仓确认')
"
>
{{
customer
.
arrivalConfirm
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('重货标准')
"
>
{{
customer
.
weightUnit
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('泡货标准')
"
>
{{
customer
.
lightUnit
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('到仓确认')
"
>
<
el
-
switch
v
-
model
=
"
customer.arrivalConfirm
"
:
active
-
value
=
"
1
"
:
inactive
-
value
=
"
0
"
/>
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('重货标准')
"
>
{{
customer
.
weightUnit
?
`${customer.weightUnit
}
kg/cbm`
:
''
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('泡货标准')
"
>
{{
customer
.
lightUnit
?
`${customer.lightUnit
}
kg/cbm`
:
''
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('控制无收货人')
"
>
<
el
-
switch
v
-
model
=
"
customer.noConsignee
"
disabled
/>
<
/el-descriptions-item
>
...
...
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