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
39da2846
Commit
39da2846
authored
Oct 27, 2024
by
1483922988@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
合并修改
parents
0966aef1
39c63e34
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1721 additions
and
2859 deletions
+1721
-2859
.env.development
.env.development
+1
-1
customerFollow.js
src/api/ecw/customerFollow.js
+32
-26
customerFollow.vue
src/views/ecw/customer/components/customerFollow.vue
+187
-271
edit.vue
src/views/ecw/customer/edit.vue
+383
-912
query.vue
src/views/ecw/customer/query.vue
+9
-144
edit.vue
src/views/ecw/offer/edit.vue
+12
-1
index.vue
src/views/ecw/offer/index.vue
+447
-125
logList.vue
src/views/ecw/offer/logList.vue
+19
-119
logListCommon.vue
src/views/ecw/offer/logListCommon.vue
+216
-0
index.vue
src/views/ecw/order/index.vue
+415
-1259
batchEdit.vue
src/views/ecw/productPrice/batchEdit.vue
+0
-1
No files found.
.env.development
View file @
39da2846
...
...
@@ -6,7 +6,7 @@ VUE_APP_TITLE = 捷道管理系统-测试站
# 捷道管理系统/开发环境
VUE_APP_BASE_API = 'https://
apitest.groupage.cn
'
VUE_APP_BASE_API = 'https://
devapi.jd.qipx.top
'
# VUE_APP_BASE_API = 'http://110.41.143.128:48080'
# VUE_APP_BASE_API = 'http://127.0.0.1:48080'
...
...
src/api/ecw/customerFollow.js
View file @
39da2846
import
request
from
'
@/utils/request
'
import
request
from
"
@/utils/request
"
// 创建跟进
export
function
createCustomerFollow
(
data
)
{
return
request
({
url
:
'
/ecw/customer-follow/create
'
,
method
:
'
post
'
,
url
:
"
/ecw/customer-follow/create
"
,
method
:
"
post
"
,
data
:
data
})
}
...
...
@@ -12,8 +12,8 @@ export function createCustomerFollow(data) {
// 更新跟进
export
function
updateCustomerFollow
(
data
)
{
return
request
({
url
:
'
/ecw/customer-follow/update
'
,
method
:
'
put
'
,
url
:
"
/ecw/customer-follow/update
"
,
method
:
"
put
"
,
data
:
data
})
}
...
...
@@ -21,31 +21,31 @@ export function updateCustomerFollow(data) {
// 删除跟进
export
function
deleteCustomerFollow
(
id
)
{
return
request
({
url
:
'
/ecw/customer-follow/delete?id=
'
+
id
,
method
:
'
delete
'
url
:
"
/ecw/customer-follow/delete?id=
"
+
id
,
method
:
"
delete
"
})
}
// 获得跟进
export
function
getCustomerFollow
(
id
)
{
return
request
({
url
:
'
/ecw/customer-follow/get?id=
'
+
id
,
method
:
'
get
'
url
:
"
/ecw/customer-follow/get?id=
"
+
id
,
method
:
"
get
"
})
}
// 获得跟进分页
export
function
getCustomerFollowPage
(
query
)
{
return
request
({
url
:
'
/customer/detail/infoList/followPage
'
,
method
:
'
get
'
,
url
:
"
/customer/detail/infoList/followPage
"
,
method
:
"
get
"
,
params
:
query
})
}
export
function
getCustomerFollowPage2
(
query
)
{
return
request
({
url
:
'
/ecw/customer-follow/page
'
,
method
:
'
get
'
,
url
:
"
/ecw/customer-follow/page
"
,
method
:
"
get
"
,
params
:
query
})
}
...
...
@@ -53,50 +53,56 @@ export function getCustomerFollowPage2(query) {
// 导出跟进 Excel
export
function
exportCustomerFollowExcel
(
query
)
{
return
request
({
url
:
'
/ecw/customer-follow/export-excel
'
,
method
:
'
get
'
,
url
:
"
/ecw/customer-follow/export-excel
"
,
method
:
"
get
"
,
params
:
query
,
responseType
:
'
blob
'
responseType
:
"
blob
"
})
}
export
function
getCustomerFollowList
(
params
)
{
return
request
({
url
:
'
/customer/followup/page
'
,
method
:
'
get
'
,
url
:
"
/customer/followup/page
"
,
method
:
"
get
"
,
params
})
}
export
function
getCustomerFollowDetail
(
params
)
{
return
request
({
url
:
'
/customer/followup/get
'
,
method
:
'
get
'
,
url
:
"
/customer/followup/get
"
,
method
:
"
get
"
,
params
})
}
export
function
addCustomerFollow
(
data
)
{
return
request
({
url
:
'
/customer/followup/create
'
,
method
:
'
post
'
,
url
:
"
/customer/followup/create
"
,
method
:
"
post
"
,
data
})
}
export
function
editCustomerFollow
(
data
)
{
return
request
({
url
:
'
/customer/followup/update
'
,
method
:
'
put
'
,
url
:
"
/customer/followup/update
"
,
method
:
"
put
"
,
data
})
}
export
function
exportCustomerFollow
(
params
)
{
return
request
({
url
:
'
/customer/followup/export-excel
'
,
method
:
'
get
'
,
url
:
"
/customer/followup/export-excel
"
,
method
:
"
get
"
,
params
})
}
export
function
getFollowupNewNumber
()
{
return
request
({
url
:
"
/customer/followup/getFollowupNewNumber
"
,
method
:
"
get
"
})
}
src/views/ecw/customer/components/customerFollow.vue
View file @
39da2846
<
template
>
<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-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>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('客户编号')"
>
<el-input
v-model=
"customerNumber"
:placeholder=
"$t('请输入客户编号')"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('跟进类型')"
required
>
<el-select
v-model=
"form.followType"
clearable
:placeholder=
"$t('请选择')"
@
change=
"handleFollowType"
:disabled=
"isView"
>
<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"
>
<el-form-item
:label=
"$t('报价单')"
>
<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"
clearable
type=
"datetime"
:placeholder=
"$t('请选择')"
:disabled=
"isView"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('联系人')"
required
>
<el-select
v-model=
"form.contactId"
clearable
:placeholder=
"$t('请选择')"
:disabled=
"isView"
@
change=
"changeContactUser"
>
<el-option
v-for=
"(item, index) in customerContactsList"
:key=
"index"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('客户经理')"
required
>
<el-select
v-model=
"form.followUserId"
clearable
:placeholder=
"$t('请选择')"
:disabled=
"isView"
>
<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=
"$t('跟进方式')"
required
>
<dict-selector
ref=
"dictMethod"
v-model=
"form.followMethod"
clearable
:disabled=
"isView"
:type=
"DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD"
></dict-selector>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('上一级跟进单')"
prop=
"parentNumber"
>
<el-input
v-model=
"form.parentNumber"
:placeholder=
"$t('请输入上一级跟进单')"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('跟进结果')"
prop=
"followMethod"
>
<el-select
v-model=
"form.resultType"
clearable
:placeholder=
"$t('请选择')"
:disabled=
"isView"
>
<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=
"20"
>
<el-form-item
:label=
"$t('目的')"
prop=
"purpose"
>
<el-input
type=
"textarea"
:rows=
"2"
v-model=
"form.purpose"
:placeholder=
"$t('请输入目的')"
maxlength=
"200"
show-word-limit
:disabled=
"isView"
/>
</el-form-item>
</el-col>
<el-col
:span=
"20"
>
<el-form-item
:label=
"$t('跟进情况')"
>
<el-input
rows=
"3"
class=
"text_style"
type=
"textarea"
v-model=
"form.feedback"
maxlength=
"500"
show-word-limit
:disabled=
"isView"
/>
</el-form-item>
</el-col>
<el-col
:span=
"20"
>
<el-form-item
:label=
"$t('附件')"
prop=
"attatchment"
>
<FileUpload
:limit=
"5"
:isShowTip=
"true"
v-model=
"form.attatchment"
:fileType=
"fileType"
:disabled=
"isView"
/>
</el-form-item>
</el-col>
<el-col
:span=
"13"
>
<el-form-item
:label=
"$t('下次跟进时间')"
>
<el-date-picker
v-model=
"form.nextTime"
type=
"datetime"
:placeholder=
"$t('请选择')"
:disabled=
"isView"
@
change=
"changeNextTime"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"20"
>
<el-form-item
:label=
"$t('下一步计划')"
prop=
"nextPlan"
>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"form.nextPlan"
:placeholder=
"$t('请输入下一步计划')"
maxlength=
"500"
show-word-limit
:disabled=
"isView"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('创建人')"
prop=
"founder"
>
<el-select
v-model=
"form.creatorName"
disabled
:placeholder=
"$t('请选择')"
>
<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"
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.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"
disabled
:placeholder=
"$t('请选择')"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
v-if=
"isView"
>
<el-button
type=
"warning"
@
click=
"customerFollowClose"
>
{{
$t
(
'
关 闭
'
)
}}
</el-button>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
v-else
>
<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)"
v-if=
"isEdit"
>
{{
$t
(
'
提交结果
'
)
}}
</el-button>
</div>
</el-dialog>
<customer-follow-select-offer
:customer-id=
"customerId"
ref=
"customerFollowSelectOffer"
@
select=
"selectOffer"
/>
</div>
<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-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>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('客户编号')"
>
<el-input
v-model=
"form.customerNumber"
:placeholder=
"$t('请输入客户编号')"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('跟进类型')"
required
>
<el-select
v-model=
"form.followType"
clearable
:placeholder=
"$t('请选择')"
@
change=
"handleFollowType"
:disabled=
"isView"
>
<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=
"12"
>
<el-form-item
:label=
"$t('跟进时间')"
required
>
<el-date-picker
v-model=
"form.followTime"
clearable
type=
"datetime"
:placeholder=
"$t('请选择')"
:disabled=
"isView"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('联系人')"
required
>
<el-select
v-model=
"form.contactId"
clearable
:placeholder=
"$t('请选择')"
:disabled=
"isView"
@
change=
"changeContactUser"
>
<el-option
v-for=
"(item, index) in customerContactsList"
:key=
"index"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('客户经理')"
required
>
<el-select
v-model=
"form.followUserId"
clearable
:placeholder=
"$t('请选择')"
:disabled=
"isView"
>
<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=
"$t('跟进方式')"
required
>
<dict-selector
ref=
"dictMethod"
v-model=
"form.followMethod"
clearable
:disabled=
"isView"
:type=
"DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD"
></dict-selector>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('上一级跟进单')"
prop=
"parentNumber"
>
<el-input
v-model=
"form.parentNumber"
:placeholder=
"$t('请输入上一级跟进单')"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('跟进结果')"
prop=
"followMethod"
>
<el-select
v-model=
"form.resultType"
clearable
:placeholder=
"$t('请选择')"
:disabled=
"isView"
>
<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=
"20"
>
<el-form-item
:label=
"$t('目的')"
prop=
"purpose"
>
<el-input
type=
"textarea"
:rows=
"2"
v-model=
"form.purpose"
:placeholder=
"$t('请输入目的')"
maxlength=
"200"
show-word-limit
:disabled=
"isView"
/>
</el-form-item>
</el-col>
<el-col
:span=
"20"
>
<el-form-item
:label=
"$t('跟进情况')"
>
<el-input
rows=
"3"
class=
"text_style"
type=
"textarea"
v-model=
"form.feedback"
maxlength=
"500"
show-word-limit
:disabled=
"isView"
/>
</el-form-item>
</el-col>
<el-col
:span=
"20"
>
<el-form-item
><el-button
size=
"mini"
v-if=
"isView"
type=
"text"
icon=
"el-icon-collection"
@
click=
"$emit(handleCustomerFollowAdd, form)"
v-has-permi=
"['ecw:customer:follow-add-plan']"
>
{{
$t
(
"
增加计划
"
)
}}
</el-button>
</el-form-item>
</el-col>
<el-col
:span=
"20"
>
<el-form-item
:label=
"$t('附件')"
prop=
"attatchment"
>
<FileUpload
:limit=
"5"
:isShowTip=
"true"
v-model=
"form.attatchment"
:fileType=
"fileType"
:disabled=
"isView"
/>
</el-form-item>
</el-col>
<el-col
:span=
"13"
>
<el-form-item
:label=
"$t('下次跟进时间')"
>
<el-date-picker
v-model=
"form.nextTime"
type=
"datetime"
:placeholder=
"$t('请选择')"
:disabled=
"isView"
@
change=
"changeNextTime"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"20"
>
<el-form-item
:label=
"$t('下一步计划')"
prop=
"nextPlan"
>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"form.nextPlan"
:placeholder=
"$t('请输入下一步计划')"
maxlength=
"500"
show-word-limit
:disabled=
"isView"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('创建人')"
prop=
"founder"
>
<el-select
v-model=
"form.creatorName"
disabled
:placeholder=
"$t('请选择')"
>
<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"
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.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"
disabled
:placeholder=
"$t('请选择')"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
v-if=
"isView"
>
<el-button
type=
"warning"
@
click=
"customerFollowClose"
>
{{
$t
(
"
关 闭
"
)
}}
</el-button>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
v-else
>
<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>
</div>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
createCustomerFollow
,
getCustomerFollowPage
,
getCustomerFollowPage2
,
addCustomerFollow
,
getCustomerFollowList
,
editCustomerFollow
}
from
"
@/api/ecw/customerFollow
"
import
{
createCustomerFollow
,
getCustomerFollowPage
,
getCustomerFollowPage2
,
addCustomerFollow
,
getCustomerFollowList
,
editCustomerFollow
,
getFollowupNewNumber
}
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
FileUpload
from
"
@/components/FileUpload/fileUpload
"
;
import
{
formatDate
}
from
"
@/utils/index
"
;
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
FileUpload
from
"
@/components/FileUpload/fileUpload
"
import
{
formatDate
}
from
"
@/utils/index
"
export
default
{
/**
* 客户跟进
...
...
@@ -181,18 +150,12 @@ export default {
/**
* 如果是客户投诉跟进,则id为客户投诉id;如果是客户跟进,则id为客户id
*/
id
:
Number
,
customerId
:
Number
,
customerQuery
:
{
type
:
Boolean
,
default
:
false
},
customerNumber
:
String
,
customerService
:
Number
},
components
:
{
FileUpload
,
CustomerFollowSelectOffer
FileUpload
},
data
()
{
return
{
...
...
@@ -207,7 +170,7 @@ export default {
customerFollow
:
{
dialogVisible
:
false
,
form
:
{
followType
:
'
3
'
followType
:
"
3
"
}
},
offerDialogVisible
:
true
,
...
...
@@ -219,9 +182,8 @@ export default {
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
<=
Date
.
now
()
}
,
}
},
isEdit
:
true
,
followTime
:
[],
nextTime
:
[],
queryParams
:
{
...
...
@@ -235,49 +197,41 @@ export default {
},
computed
:
{
isChinese
()
{
return
this
.
$i18n
.
locale
===
'
zh_CN
'
return
this
.
$i18n
.
locale
===
"
zh_CN
"
}
},
created
()
{
this
.
init
()
// this.resetCustomerFollowForm()
listServiceUser
().
then
(
r
=>
{
// console.log( r.data,'r.data跟进业务')
listServiceUser
().
then
((
r
)
=>
{
this
.
serviceUserList
=
r
.
data
})
listAllSimpl
().
then
((
r
)
=>
{
this
.
allSimplList
=
r
.
data
;
});
// this.getCustomerFollowList()
// this.reset()
this
.
allSimplList
=
r
.
data
})
},
methods
:
{
init
()
{
if
(
!!
this
.
customerId
)
getCustomerContactsListByCustomer
({
customerId
:
this
.
customerId
}).
then
(
r
=>
{
this
.
customerContactsList
=
r
.
data
// this.form.customerId = this.customerId
// this.form.bizId = this.id
})
if
(
!!
this
.
customerId
)
getCustomerContactsListByCustomer
({
customerId
:
this
.
customerId
}).
then
((
r
)
=>
{
this
.
customerContactsList
=
r
.
data
})
},
getOfferList
()
{
getOfferPage
(
this
.
queryParams
).
then
(
response
=>
{
this
.
offerList
=
response
.
data
.
list
;
this
.
offerTotal
=
response
.
data
.
total
;
})
;
getOfferPage
(
this
.
queryParams
).
then
(
(
response
)
=>
{
this
.
offerList
=
response
.
data
.
list
this
.
offerTotal
=
response
.
data
.
total
})
},
handleFollowType
(
val
)
{
console
.
log
(
val
)
if
(
val
==
'
2
'
)
{
this
.
$refs
[
'
customerFollowSelectOffer
'
].
offerDialogVisible
=
true
if
(
val
==
"
2
"
)
{
this
.
$refs
[
"
customerFollowSelectOffer
"
].
offerDialogVisible
=
true
}
else
{
this
.
form
.
offerId
=
undefined
}
},
selectOffer
(
offerId
)
{
this
.
form
.
offerId
=
offerId
},
reset
()
{
this
.
form
=
{
attatchment
:
undefined
,
...
...
@@ -285,6 +239,7 @@ export default {
contactName
:
undefined
,
contactPhone
:
undefined
,
customerId
:
this
.
customerId
,
customerNumber
:
this
.
customerNumber
,
feedback
:
undefined
,
followMethod
:
undefined
,
followTime
:
new
Date
().
getTime
(),
...
...
@@ -303,7 +258,7 @@ export default {
createTime
:
new
Date
().
getTime
(),
updaterName
:
this
.
$store
.
getters
.
userId
,
updateTime
:
new
Date
().
getTime
()
}
;
}
},
changeNextTime
(
val
)
{
if
(
val
)
{
...
...
@@ -317,7 +272,7 @@ export default {
},
changeContactUser
(
val
)
{
if
(
val
)
{
for
(
const
item
of
this
.
customerContactsList
)
{
for
(
const
item
of
this
.
customerContactsList
)
{
if
(
item
.
id
==
val
)
{
this
.
form
.
contactName
=
item
.
name
// this.form.contactPhone = `+${item.areaCode}${item.phoneNew}`
...
...
@@ -331,38 +286,38 @@ export default {
},
customerFollowSubmit
(
status
)
{
console
.
log
(
this
.
form
)
this
.
$refs
[
"
customerFollowForm
"
].
validate
(
valid
=>
{
this
.
$refs
[
"
customerFollowForm
"
].
validate
(
(
valid
)
=>
{
if
(
!
valid
)
{
return
}
if
(
!
this
.
form
.
followType
)
{
this
.
$modal
.
msgError
(
this
.
$t
(
"
请选择跟进类型
"
))
;
this
.
$modal
.
msgError
(
this
.
$t
(
"
请选择跟进类型
"
))
return
}
if
(
!
this
.
form
.
followTime
)
{
this
.
$modal
.
msgError
(
this
.
$t
(
'
请选择跟进时间
'
));
this
.
$modal
.
msgError
(
this
.
$t
(
"
请选择跟进时间
"
))
return
}
if
(
!
this
.
form
.
contactName
)
{
this
.
$modal
.
msgError
(
this
.
$t
(
'
请选择联系人
'
));
this
.
$modal
.
msgError
(
this
.
$t
(
"
请选择联系人
"
))
return
}
if
(
!
this
.
form
.
followUserId
)
{
this
.
$modal
.
msgError
(
this
.
$t
(
'
请选择客户经理
'
));
this
.
$modal
.
msgError
(
this
.
$t
(
"
请选择客户经理
"
))
return
}
if
(
!
this
.
form
.
followMethod
)
{
this
.
$modal
.
msgError
(
this
.
$t
(
'
请选择跟进方式
'
));
this
.
$modal
.
msgError
(
this
.
$t
(
"
请选择跟进方式
"
))
return
}
if
(
status
===
0
)
{
this
.
saveSubmitData
(
status
)
}
else
{
this
.
$confirm
(
this
.
$t
(
'
提交后无法修改
'
),
this
.
$t
(
'
提示
'
),
{
confirmButtonText
:
this
.
$t
(
'
确定
'
),
cancelButtonText
:
this
.
$t
(
'
取消
'
),
type
:
'
warning
'
this
.
$confirm
(
this
.
$t
(
"
提交后无法修改
"
),
this
.
$t
(
"
提示
"
),
{
confirmButtonText
:
this
.
$t
(
"
确定
"
),
cancelButtonText
:
this
.
$t
(
"
取消
"
),
type
:
"
warning
"
}).
then
(()
=>
{
this
.
saveSubmitData
(
status
)
})
...
...
@@ -376,68 +331,24 @@ export default {
followTime
:
this
.
form
.
followTime
?
formatDate
(
this
.
form
.
followTime
)
:
undefined
,
nextTime
:
this
.
form
.
nextTime
?
formatDate
(
this
.
form
.
nextTime
)
:
undefined
,
status
}).
then
(
r
=>
{
}).
then
(
(
r
)
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
操作成功
"
))
this
.
$emit
(
'
refresh
'
)
this
.
$emit
(
"
refresh
"
)
this
.
customerFollowClose
()
})
},
goBack
()
{
this
.
$confirm
(
this
.
$t
(
'
是否确认不保存信息
'
),
this
.
$t
(
'
提示
'
),
{
confirmButtonText
:
this
.
$t
(
'
确定
'
),
cancelButtonText
:
this
.
$t
(
'
取消
'
),
type
:
'
warning
'
this
.
$confirm
(
this
.
$t
(
"
是否确认不保存信息
"
),
this
.
$t
(
"
提示
"
),
{
confirmButtonText
:
this
.
$t
(
"
确定
"
),
cancelButtonText
:
this
.
$t
(
"
取消
"
),
type
:
"
warning
"
}).
then
(()
=>
{
this
.
customerFollowClose
()
})
},
customerFollowClose
()
{
// this.resetCustomerFollowForm()
this
.
customerFollow
.
dialogVisible
=
false
},
resetCustomerFollowForm
()
{
this
.
reset
()
// this.$refs.dictType.changeValue(this.customerFollow.form.followType);
this
.
$refs
.
dictMethod
.
changeValue
(
this
.
customerFollow
.
form
.
followMethod
);
},
handleQuery
()
{
this
.
pageNo
=
1
this
.
queryParams
.
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
.
$message
.
info
(
this
.
$t
(
"
操作成功
"
))
this
.
$emit
(
'
refresh
'
)
})
}
else
{
getCustomerFollowPage2
({
bizId
:
this
.
id
,
followType
:
3
,
pageNo
:
this
.
pageNo
,
pageSize
:
this
.
pageSize
}).
then
(
r
=>
{
this
.
$emit
(
'
refresh
'
)
})
}
},
handleView
(
row
)
{
this
.
isView
=
true
this
.
form
=
row
...
...
@@ -445,29 +356,34 @@ export default {
},
handleAdd
()
{
this
.
isView
=
false
this
.
isEdit
=
true
this
.
customerFollow
.
dialogVisible
=
true
this
.
reset
()
},
handleUpdate
(
row
,
flag
)
{
async
handleUpdate
(
row
,
flag
)
{
this
.
isView
=
false
this
.
isEdit
=
flag
this
.
customerFollow
.
dialogVisible
=
true
if
(
flag
)
{
if
(
!
flag
)
{
this
.
form
=
row
}
else
{
let
r
=
await
getFollowupNewNumber
()
console
.
log
(
r
)
this
.
form
=
{
...
row
,
parentNumber
:
row
.
number
parentNumber
:
row
.
number
,
followTime
:
row
.
nextTime
,
nextTime
:
""
,
number
:
r
.
data
,
nextPlan
:
""
}
}
}
,
}
}
}
</
script
>
<
style
scoped
>
.text_style
{
.text_style
{
white-space
:
pre-wrap
;
}
</
style
>
src/views/ecw/customer/edit.vue
View file @
39da2846
<
template
xmlns=
""
>
<el-row
type=
"flex"
style=
"margin: 15px 0"
justify=
"center"
>
<el-row
type=
"flex"
style=
"margin: 15px 0"
justify=
"center"
>
<el-col
:xs=
"24"
:sm=
"24"
:md=
"24"
:lg=
"22"
:xl=
"20"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"150px"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span
class=
"title-text"
>
{{
$t
(
'
基本
'
)
}}
</span>
<el-button
style=
"float: right"
size=
"small"
type=
"primary"
@
click=
"showBaseFlag = !showBaseFlag"
>
{{
showBaseFlag
?
$t
(
'
隐藏
'
)
:
$t
(
'
更多
'
)
}}
</el-button
>
<span
class=
"title-text"
>
{{
$t
(
"
基本
"
)
}}
</span>
<el-button
style=
"float: right"
size=
"small"
type=
"primary"
@
click=
"showBaseFlag = !showBaseFlag"
>
{{
showBaseFlag
?
$t
(
"
隐藏
"
)
:
$t
(
"
更多
"
)
}}
</el-button>
</div>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('客户名称')"
prop=
"name"
>
<el-input
v-model=
"form.name"
:placeholder=
"$t('请输入客户名称')"
/>
<el-input
v-model=
"form.name"
:placeholder=
"$t('请输入客户名称')"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('客户英文名称')"
>
<el-input
v-model=
"form.nameEn"
:placeholder=
"$t('请输入客户英文名称')"
></el-input>
<el-input
v-model=
"form.nameEn"
:placeholder=
"$t('请输入客户英文名称')"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('客户来源')"
prop=
"source"
>
<el-select
v-model=
"form.source"
:placeholder=
"$t('请选择客户来源')"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key=
"dict.value"
:label=
"isChinese ? dict.label : dict.labelEn"
:value=
"parseInt(dict.value)"
/>
<el-select
v-model=
"form.source"
:placeholder=
"$t('请选择客户来源')"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
: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=
"country"
>
<el-select
filterable
clearable
v-model=
"form.country"
:placeholder=
"$t('请选择国家')"
>
<el-option
v-for=
"dict in countryList"
:key=
"dict.id"
:label=
"isChinese ? dict.nameZh : dict.nameEn"
:value=
"parseInt(dict.id)"
/>
<el-select
filterable
clearable
v-model=
"form.country"
:placeholder=
"$t('请选择国家')"
>
<el-option
v-for=
"dict in countryList"
:key=
"dict.id"
:label=
"isChinese ? dict.nameZh : dict.nameEn"
:value=
"parseInt(dict.id)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('客户经理')"
prop=
"customerService"
>
<el-select
v-model=
"form.customerService"
:placeholder=
"$t('请选择客户经理')"
:disabled=
"
(customerId !== '0' &&
$route.name !== 'allocatedCustomerEdit') ||
isCustomerServiceConfirmed
"
>
<el-option
v-for=
"item in !(
(customerId !== '0' &&
$route.name !== 'allocatedCustomerEdit') ||
isCustomerServiceConfirmed
)
? serviceUserList
: allSimplList"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.id"
/>
<el-select
v-model=
"form.customerService"
:placeholder=
"$t('请选择客户经理')"
:disabled=
"(customerId !== '0' && $route.name !== 'allocatedCustomerEdit') || isCustomerServiceConfirmed"
>
<el-option
v-for=
"item in !((customerId !== '0' && $route.name !== 'allocatedCustomerEdit') || isCustomerServiceConfirmed) ? serviceUserList : allSimplList"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('推介人')"
prop=
"promoter"
>
<el-select
clearable
remote
:remote-method=
"remoteMethod"
v-model=
"form.promoter"
:placeholder=
"$t('请输入推介人')"
filterable
>
<el-option
v-for=
"item in customerSelectFn"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
<el-select
clearable
remote
:remote-method=
"remoteMethod"
v-model=
"form.promoter"
:placeholder=
"$t('请输入推介人')"
filterable
>
<el-option
v-for=
"item in customerSelectFn"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('备注')"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
:placeholder=
"$t('请输入备注')"
/>
<el-input
v-model=
"form.remarks"
:placeholder=
"$t('请输入备注')"
/>
</el-form-item>
<el-form-item
:label=
"$t('询盘信息')"
>
<el-input
show-word-limit
v-model=
"form.inquiry"
:rows=
"3"
type=
"textarea"
:maxlength=
"500"
></el-input>
<el-input
show-word-limit
v-model=
"form.inquiry"
:rows=
"3"
type=
"textarea"
:maxlength=
"500"
></el-input>
</el-form-item>
</el-col>
...
...
@@ -141,33 +66,19 @@
<el-row
:gutter=
"10"
v-show=
"showBaseFlag"
>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('联系地址')"
prop=
"address"
>
<el-input
v-model=
"form.address"
:placeholder=
"$t('请输入联系地址')"
/>
<el-input
v-model=
"form.address"
:placeholder=
"$t('请输入联系地址')"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('客户生日')"
prop=
"birthday"
>
<el-date-picker
v-model=
"form.birthday"
type=
"date"
value-format=
"timestamp"
:placeholder=
"$t('请输入客户生日')"
>
</el-date-picker>
<el-date-picker
v-model=
"form.birthday"
type=
"date"
value-format=
"timestamp"
:placeholder=
"$t('请输入客户生日')"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('业绩类型')"
>
<el-switch
v-model=
"form.isNew"
disabled
active-text=
"新客户"
inactive-text=
"老客户"
>
</el-switch>
<el-switch
v-model=
"form.isNew"
disabled
active-text=
"新客户"
inactive-text=
"老客户"
>
</el-switch>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
...
...
@@ -178,158 +89,76 @@
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('客户等级')"
prop=
"level"
>
<el-select
v-model=
"form.level"
:placeholder=
"$t('请选择客户等级')"
disabled
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key=
"dict.value"
:label=
"isChinese ? dict.label : dict.labelEn"
:value=
"parseInt(dict.value)"
/>
<el-select
v-model=
"form.level"
:placeholder=
"$t('请选择客户等级')"
disabled
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
: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=
"status"
>
<el-select
v-model=
"form.status"
:placeholder=
"$t('请选择客户状态')"
disabled
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_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_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-date-picker
v-model=
"form.firstDealTime"
type=
"datetime"
:placeholder=
"$t('请选择')"
disabled
/>
<el-date-picker
v-model=
"form.firstDealTime"
type=
"datetime"
:placeholder=
"$t('请选择')"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('掉入公海时间')"
>
<el-date-picker
v-model=
"enterOpenSeaTime"
type=
"datetime"
:placeholder=
"$t('请选择')"
disabled
/>
<el-date-picker
v-model=
"enterOpenSeaTime"
type=
"datetime"
:placeholder=
"$t('请选择')"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('获取方式')"
prop=
"getMethod"
>
<el-select
v-model=
"form.getMethod"
:placeholder=
"$t('请选择')"
disabled
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_GET_METHOD)"
:key=
"dict.value"
:label=
"isChinese ? dict.label : dict.labelEn"
:value=
"parseInt(dict.value)"
/>
<el-select
v-model=
"form.getMethod"
:placeholder=
"$t('请选择')"
disabled
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_GET_METHOD)"
: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=
"createFrom"
>
<el-select
v-model=
"form.createFrom"
:placeholder=
"$t('请选择')"
disabled
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_FROM)"
:key=
"dict.value"
:label=
"isChinese ? dict.label : dict.labelEn"
:value=
"parseInt(dict.value)"
/>
<el-select
v-model=
"form.createFrom"
:placeholder=
"$t('请选择')"
disabled
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_FROM)"
: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-date-picker
v-model=
"form.catchTime"
type=
"datetime"
:placeholder=
"$t('请选择')"
disabled
/>
<el-date-picker
v-model=
"form.catchTime"
type=
"datetime"
:placeholder=
"$t('请选择')"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('归属时间')"
>
<el-date-picker
v-model=
"form.customerServiceConfirmedTime"
type=
"datetime"
disabled
:placeholder=
"$t('请选择')"
>
</el-date-picker>
<el-date-picker
v-model=
"form.customerServiceConfirmedTime"
type=
"datetime"
disabled
:placeholder=
"$t('请选择')"
>
</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-option>
<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>
<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-option>
<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>
<el-date-picker
v-model=
"form.updateTime"
type=
"datetime"
value-format=
"timestamp"
disabled
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -337,54 +166,25 @@
<el-card
style=
"margin-top: 15px"
>
<div
slot=
"header"
class=
"clearfix"
>
<span
class=
"title-text"
>
{{
$t
(
'
发货信息
'
)
}}
</span>
<el-button
style=
"float: right"
size=
"small"
type=
"primary"
@
click=
"showShippingFlag = !showShippingFlag"
>
{{
showShippingFlag
?
$t
(
'
隐藏
'
)
:
$t
(
'
更多
'
)
}}
</el-button
>
<span
class=
"title-text"
>
{{
$t
(
"
发货信息
"
)
}}
</span>
<el-button
style=
"float: right"
size=
"small"
type=
"primary"
@
click=
"showShippingFlag = !showShippingFlag"
>
{{
showShippingFlag
?
$t
(
"
隐藏
"
)
:
$t
(
"
更多
"
)
}}
</el-button>
</div>
<el-row
:gutter=
"10"
v-show=
"showShippingFlag"
>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('客户类别')"
prop=
"type"
>
<dict-selector
:type=
"DICT_TYPE.CUSTOMER_TYPE"
form-type=
"checkbox"
multiple
v-model=
"form.type"
></dict-selector>
<dict-selector
:type=
"DICT_TYPE.CUSTOMER_TYPE"
form-type=
"checkbox"
multiple
v-model=
"form.type"
></dict-selector>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('角色')"
>
<dict-selector
:type=
"DICT_TYPE.CUSTOMER_ROLE"
form-type=
"checkbox"
multiple
v-model=
"form.roles"
></dict-selector>
<dict-selector
:type=
"DICT_TYPE.CUSTOMER_ROLE"
form-type=
"checkbox"
multiple
v-model=
"form.roles"
></dict-selector>
</el-form-item>
</el-col>
<el-col
:span=
"13"
v-show=
"form.roles && form.roles.indexOf('2') !== -1"
>
<el-col
:span=
"13"
v-show=
"form.roles && form.roles.indexOf('2') !== -1"
>
<el-form-item
:label=
"$t('所属代理')"
prop=
"agentId"
>
<el-select
filterable
clearable
v-model=
"form.agentId"
:placeholder=
"$t('请选择所属代理')"
>
<el-option
v-for=
"item in serviceUserList"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.id"
/>
<el-select
filterable
clearable
v-model=
"form.agentId"
:placeholder=
"$t('请选择所属代理')"
>
<el-option
v-for=
"item in serviceUserList"
:key=
"item.id"
:label=
"item.nickname"
:value=
"item.id"
/>
</el-select>
</el-form-item>
</el-col>
...
...
@@ -393,79 +193,36 @@
<el-form-item
:label=
"$t('出货渠道')"
prop=
"transportType"
>
<!--
<dict-selector
:type=
"DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE"
form-type=
"checkbox"
multiple
v-model=
"form.transportType"
></dict-selector>
-->
<el-checkbox-group
v-model=
"form.transportType"
>
<el-checkbox
v-for=
"item in getDictDatas(
DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE
)"
:key=
"item.value"
:label=
"item.value"
:disabled=
"[3].includes(+item.value)"
>
{{
item
.
label
}}
</el-checkbox
>
<el-checkbox
v-for=
"item in getDictDatas(DICT_TYPE.ECW_CUSTOMER_TRANSPORT_TYPE)"
:key=
"item.value"
:label=
"item.value"
:disabled=
"[3].includes(+item.value)"
>
{{
item
.
label
}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('常用提货网点')"
prop=
"pickupPoints"
>
<el-select
multiple
v-model=
"form.pickupPoints"
>
<el-option
v-for=
"item in getNodeLists"
:key=
"item.id"
:value=
"item.id"
:label=
"isChinese ? item.titleZh : item.titleEn"
></el-option>
<el-option
v-for=
"item in getNodeLists"
:key=
"item.id"
:value=
"item.id"
:label=
"isChinese ? item.titleZh : item.titleEn"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('业务国家')"
prop=
"busiCountryIds"
>
<el-select
multiple
clearable
v-model=
"form.busiCountryIds"
:placeholder=
"$t('请选择')"
>
<el-option
v-for=
"dict in countryList"
:key=
"dict.id"
:label=
"isChinese ? dict.nameZh : dict.nameEn"
:value=
"parseInt(dict.id)"
/>
<el-select
multiple
clearable
v-model=
"form.busiCountryIds"
:placeholder=
"$t('请选择')"
>
<el-option
v-for=
"dict in countryList"
:key=
"dict.id"
:label=
"isChinese ? dict.nameZh : dict.nameEn"
:value=
"parseInt(dict.id)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('主营类别')"
prop=
"productType"
>
<el-form-item
:label=
"$t('主营类别')"
prop=
"productType
s
"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"11"
>
<el-select
@
change=
"change"
v-model=
"form.productType"
:placeholder=
"$t('请选择产品类别')"
>
<el-option
:label=
"isChinese ? item.titleZh : item.titleEn"
:value=
"item.id"
v-for=
"item in productTypeList"
:key=
"item.id"
/>
<el-select
@
change=
"change"
v-model=
"form.productTypes"
multiple
:placeholder=
"$t('请选择产品类别')"
>
<el-option
:label=
"isChinese ? item.titleZh : item.titleEn"
:value=
"item.id"
v-for=
"item in productTypeList"
:key=
"item.id"
/>
</el-select>
</el-col>
<el-col
:span=
"11"
>
<el-select
multiple
filterable
clearable
v-model=
"form.productIds"
:placeholder=
"$t('请选择')"
>
<el-option
:label=
"item.titleZh"
:value=
"parseInt(item.id)"
v-for=
"item in productList"
:key=
"item.id"
/>
<el-select
multiple
filterable
clearable
v-model=
"form.productIds"
:placeholder=
"$t('请选择')"
>
<el-option
:label=
"item.titleZh"
:value=
"parseInt(item.id)"
v-for=
"item in productList"
:key=
"item.id"
/>
</el-select>
</el-col>
</el-row>
...
...
@@ -479,22 +236,9 @@
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('主要竞争对手')"
prop=
"competitorIds"
>
<el-select
clearable
v-model=
"form.competitorIds"
:placeholder=
"$t('请选择')"
@
change=
"changeCompetitor"
>
<el-option
v-for=
"item in competitorList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
<el-option
:label=
"$t('其他')"
:value=
"0"
/>
<el-select
clearable
v-model=
"form.competitorIds"
:placeholder=
"$t('请选择')"
@
change=
"changeCompetitor"
>
<el-option
v-for=
"item in competitorList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
<el-option
:label=
"$t('其他')"
:value=
"0"
/>
</el-select>
</el-form-item>
</el-col>
...
...
@@ -503,61 +247,36 @@
<el-input-number
v-model=
"form.numYearly"
:min=
"1"
/>
</el-form-item>
</el-col>
</el-row>
</el-card>
</el-form>
<el-card
class=
"box-card"
style=
"margin-top: 15px
;
"
>
<el-card
class=
"box-card"
style=
"margin-top: 15px"
>
<div
slot=
"header"
class=
"clearfix"
>
<span
class=
"title-text"
>
{{
$t
(
"
联系人
"
)
}}
</span>
<el-button
style=
"float: right"
size=
"small"
type=
"primary"
@
click=
"handleAddContact"
>
+
</el-button
>
<el-button
style=
"float: right"
size=
"small"
type=
"primary"
@
click=
"handleAddContact"
>
+
</el-button>
</div>
<el-form
ref=
"contactForm"
:rules=
"contactRules"
:model=
"form"
>
<el-table
:data=
"form.customerContacts"
style=
"width: 100%"
>
<el-table-column
prop=
"department"
:label=
"$t('部门')"
width=
""
>
<template
v-slot=
"
{ row }">
<el-form-item
label=
""
>
<el-input
v-model=
"row.department"
:placeholder=
"$t('请输入部门')"
size=
"mini"
/>
<el-input
v-model=
"row.department"
:placeholder=
"$t('请输入部门')"
size=
"mini"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
prop=
"position"
:label=
"$t('职位')"
width=
""
>
<
template
v-slot=
"{ row }"
>
<el-form-item
label=
""
>
<el-input
v-model=
"row.position"
:placeholder=
"$t('请输入职位')"
size=
"mini"
/>
<el-input
v-model=
"row.position"
:placeholder=
"$t('请输入职位')"
size=
"mini"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
prop=
"name"
:label=
"$t('联系人')"
>
<
template
slot=
"header"
>
{{
$t
(
"
联系人
"
)
}}
<span
style=
"color: #ff0000"
>
*
</span>
</
template
>
<
template
slot=
"header"
>
{{
$t
(
"
联系人
"
)
}}
<span
style=
"color: #ff0000"
>
*
</span>
</
template
>
<
template
v-slot=
"{ row, cellValue, $index }"
>
<el-form-item
:rules=
"contactRules.name"
:prop=
"'customerContacts.' + $index + '.name'"
label=
""
>
<el-input
v-model=
"row.name"
:placeholder=
"$t('请输入联系人')"
size=
"mini"
/>
<el-form-item
:rules=
"contactRules.name"
:prop=
"'customerContacts.' + $index + '.name'"
label=
""
>
<el-input
v-model=
"row.name"
:placeholder=
"$t('请输入联系人')"
size=
"mini"
/>
</el-form-item>
</
template
>
</el-table-column>
...
...
@@ -567,62 +286,25 @@
</
template
>
<
template
v-slot=
"{ row, cellValue, $index }"
>
<el-form-item
label=
""
>
<el-input
v-model=
"row.nameEn"
:placeholder=
"$t('请输入联系人英文名称')"
size=
"mini"
/>
<el-input
v-model=
"row.nameEn"
:placeholder=
"$t('请输入联系人英文名称')"
size=
"mini"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
prop=
"areaCode"
:label=
"$t('区号')"
>
<
template
slot=
"header"
>
{{
$t
(
"
区号
"
)
}}
<span
style=
"color: #ff0000"
>
*
</span>
</
template
>
<
template
slot=
"header"
>
{{
$t
(
"
区号
"
)
}}
<span
style=
"color: #ff0000"
>
*
</span>
</
template
>
<
template
v-slot=
"{ row, cellValue, $index }"
>
<el-form-item
:rules=
"contactRules.areaCode"
:prop=
"'customerContacts.' + $index + '.areaCode'"
label=
""
>
<el-select
v-model=
"row.areaCode"
:placeholder=
"$t('请选择区号')"
filterable
size=
"mini"
>
<el-option
v-for=
"(item, index) in countryList"
:key=
"index"
:label=
"
item.nameShort +
(isChinese ? item.nameZh : item.nameEn) +
'(' +
item.tel +
')'
"
:value=
"item.tel"
/>
<el-form-item
:rules=
"contactRules.areaCode"
:prop=
"'customerContacts.' + $index + '.areaCode'"
label=
""
>
<el-select
v-model=
"row.areaCode"
:placeholder=
"$t('请选择区号')"
filterable
size=
"mini"
>
<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>
</
template
>
</el-table-column>
<el-table-column
prop=
"phoneNew"
:label=
"$t('联系方式')"
>
<
template
slot=
"header"
>
{{
$t
(
"
联系方式
"
)
}}
<span
style=
"color: #ff0000"
>
*
</span>
</
template
>
<
template
slot=
"header"
>
{{
$t
(
"
联系方式
"
)
}}
<span
style=
"color: #ff0000"
>
*
</span>
</
template
>
<
template
v-slot=
"{ row, cellValue, $index }"
>
<el-form-item
:rules=
"contactRules.phoneNew"
:prop=
"'customerContacts.' + $index + '.phoneNew'"
label=
""
>
<el-input
v-model.trim=
"row.phoneNew"
:placeholder=
"$t('请输入联系方式')"
size=
"mini"
@
input=
"row.phoneNew=row.phoneNew.replace(/\s+/g, '')"
/>
<el-form-item
:rules=
"contactRules.phoneNew"
:prop=
"'customerContacts.' + $index + '.phoneNew'"
label=
""
>
<el-input
v-model.trim=
"row.phoneNew"
:placeholder=
"$t('请输入联系方式')"
size=
"mini"
@
input=
"row.phoneNew = row.phoneNew.replace(/\s+/g, '')"
/>
</el-form-item>
</
template
>
</el-table-column>
...
...
@@ -639,67 +321,26 @@
<el-table-column
prop=
"social"
:label=
"$t('社交软件')"
>
<
template
v-slot=
"{ row }"
>
<el-form-item
label=
""
>
<el-select
v-model=
"row.social"
:placeholder=
"$t('请选择社交软件')"
size=
"mini"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key=
"dict.value"
:label=
"isChinese ? dict.label : dict.labelEn"
:value=
"parseInt(dict.value)"
/>
<el-select
v-model=
"row.social"
:placeholder=
"$t('请选择社交软件')"
size=
"mini"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key=
"dict.value"
:label=
"isChinese ? dict.label : dict.labelEn"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
prop=
"socialNumber"
:label=
"$t('社交软件号码')"
>
<el-table-column
prop=
"socialNumber"
:label=
"$t('社交软件号码')"
>
<
template
v-slot=
"{ row }"
>
<el-form-item
label=
""
>
<el-input
v-model=
"row.socialNumber"
:placeholder=
"$t('请输入社交软件号码')"
size=
"mini"
/>
<el-input
v-model=
"row.socialNumber"
:placeholder=
"$t('请输入社交软件号码')"
size=
"mini"
/>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
width=
"260px"
prop=
"email"
:label=
"$t('邮箱')"
>
<
template
v-slot=
"{ row }"
>
<el-form-item
v-for=
"(item, index) in row.email"
:key=
"index"
label=
""
>
<el-form-item
v-for=
"(item, index) in row.email"
:key=
"index"
label=
""
>
<div
style=
"display: flex; align-items: center"
>
<el-input
v-model=
"row.email[index]"
:placeholder=
"$t('请输入邮箱')"
size=
"mini"
/>
<el-button
@
click=
"deleteEmail(row.email, index)"
v-if=
"row.email.length !== 1"
style=
"height: 25px; margin-left: 5px"
type=
"danger"
size=
"mini"
>
删除
</el-button
>
<el-button
@
click=
"addEmail(row.email)"
style=
"height: 25px; margin-left: 5px"
v-if=
"
index === row.email.length - 1 &&
row.email.length
<
5
"
size=
"mini"
type=
"primary"
>
添加
</el-button
>
<el-input
v-model=
"row.email[index]"
:placeholder=
"$t('请输入邮箱')"
size=
"mini"
/>
<el-button
@
click=
"deleteEmail(row.email, index)"
v-if=
"row.email.length !== 1"
style=
"height: 25px; margin-left: 5px"
type=
"danger"
size=
"mini"
>
删除
</el-button>
<el-button
@
click=
"addEmail(row.email)"
style=
"height: 25px; margin-left: 5px"
v-if=
"index === row.email.length - 1 && row.email.length
<
5
"
size=
"mini"
type=
"primary"
>
添加
</el-button>
</div>
</el-form-item>
</
template
>
...
...
@@ -707,18 +348,8 @@
<el-table-column
prop=
"isDefault"
:label=
"$t('设为默认')"
>
<
template
v-slot=
"{ row, column, $index }"
>
<el-form-item
label=
""
>
<el-select
v-model=
"row.isDefault"
:placeholder=
"$t('设为默认')"
@
change=
"handleDefaultChange($index)"
size=
"mini"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key=
"dict.value"
:label=
"isChinese ? dict.label : dict.labelEn"
:value=
"Number(dict.value)"
/>
<el-select
v-model=
"row.isDefault"
:placeholder=
"$t('设为默认')"
@
change=
"handleDefaultChange($index)"
size=
"mini"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key=
"dict.value"
:label=
"isChinese ? dict.label : dict.labelEn"
:value=
"Number(dict.value)"
/>
</el-select>
</el-form-item>
</
template
>
...
...
@@ -726,12 +357,7 @@
<el-table-column
prop=
"name"
:label=
"$t('操作')"
>
<
template
v-slot=
"{ row, column, $index }"
>
<el-form-item
label=
""
>
<el-button
type=
"danger"
@
click=
"handleDeleteContact($index)"
size=
"mini"
>
{{
$t
(
"
删除
"
)
}}
</el-button
>
<el-button
type=
"danger"
@
click=
"handleDeleteContact($index)"
size=
"mini"
>
{{
$t
(
"
删除
"
)
}}
</el-button>
</el-form-item>
</
template
>
</el-table-column>
...
...
@@ -739,18 +365,12 @@
</el-form>
</el-card>
<el-card
class=
"box-card"
style=
"margin-top: 15px
;
"
>
<el-card
class=
"box-card"
style=
"margin-top: 15px"
>
<div
slot=
"header"
class=
"clearfix"
>
<span
class=
"title-text"
>
{{ $t('设置') }}
</span>
<el-button
style=
"float: right"
size=
"small"
type=
"primary"
@
click=
"showSettingFlag = !showSettingFlag"
>
{{showSettingFlag ? $t('隐藏') : $t('更多')}}
</el-button
>
<span
class=
"title-text"
>
{{ $t("设置") }}
</span>
<el-button
style=
"float: right"
size=
"small"
type=
"primary"
@
click=
"showSettingFlag = !showSettingFlag"
>
{{ showSettingFlag ? $t("隐藏") : $t("更多") }}
</el-button>
</div>
<el-form
ref=
"setForm"
label-width=
"150px"
v-if=
"showSettingFlag"
>
<el-form
ref=
"setForm"
label-width=
"150px"
v-if=
"showSettingFlag"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('是否显示提单价格')"
prop=
"isShowTidanPrice"
>
...
...
@@ -759,22 +379,14 @@
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('到仓确认')"
prop=
"arrivalConfirm"
>
<el-switch
v-model=
"form.arrivalConfirm"
:active-value=
"1"
:inactive-value=
"0"
/>
<el-switch
v-model=
"form.arrivalConfirm"
:active-value=
"1"
:inactive-value=
"0"
/>
</el-form-item>
</el-col>
<el-col
:span=
"13"
>
<el-form-item
:label=
"$t('重货标准')"
prop=
"weightUnit"
>
<el-switch
v-model=
"showZhong"
/>
<el-input
v-model=
"form.weightUnit"
:placeholder=
"$t('请输入重货标准')"
v-show=
"showZhong"
>
<el-input
v-model=
"form.weightUnit"
:placeholder=
"$t('请输入重货标准')"
v-show=
"showZhong"
>
<
template
slot=
"append"
>
kg/cbm
</
template
>
</el-input>
</el-form-item>
...
...
@@ -782,24 +394,14 @@
<el-col
:span=
"24"
v-show=
"showZhong"
>
<el-form-item
:label=
"$t('指定线路')"
prop=
"line"
>
<el-switch
v-model=
"showZhong1"
></el-switch>
<customer-line-table
v-if=
"showZhong1"
:warehouse-list=
"warehouseList"
:import-city-list=
"importCityList"
v-model=
"zhongLines"
:zhong-pao-type=
"1"
></customer-line-table>
<customer-line-table
v-if=
"showZhong1"
:warehouse-list=
"warehouseList"
:import-city-list=
"importCityList"
v-model=
"zhongLines"
:zhong-pao-type=
"1"
></customer-line-table>
</el-form-item>
</el-col>
<el-col
:span=
"13"
>
<el-form-item
:label=
"$t('泡货标准')"
prop=
"lightUnit"
>
<el-switch
v-model=
"showPao"
/>
<el-input
v-model=
"form.lightUnit"
:placeholder=
"$t('请输入泡货标准')"
v-show=
"showPao"
>
<el-input
v-model=
"form.lightUnit"
:placeholder=
"$t('请输入泡货标准')"
v-show=
"showPao"
>
<
template
slot=
"append"
>
kg/cbm
</
template
>
</el-input>
</el-form-item>
...
...
@@ -807,13 +409,7 @@
<el-col
:span=
"24"
v-show=
"showPao"
>
<el-form-item
:label=
"$t('指定线路')"
prop=
"line"
>
<el-switch
v-model=
"showPao1"
></el-switch>
<customer-line-table
v-if=
"showPao1"
:warehouse-list=
"warehouseList"
:import-city-list=
"importCityList"
v-model=
"paoLines"
:zhong-pao-type=
"2"
></customer-line-table>
<customer-line-table
v-if=
"showPao1"
:warehouse-list=
"warehouseList"
:import-city-list=
"importCityList"
v-model=
"paoLines"
:zhong-pao-type=
"2"
></customer-line-table>
</el-form-item>
</el-col>
...
...
@@ -832,146 +428,91 @@
<el-switch
v-model=
"form.defaultBilling"
disabled
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card
class=
"box-card"
style=
"margin-top: 15px
;
"
>
<el-card
class=
"box-card"
style=
"margin-top: 15px"
>
<div
slot=
"header"
class=
"clearfix"
>
<span
class=
"title-text"
>
{{ $t('财务') }}
</span>
<el-button
style=
"float: right"
size=
"small"
type=
"primary"
@
click=
"showFinanceFlag = !showFinanceFlag"
>
{{showFinanceFlag ? $t('隐藏') : $t('更多')}}
</el-button
>
<span
class=
"title-text"
>
{{ $t("财务") }}
</span>
<el-button
style=
"float: right"
size=
"small"
type=
"primary"
@
click=
"showFinanceFlag = !showFinanceFlag"
>
{{ showFinanceFlag ? $t("隐藏") : $t("更多") }}
</el-button>
</div>
<el-form
ref=
"financeForm"
label-width=
"150px"
v-if=
"showFinanceFlag"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('公司名称')"
prop=
"company"
>
<el-input
v-model=
"form.company"
:placeholder=
"$t('请输入公司名称')"
/>
<el-input
v-model=
"form.company"
:placeholder=
"$t('请输入公司名称')"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('公司英文名称')"
>
<el-input
v-model=
"form.companyEn"
:placeholder=
"$t('请输入客户英文名称')"
></el-input>
<el-input
v-model=
"form.companyEn"
:placeholder=
"$t('请输入客户英文名称')"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
v-hasPermi=
"['ecw:customer:edit-card']"
:label=
"$t('身份证号码')"
>
<el-col
:span=
"12"
>
<el-form-item
v-hasPermi=
"['ecw:customer:edit-card']"
:label=
"$t('身份证号码')"
>
<el-input
v-model=
"form.carNo"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
v-hasPermi=
"['ecw:customer:edit-card']"
:label=
"$t('身份证姓名')"
>
<el-form-item
v-hasPermi=
"['ecw:customer:edit-card']"
:label=
"$t('身份证姓名')"
>
<el-input
v-model=
"form.carName"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('结算方式')"
prop=
"balance"
>
<el-select
v-model=
"form.balance"
:placeholder=
"$t('请选择结算方式')"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)"
:key=
"dict.value"
:label=
"isChinese ? dict.label : dict.labelEn"
:value=
"parseInt(dict.value)"
/>
<el-select
v-model=
"form.balance"
:placeholder=
"$t('请选择结算方式')"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)"
: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.payerName"
:placeholder=
"$t('请输入付款人姓名')"
></el-input>
<el-input
v-model=
"form.payerName"
:placeholder=
"$t('请输入付款人姓名')"
></el-input>
</el-form-item>
</el-col>
<h3
style=
"font-size: 15px
;"
>
{{$t('开票信息')
}}
</h3>
<h3
style=
"font-size: 15px
"
>
{{ $t("开票信息")
}}
</h3>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('发票抬头')"
prop=
"invoiceTitle"
>
<el-input
v-model=
"form.invoiceTitle"
:placeholder=
"$t('请输入发票抬头')"
/>
<el-input
v-model=
"form.invoiceTitle"
:placeholder=
"$t('请输入发票抬头')"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('纳税人识别号')"
prop=
"licenseNumber"
>
<el-input
v-model=
"form.licenseNumber"
:placeholder=
"$t('请输入纳税人识别号')"
/>
<el-input
v-model=
"form.licenseNumber"
:placeholder=
"$t('请输入纳税人识别号')"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('开户行')"
prop=
"bank"
>
<el-input
v-model=
"form.bank"
:placeholder=
"$t('请输入开户行')"
/>
<el-input
v-model=
"form.bank"
:placeholder=
"$t('请输入开户行')"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('账户')"
prop=
"bankNumber"
>
<el-input
v-model=
"form.bankNumber"
:placeholder=
"$t('请输入账户')"
/>
<el-input
v-model=
"form.bankNumber"
:placeholder=
"$t('请输入账户')"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('项目')"
prop=
"project"
>
<el-input
v-model=
"form.project"
:placeholder=
"$t('请输入项目')"
/>
<el-input
v-model=
"form.project"
:placeholder=
"$t('请输入项目')"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('开票地址')"
prop=
"billingAddress"
>
<el-input
v-model=
"form.billingAddress"
:placeholder=
"$t('请输入开票地址')"
/>
<el-input
v-model=
"form.billingAddress"
:placeholder=
"$t('请输入开票地址')"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('开票电话')"
prop=
"billingTell"
>
<el-input
v-model=
"form.billingTell"
:placeholder=
"$t('请输入开票电话')"
maxlength=
"50"
/>
<el-input
v-model=
"form.billingTell"
:placeholder=
"$t('请输入开票电话')"
maxlength=
"50"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
:label=
"$t('税率')"
prop=
"taxRate"
>
<el-input
v-model=
"form.taxRate"
:placeholder=
"$t('请输入税率')"
/>
<el-input
v-model=
"form.taxRate"
:placeholder=
"$t('请输入税率')"
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -979,74 +520,41 @@
<el-form
ref=
"bankForm"
:model=
"form"
v-if=
"showFinanceFlag"
>
<el-row
type=
"flex"
class=
"row-bg"
justify=
"space-between"
>
<span
style=
"font-size: 15px; line-height: 30px"
>
{{$t('银行信息')}}
</span>
<el-button
size=
"small"
type=
"primary"
@
click=
"addBankData"
>
+
</el-button
>
<span
style=
"font-size: 15px; line-height: 30px"
>
{{ $t("银行信息") }}
</span>
<el-button
size=
"small"
type=
"primary"
@
click=
"addBankData"
>
+
</el-button>
</el-row>
<el-table
border
:data=
"form.customerBanks"
style=
"margin-top: 10px"
>
<el-table-column
:label=
"$t('序号')"
type=
"index"
></el-table-column>
<el-table-column
:label=
"$t('序号')"
type=
"index"
></el-table-column>
<el-table-column>
<div
slot=
"header"
>
{{ $t("账户名称") }}
<span
style=
"color: red"
>
*
</span>
</div>
<div
slot=
"header"
>
{{ $t("账户名称") }}
<span
style=
"color: red"
>
*
</span></div>
<
template
v-slot=
"{ row, $index }"
>
<el-form-item
:rules=
"
{ required: true, message: $t('请输入账户名称') }"
:prop="'customerBanks.' + $index + '.accountName'"
>
<el-form-item
:rules=
"
{ required: true, message: $t('请输入账户名称') }" :prop="'customerBanks.' + $index + '.accountName'">
<el-input
size=
"mini"
v-model=
"row.accountName"
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('币别')"
>
<div
slot=
"header"
>
{{ $t("币别") }}
<span
style=
"color: red"
>
*
</span>
</div>
<div
slot=
"header"
>
{{ $t("币别") }}
<span
style=
"color: red"
>
*
</span></div>
<
template
v-slot=
"{ row, $index }"
>
<el-form-item
:prop=
"'customerBanks.' + $index + '.currency'"
:rules=
"
{ required: true, message: $t('请输入币别') }"
>
<el-form-item
:prop=
"'customerBanks.' + $index + '.currency'"
:rules=
"
{ required: true, message: $t('请输入币别') }">
<el-select
v-model=
"row.currency"
>
<el-option
v-for=
"item in currecyList"
:label=
"$l(item, 'title')"
:value=
"item.id.toString()"
:key=
"item.id"
></el-option>
<el-option
v-for=
"item in currecyList"
:label=
"$l(item, 'title')"
:value=
"item.id.toString()"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('银行名称')"
>
<div
slot=
"header"
>
{{ $t("银行名称") }}
<span
style=
"color: red"
>
*
</span>
</div>
<div
slot=
"header"
>
{{ $t("银行名称") }}
<span
style=
"color: red"
>
*
</span></div>
<
template
v-slot=
"{ row, $index }"
>
<el-form-item
:prop=
"'customerBanks.' + $index + '.bankName'"
:rules=
"
{ required: true, message: $t('银行名称') }"
>
<el-form-item
:prop=
"'customerBanks.' + $index + '.bankName'"
:rules=
"
{ required: true, message: $t('银行名称') }">
<el-input
v-model=
"row.bankName"
size=
"mini"
></el-input>
</el-form-item>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('银行账户')"
>
<div
slot=
"header"
>
{{ $t("银行账户") }}
<span
style=
"color: red"
>
*
</span>
</div>
<div
slot=
"header"
>
{{ $t("银行账户") }}
<span
style=
"color: red"
>
*
</span></div>
<
template
v-slot=
"{ row, $index }"
>
<el-form-item
:prop=
"`customerBanks.$
{$index}.bankAccount`"
:rules="{ required: true, message: $t('请输入银行账户') }"
>
<el-form-item
:prop=
"`customerBanks.$
{$index}.bankAccount`" :rules="{ required: true, message: $t('请输入银行账户') }">
<el-input
v-model=
"row.bankAccount"
size=
"mini"
></el-input>
</el-form-item>
</
template
>
...
...
@@ -1087,9 +595,7 @@
</el-table-column>
<el-table-column
:label=
"$t('操作')"
>
<
template
v-slot=
"{ $index }"
>
<el-button
@
click=
"deleteBankData($index)"
>
{{
$t
(
"
删除
"
)
}}
</el-button>
<el-button
@
click=
"deleteBankData($index)"
>
{{
$t
(
"
删除
"
)
}}
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -1097,9 +603,7 @@
</el-card>
<div
style=
"margin-top: 15px; text-align: center"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
{{
$t("确 定")
}}
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
{{ $t("确 定") }}
</el-button>
<el-button
@
click=
"cancel"
>
{{ $t("取 消") }}
</el-button>
</div>
</el-col>
...
...
@@ -1107,42 +611,25 @@
</template>
<
script
>
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
upload
from
"
@/components/ImageUpload
"
;
import
{
createCustomer
,
getCustomer
,
getCustomerList
,
getCustomerPage
,
memberUserList
,
updateCustomer
,
userMemberUserList
,
getCustomerLines
,
fillupCustomeInfo
,
getServiceNetwork
,
addCompetitor
,
competitorListAll
}
from
"
@/api/ecw/customer
"
;
import
{
getNodeList
}
from
"
@/api/ecw/node
"
;
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
;
import
{
getProductList
}
from
"
@/api/ecw/product
"
;
import
{
getTradeCityList
}
from
"
@/api/ecw/region
"
;
import
{
getWarehouseList
}
from
"
@/api/ecw/warehouse
"
;
import
CustomerLineTable
from
"
@/components/CustomerLineTable
"
;
import
{
getCustomerSelect
}
from
"
@/api/ecw/customer
"
;
import
{
listAllSimpl
,
listServiceUser
,
listSimpleUsers
,
}
from
"
@/api/system/user
"
;
import
{
getZhongPaoBest
,
getZhongPaoPage
}
from
"
@/api/ecw/zhongPao
"
;
import
{
getCustomerContactsListByCustomer
}
from
"
@/api/ecw/customerContacts
"
;
import
{
getCountryListAll
}
from
"
@/api/ecw/country
"
;
import
Template
from
"
@/views/cms/template
"
;
import
{
validatorMobile
}
from
"
@/api/ecw/validate
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
import
upload
from
"
@/components/ImageUpload
"
import
{
createCustomer
,
getCustomer
,
getCustomerList
,
getCustomerPage
,
memberUserList
,
updateCustomer
,
userMemberUserList
,
getCustomerLines
,
fillupCustomeInfo
,
getServiceNetwork
,
addCompetitor
,
competitorListAll
}
from
"
@/api/ecw/customer
"
import
{
getNodeList
}
from
"
@/api/ecw/node
"
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
import
{
getProductList
}
from
"
@/api/ecw/product
"
import
{
getTradeCityList
}
from
"
@/api/ecw/region
"
import
{
getWarehouseList
}
from
"
@/api/ecw/warehouse
"
import
CustomerLineTable
from
"
@/components/CustomerLineTable
"
import
{
getCustomerSelect
}
from
"
@/api/ecw/customer
"
import
{
listAllSimpl
,
listServiceUser
,
listSimpleUsers
}
from
"
@/api/system/user
"
import
{
getZhongPaoBest
,
getZhongPaoPage
}
from
"
@/api/ecw/zhongPao
"
import
{
getCustomerContactsListByCustomer
}
from
"
@/api/ecw/customerContacts
"
import
{
getCountryListAll
}
from
"
@/api/ecw/country
"
import
Template
from
"
@/views/cms/template
"
import
{
validatorMobile
}
from
"
@/api/ecw/validate
"
// import {customerDropDownList} from "@/api/ecw/customerCommissionInfo";
import
MemberSelector
from
"
@/components/MemberSelector
"
;
import
{
getCurrencyList
}
from
"
@/api/ecw/currency
"
;
import
MemberSelector
from
"
@/components/MemberSelector
"
import
{
getCurrencyList
}
from
"
@/api/ecw/currency
"
export
default
{
name
:
"
EcwCustomerEdit
"
,
...
...
@@ -1151,46 +638,41 @@ export default {
Template
,
upload
,
CustomerLineTable
,
MemberSelector
,
MemberSelector
},
created
()
{
getCurrencyList
().
then
((
response
)
=>
{
this
.
currecyList
=
response
.
data
;
});
this
.
isCustomerServiceConfirmed
=
this
.
$route
.
query
.
isCustomerServiceConfirmed
?
true
:
false
;
this
.
getCustomerSelect
();
this
.
reset
();
this
.
currecyList
=
response
.
data
})
this
.
isCustomerServiceConfirmed
=
this
.
$route
.
query
.
isCustomerServiceConfirmed
?
true
:
false
this
.
getCustomerSelect
()
this
.
reset
()
// this.getUserMemberUserFn()
if
(
this
.
customerId
!==
"
0
"
)
{
let
customerId
=
this
.
customerId
;
let
customerId
=
this
.
customerId
// 编辑客户
this
.
getCustomer
(
this
.
customerId
).
then
(()
=>
{
getCustomerContactsListByCustomer
({
customerId
:
customerId
}).
then
(
(
r
)
=>
{
this
.
form
.
customerContacts
=
r
.
data
;
this
.
form
.
customerContacts
.
forEach
((
item
)
=>
{
if
(
item
.
email
)
{
item
.
email
=
item
.
email
.
split
(
"
,
"
);
}
else
{
item
.
email
=
[
""
];
}
});
}
);
getCustomerContactsListByCustomer
({
customerId
:
customerId
}).
then
((
r
)
=>
{
this
.
form
.
customerContacts
=
r
.
data
this
.
form
.
customerContacts
.
forEach
((
item
)
=>
{
if
(
item
.
email
)
{
item
.
email
=
item
.
email
.
split
(
"
,
"
)
}
else
{
item
.
email
=
[
""
]
}
})
})
if
(
this
.
form
.
promoter
)
{
getCustomerList
({
ids
:
this
.
form
.
promoter
}).
then
((
r
)
=>
{
this
.
recommended
=
r
.
data
;
})
;
this
.
recommended
=
r
.
data
})
}
// 打开重泡货开关
if
(
this
.
form
.
weightUnit
)
{
this
.
showZhong
=
true
;
this
.
showZhong
=
true
}
if
(
this
.
form
.
lightUnit
)
{
this
.
showPao
=
true
;
this
.
showPao
=
true
}
// 掉入公海时间
this
.
enterOpenSeaTime
=
this
.
form
.
estimateEnterOpenSeaTime
||
this
.
form
.
enterOpenSeaTime
||
undefined
...
...
@@ -1198,46 +680,46 @@ export default {
if
(
customerId
)
{
// 获取重泡货路线
getCustomerLines
(
customerId
).
then
((
res
)
=>
{
this
.
zhongLines
=
res
.
data
.
filter
((
item
)
=>
item
.
zhongPaoType
==
1
)
;
this
.
paoLines
=
res
.
data
.
filter
((
item
)
=>
item
.
zhongPaoType
==
2
)
;
if
(
this
.
zhongLines
.
length
)
this
.
showZhong1
=
true
;
if
(
this
.
paoLines
.
length
)
this
.
showPao1
=
true
;
this
.
zhongLines
=
res
.
data
.
filter
((
item
)
=>
item
.
zhongPaoType
==
1
)
this
.
paoLines
=
res
.
data
.
filter
((
item
)
=>
item
.
zhongPaoType
==
2
)
if
(
this
.
zhongLines
.
length
)
this
.
showZhong1
=
true
if
(
this
.
paoLines
.
length
)
this
.
showPao1
=
true
// /admin-api/customer-line/get-by-customer
// /admin-api/customer-line/get-by-customer?customerId=29564
})
;
})
}
})
;
})
}
else
{
this
.
getZhongPao
()
;
this
.
getZhongPao
()
// 新建客户
this
.
handleAddContact
()
;
this
.
handleAddContact
()
if
(
this
.
isCustomerServiceConfirmed
)
{
this
.
form
.
customerService
=
this
.
userId
;
this
.
form
.
customerService
=
this
.
userId
}
}
getNodeList
().
then
((
r
)
=>
{
this
.
getNodeLists
=
r
.
data
;
})
;
this
.
getNodeLists
=
r
.
data
})
getProductTypeList
().
then
((
r
)
=>
{
this
.
productTypeList
=
r
.
data
;
})
;
this
.
productTypeList
=
r
.
data
})
getTradeCityList
({
type
:
1
}).
then
((
r
)
=>
{
this
.
importCityList
=
r
.
data
.
filter
((
item
)
=>
item
.
type
===
"
1
"
)
;
})
;
this
.
importCityList
=
r
.
data
.
filter
((
item
)
=>
item
.
type
===
"
1
"
)
})
getWarehouseList
().
then
((
r
)
=>
{
this
.
warehouseList
=
r
.
data
;
})
;
this
.
warehouseList
=
r
.
data
})
listServiceUser
().
then
((
r
)
=>
{
this
.
serviceUserList
=
r
.
data
;
})
;
this
.
serviceUserList
=
r
.
data
})
listAllSimpl
().
then
((
r
)
=>
{
this
.
allSimplList
=
r
.
data
;
})
;
this
.
allSimplList
=
r
.
data
})
getCountryListAll
().
then
((
r
)
=>
{
this
.
countryList
=
r
.
data
;
})
;
this
.
countryList
=
r
.
data
})
this
.
getCompetitorList
()
},
data
()
{
...
...
@@ -1255,89 +737,85 @@ export default {
{
required
:
true
,
message
:
this
.
$t
(
"
客户名称不能为空
"
),
trigger
:
"
blur
"
,
},
],
country
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
国家不能为空
"
),
trigger
:
"
blur
"
},
trigger
:
"
blur
"
}
],
country
:
[{
required
:
true
,
message
:
this
.
$t
(
"
国家不能为空
"
),
trigger
:
"
blur
"
}],
level
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
客户等级不能为空
"
),
trigger
:
"
blur
"
,
}
,
trigger
:
"
blur
"
}
],
type
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
客户类别不能为空
"
),
trigger
:
"
blur
"
,
}
,
trigger
:
"
blur
"
}
],
createTime
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
创建时间不能为空
"
),
trigger
:
"
blur
"
,
}
,
trigger
:
"
blur
"
}
],
source
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
客户来源不能为空
"
),
trigger
:
"
blur
"
,
}
,
trigger
:
"
blur
"
}
],
customerService
:
[
{
required
:
this
.
customerId
===
"
0
"
,
message
:
this
.
$t
(
"
客户经理不能为空
"
),
trigger
:
"
blur
"
,
}
,
trigger
:
"
blur
"
}
],
status
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
客户状态不能为空
"
),
trigger
:
"
blur
"
,
}
,
trigger
:
"
blur
"
}
],
busiCountryIds
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请选择业务国家
"
),
trigger
:
"
blur
"
,
}
,
trigger
:
"
blur
"
}
],
competitorIds
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请选择主要竞争对手
"
),
trigger
:
"
change
"
,
}
,
trigger
:
"
change
"
}
],
pickupPoints
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请选择常用提货网点
"
),
trigger
:
"
change
"
,
}
,
trigger
:
"
change
"
}
],
productType
:
[
productType
s
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请选择产品类别
"
),
trigger
:
"
change
"
,
}
,
]
,
trigger
:
"
change
"
}
]
},
contactRules
:
{
name
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请输入联系人
"
),
trigger
:
"
blur
"
},
],
name
:
[{
required
:
true
,
message
:
this
.
$t
(
"
请输入联系人
"
),
trigger
:
"
blur
"
}],
areaCode
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请选择区号
"
),
trigger
:
"
change
"
}
,
{
required
:
true
,
message
:
this
.
$t
(
"
请选择区号
"
),
trigger
:
"
change
"
}
/*{
required: true,
trigger: "change",
...
...
@@ -1348,9 +826,9 @@ export default {
{
required
:
true
,
trigger
:
"
blur
"
,
validator
:
this
.
phoneValidator
,
}
,
]
,
validator
:
this
.
phoneValidator
}
]
},
// 网点
nodeList
:
[],
...
...
@@ -1379,28 +857,28 @@ export default {
showShippingFlag
:
true
,
showSettingFlag
:
true
,
showFinanceFlag
:
true
,
competitorList
:
[]
,
}
;
competitorList
:
[]
}
},
methods
:
{
addEmail
(
row
)
{
row
.
push
(
""
)
;
row
.
push
(
""
)
},
deleteEmail
(
row
,
index
)
{
row
.
splice
(
index
,
1
)
;
row
.
splice
(
index
,
1
)
},
change
(
val
)
{
this
.
form
.
productIds
=
[]
;
this
.
getProductListFn
(
val
)
;
this
.
form
.
productIds
=
[]
this
.
getProductListFn
(
val
)
},
getProductListFn
(
val
)
{
getProductList
({
typeId
:
val
}).
then
((
r
)
=>
{
this
.
productList
=
r
.
data
;
})
;
getProductList
({
typeId
s
:
val
}).
then
((
r
)
=>
{
this
.
productList
=
r
.
data
})
},
deleteBankData
(
index
)
{
this
.
form
.
customerBanks
.
splice
(
index
,
1
)
;
this
.
form
.
customerBanks
.
splice
(
index
,
1
)
},
//添加银行卡
addBankData
()
{
...
...
@@ -1412,10 +890,10 @@ export default {
accountType
:
null
,
status
:
null
,
currency
:
""
,
accountName
:
""
,
}
;
accountName
:
""
}
this
.
form
.
customerBanks
=
[...
this
.
form
.
customerBanks
,
p
]
;
this
.
form
.
customerBanks
=
[...
this
.
form
.
customerBanks
,
p
]
},
/* getUserMemberUserFn(val){
userMemberUserList({pageNo:1,pageSize:100,searchKey:val}).then(r => {
...
...
@@ -1423,87 +901,80 @@ export default {
})
}, */
remoteMethod
(
val
)
{
this
.
getCustomerSelect
(
val
)
;
this
.
getCustomerSelect
(
val
)
},
getCustomerSelect
(
val
=
""
)
{
getCustomerSelect
({
pageNo
:
1
,
pageSize
:
30
,
searchKey
:
val
}).
then
(
(
res
)
=>
{
this
.
customerSelect
=
res
.
data
.
list
;
}
);
getCustomerSelect
({
pageNo
:
1
,
pageSize
:
30
,
searchKey
:
val
}).
then
((
res
)
=>
{
this
.
customerSelect
=
res
.
data
.
list
})
},
phoneValidator
(
rule
,
value
,
callback
)
{
if
(
!
value
)
{
return
callback
(
new
Error
(
this
.
$t
(
"
请输入联系方式
"
)))
;
return
callback
(
new
Error
(
this
.
$t
(
"
请输入联系方式
"
)))
}
let
areaCode
=
this
.
form
.
customerContacts
.
find
(
(
e
)
=>
e
.
phoneNew
===
value
).
areaCode
;
let
areaCode
=
this
.
form
.
customerContacts
.
find
((
e
)
=>
e
.
phoneNew
===
value
).
areaCode
if
(
areaCode
)
{
validatorMobile
({
code
:
areaCode
,
mobile
:
value
,
mobile
:
value
})
.
then
((
r
)
=>
{
if
(
r
.
data
)
{
callback
()
;
callback
()
}
else
{
callback
(
new
Error
(
r
.
msg
||
this
.
$t
(
"
手机号验证失败
"
)))
;
callback
(
new
Error
(
r
.
msg
||
this
.
$t
(
"
手机号验证失败
"
)))
}
})
.
catch
((
e
)
=>
{
console
.
error
(
e
)
;
callback
(
new
Error
(
this
.
$t
(
"
手机号验证失败
"
)))
;
})
;
console
.
error
(
e
)
callback
(
new
Error
(
this
.
$t
(
"
手机号验证失败
"
)))
})
}
},
codeValidator
(
rule
,
value
,
callback
)
{
let
index
=
+
rule
.
field
.
split
(
"
.
"
)[
1
]
;
let
phone
=
this
.
form
.
customerContacts
[
index
].
phoneNew
;
let
index
=
+
rule
.
field
.
split
(
"
.
"
)[
1
]
let
phone
=
this
.
form
.
customerContacts
[
index
].
phoneNew
if
(
phone
)
{
validatorMobile
({
code
:
value
,
mobile
:
phone
,
mobile
:
phone
})
.
then
((
r
)
=>
{
if
(
r
.
data
)
{
callback
()
;
callback
()
}
else
{
callback
()
;
this
.
$message
.
error
(
r
.
msg
||
this
.
$t
(
"
手机号验证失败
"
))
;
callback
()
this
.
$message
.
error
(
r
.
msg
||
this
.
$t
(
"
手机号验证失败
"
))
}
})
.
catch
((
e
)
=>
{
console
.
error
(
e
)
;
callback
()
;
this
.
$message
.
error
(
this
.
$t
(
"
手机号验证失败
"
))
;
})
;
console
.
error
(
e
)
callback
()
this
.
$message
.
error
(
this
.
$t
(
"
手机号验证失败
"
))
})
}
},
handleDefaultChange
(
$index
)
{
// 只有一个联系人,设置成非默认
if
(
this
.
form
.
customerContacts
.
length
===
1
&&
this
.
form
.
customerContacts
[
0
].
isDefault
===
0
)
{
this
.
$modal
.
msgWarning
(
this
.
$t
(
"
至少拥有一个默认联系人
"
));
this
.
form
.
customerContacts
[
0
].
isDefault
=
1
;
return
;
if
(
this
.
form
.
customerContacts
.
length
===
1
&&
this
.
form
.
customerContacts
[
0
].
isDefault
===
0
)
{
this
.
$modal
.
msgWarning
(
this
.
$t
(
"
至少拥有一个默认联系人
"
))
this
.
form
.
customerContacts
[
0
].
isDefault
=
1
return
}
// 设置默认联系人
if
(
this
.
form
.
customerContacts
[
$index
].
isDefault
===
1
)
{
// 其他的置否
let
i
=
0
;
let
i
=
0
this
.
form
.
customerContacts
.
forEach
((
e
)
=>
{
if
(
i
!==
$index
)
{
e
.
isDefault
=
0
;
e
.
isDefault
=
0
}
i
++
;
})
;
i
++
})
}
else
{
// 第一个置是
this
.
form
.
customerContacts
[
0
].
isDefault
=
1
;
this
.
form
.
customerContacts
[
0
].
isDefault
=
1
}
},
/* selectBD(val){
...
...
@@ -1518,49 +989,49 @@ export default {
}, */
/** 取消按钮 */
cancel
()
{
this
.
$tab
.
closePage
()
;
this
.
open
=
false
;
this
.
reset
()
;
this
.
$tab
.
closePage
()
this
.
open
=
false
this
.
reset
()
},
/** 提交按钮 */
submitForm
()
{
if
(
this
.
form
.
customerContacts
.
length
===
0
)
{
this
.
$modal
.
alert
(
this
.
$t
(
"
至少添加一位联系人
"
))
;
return
;
this
.
$modal
.
alert
(
this
.
$t
(
"
至少添加一位联系人
"
))
return
}
this
.
$refs
[
"
contactForm
"
].
validate
((
valid1
,
err1
)
=>
{
this
.
$refs
[
"
form
"
].
validate
((
valid2
,
err2
)
=>
{
this
.
$refs
.
bankForm
.
validate
((
valid3
,
err3
)
=>
{
console
.
log
(
valid3
,
"
valid3
"
)
;
console
.
log
(
valid3
,
"
valid3
"
)
if
(
!
valid1
||
!
valid2
||
!
valid3
)
{
this
.
$showFormValidateErrors
({
...
err1
,
...
err2
,
...
err3
})
;
return
;
this
.
$showFormValidateErrors
({
...
err1
,
...
err2
,
...
err3
})
return
}
if
(
this
.
form
.
customerContacts
.
length
===
0
)
{
this
.
$modal
.
msgError
(
this
.
$t
(
"
至少填写一个联系人信息
"
))
;
return
;
this
.
$modal
.
msgError
(
this
.
$t
(
"
至少填写一个联系人信息
"
))
return
}
if
(
this
.
form
.
competitorIds
==
0
)
{
this
.
$modal
.
msgError
(
this
.
$t
(
"
请重新选择主要竞争对手
"
))
;
return
;
this
.
$modal
.
msgError
(
this
.
$t
(
"
请重新选择主要竞争对手
"
))
return
}
// 重货标准和泡货标准,未打开就不传,提交前清空一下
if
(
!
this
.
showZhong
)
{
this
.
form
.
weightUnit
=
null
;
this
.
zhongLines
=
[]
;
this
.
form
.
weightUnit
=
null
this
.
zhongLines
=
[]
}
if
(
!
this
.
showZhong1
)
{
this
.
zhongLines
=
[]
;
this
.
zhongLines
=
[]
}
if
(
!
this
.
showPao
)
{
this
.
form
.
lightUnit
=
null
;
this
.
paoLines
=
[]
;
this
.
form
.
lightUnit
=
null
this
.
paoLines
=
[]
}
if
(
!
this
.
showPao1
)
{
this
.
paoLines
=
[]
;
this
.
paoLines
=
[]
}
this
.
updateCustomerLines
()
;
this
.
updateCustomerLines
()
const
form
=
{
...
this
.
form
,
type
:
this
.
form
.
type
?.
join
(
"
,
"
),
...
...
@@ -1569,68 +1040,67 @@ export default {
roles
:
(
this
.
form
.
roles
||
[])?.
join
(
"
,
"
),
pickupPoints
:
(
this
.
form
.
pickupPoints
||
[])?.
join
(
"
,
"
),
productIds
:
(
this
.
form
.
productIds
||
[])?.
join
(
"
,
"
),
productTypes
:
(
this
.
form
.
productTypes
||
[])?.
join
(
"
,
"
),
busiCountryIds
:
(
this
.
form
.
busiCountryIds
||
[])?.
join
(
"
,
"
),
noConsignee
:
undefined
,
defaultPay
:
undefined
,
defaultBilling
:
undefined
,
};
form
.
customerContacts
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
.
customerContacts
)
);
defaultBilling
:
undefined
}
form
.
customerContacts
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
.
customerContacts
))
form
.
customerContacts
.
forEach
((
e
)
=>
{
e
.
email
=
[...
e
.
email
].
filter
((
i
)
=>
i
!==
""
).
join
(
"
,
"
)
;
})
;
e
.
email
=
[...
e
.
email
].
filter
((
i
)
=>
i
!==
""
).
join
(
"
,
"
)
})
// 检查路线是否启用了但是没选择目的仓
let
errors
=
0
;
let
errors
=
0
form
.
customerLines
.
forEach
((
line
)
=>
{
if
(
!
line
.
objectiveIds
||
line
.
objectiveIds
==
""
)
{
errors
++
;
errors
++
}
})
;
})
if
(
errors
)
{
return
this
.
$message
.
error
(
"
有两条路线未选择目的地
"
)
;
return
this
.
$message
.
error
(
"
有两条路线未选择目的地
"
)
}
//我的客户页面跳转直接,完善客户
if
(
this
.
isCustomerServiceConfirmed
)
{
form
.
isCustomerServiceConfirmed
=
this
.
isCustomerServiceConfirmed
;
form
.
isCustomerServiceConfirmed
=
this
.
isCustomerServiceConfirmed
}
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
this
.
form
.
customerContacts
.
forEach
((
e
)
=>
{
e
.
customerId
=
this
.
customerId
;
})
;
e
.
customerId
=
this
.
customerId
})
console
.
log
(
this
.
form
)
if
(
this
.
$route
.
name
===
"
perfect
"
)
{
fillupCustomeInfo
(
form
).
then
((
r
)
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
修改成功
"
))
;
this
.
open
=
false
;
const
obj
=
{
path
:
"
/customer/customer
"
}
;
this
.
$tab
.
closeOpenPage
(
obj
)
;
})
;
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
修改成功
"
))
this
.
open
=
false
const
obj
=
{
path
:
"
/customer/customer
"
}
this
.
$tab
.
closeOpenPage
(
obj
)
})
}
else
{
updateCustomer
(
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
修改成功
"
))
;
this
.
open
=
false
;
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
修改成功
"
))
this
.
open
=
false
// this.getList();
const
obj
=
{
path
:
"
/customer/customer
"
}
;
this
.
$tab
.
closeOpenPage
(
obj
)
;
})
;
const
obj
=
{
path
:
"
/customer/customer
"
}
this
.
$tab
.
closeOpenPage
(
obj
)
})
}
return
;
return
}
// 添加的提交
createCustomer
(
form
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
新增成功
"
))
;
this
.
open
=
false
;
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
新增成功
"
))
this
.
open
=
false
// this.getList();
const
obj
=
{
path
:
"
/customer/customer
"
}
;
this
.
$tab
.
closeOpenPage
(
obj
)
;
})
;
})
;
})
;
})
;
const
obj
=
{
path
:
"
/customer/customer
"
}
this
.
$tab
.
closeOpenPage
(
obj
)
})
})
})
})
},
/** 表单重置 */
reset
()
{
...
...
@@ -1683,63 +1153,61 @@ export default {
carName
:
undefined
,
carNo
:
undefined
,
customerBanks
:
[],
isNew
:
true
,
// 业绩类型
firstDealTime
:
undefined
,
// 首次成交时间
isNew
:
true
,
// 业绩类型
firstDealTime
:
undefined
,
// 首次成交时间
// estimateEnterOpenSeaTime: undefined,// 掉入公海时间
getMethod
:
undefined
,
// 获取方式
createFrom
:
undefined
,
// 创建入口
catchTime
:
undefined
,
//捞取时间
customerServiceConfirmedTime
:
undefined
,
//归属时间
updater
:
this
.
$store
.
getters
.
userId
,
// 更新人
updateTime
:
undefined
,
// 更新时间
roles
:
undefined
,
// 客户角色
busiCountryIds
:
undefined
,
// 业务国家
competitorIds
:
undefined
,
// 主要竞争对手
weightYearly
:
undefined
,
// 年度发货量
numYearly
:
undefined
,
// 年度发货次数
noConsignee
:
false
,
// 控制无收货人
defaultPay
:
false
,
// 默认付款
defaultBilling
:
false
,
// 默认开票
}
;
this
.
form
.
createTime
=
new
Date
().
getTime
()
;
this
.
form
.
updateTime
=
new
Date
().
getTime
()
;
this
.
resetForm
(
"
form
"
)
;
getMethod
:
undefined
,
// 获取方式
createFrom
:
undefined
,
// 创建入口
catchTime
:
undefined
,
//捞取时间
customerServiceConfirmedTime
:
undefined
,
//归属时间
updater
:
this
.
$store
.
getters
.
userId
,
// 更新人
updateTime
:
undefined
,
// 更新时间
roles
:
undefined
,
// 客户角色
busiCountryIds
:
undefined
,
// 业务国家
competitorIds
:
undefined
,
// 主要竞争对手
weightYearly
:
undefined
,
// 年度发货量
numYearly
:
undefined
,
// 年度发货次数
noConsignee
:
false
,
// 控制无收货人
defaultPay
:
false
,
// 默认付款
defaultBilling
:
false
// 默认开票
}
this
.
form
.
createTime
=
new
Date
().
getTime
()
this
.
form
.
updateTime
=
new
Date
().
getTime
()
this
.
resetForm
(
"
form
"
)
},
getCustomer
(
id
)
{
return
getCustomer
(
id
).
then
((
response
)
=>
{
console
.
log
(
response
,
"
response
"
)
;
console
.
log
(
response
,
"
response
"
)
this
.
form
=
{
...
this
.
form
,
...
response
.
data
,
id
:
this
.
customerId
,
transportType
:
response
.
data
.
transportType
&&
response
.
data
.
transportType
!==
""
?
response
.
data
.
transportType
.
split
(
"
,
"
)
:
[],
transportType
:
response
.
data
.
transportType
&&
response
.
data
.
transportType
!==
""
?
response
.
data
.
transportType
.
split
(
"
,
"
)
:
[],
customerBanks
:
response
.
data
.
customerBankBackVOList
,
roles
:
response
.
data
.
roles
?
response
.
data
.
roles
.
split
(
"
,
"
)
:
[],
roles
:
response
.
data
.
roles
?
response
.
data
.
roles
.
split
(
"
,
"
)
:
[],
pickupPoints
:
this
.
stringArrToNumberArr
(
response
.
data
.
pickupPoints
),
productIds
:
this
.
stringArrToNumberArr
(
response
.
data
.
productIds
),
busiCountryIds
:
this
.
stringArrToNumberArr
(
response
.
data
.
busiCountryIds
),
competitorIds
:
Number
(
response
.
data
.
competitorIds
)
};
competitorIds
:
Number
(
response
.
data
.
competitorIds
),
productTypes
:
response
.
data
.
productTypes
?
response
.
data
.
productTypes
.
split
(
"
,
"
)
:
[]
}
if
(
this
.
form
.
productType
)
{
console
.
log
(
"
1231
"
,
this
.
form
.
productType
)
;
this
.
getProductListFn
(
this
.
form
.
productType
)
;
console
.
log
(
"
1231
"
,
this
.
form
.
productType
)
this
.
getProductListFn
(
this
.
form
.
productType
)
}
console
.
log
(
this
.
form
)
this
.
open
=
true
;
this
.
title
=
this
.
$t
(
"
修改客户
"
)
;
this
.
open
=
true
this
.
title
=
this
.
$t
(
"
修改客户
"
)
this
.
$forceUpdate
()
this
.
getZhongPao
()
;
})
;
this
.
getZhongPao
()
})
},
stringArrToNumberArr
(
data
)
{
if
(
data
)
{
const
strArr
=
data
.
split
(
"
,
"
)
const
numArr
=
strArr
.
map
(
item
=>
Number
(
item
))
const
numArr
=
strArr
.
map
(
(
item
)
=>
Number
(
item
))
return
numArr
}
else
{
return
[]
...
...
@@ -1747,14 +1215,14 @@ export default {
},
updateCustomerLines
()
{
let
zhongLines
=
[],
paoLines
=
[]
;
paoLines
=
[]
if
(
this
.
zhongLines
.
length
>
0
)
{
zhongLines
=
this
.
zhongLines
;
zhongLines
=
this
.
zhongLines
}
if
(
this
.
paoLines
.
length
>
0
)
{
paoLines
=
this
.
paoLines
;
paoLines
=
this
.
paoLines
}
this
.
form
.
customerLines
=
[...
zhongLines
,
...
paoLines
]
;
this
.
form
.
customerLines
=
[...
zhongLines
,
...
paoLines
]
},
handleAddContact
()
{
this
.
form
.
customerContacts
.
push
({
...
...
@@ -1769,47 +1237,52 @@ export default {
social
:
undefined
,
socialNumber
:
""
,
userid
:
undefined
,
nameEn
:
""
,
nameEn
:
""
// "username": ""
})
;
})
},
handleDeleteContact
(
$index
)
{
this
.
form
.
customerContacts
.
splice
(
$index
,
1
)
;
this
.
form
.
customerContacts
.
splice
(
$index
,
1
)
if
(
this
.
form
.
customerContacts
.
length
>
0
)
{
this
.
$refs
[
"
contactForm
"
].
clearValidate
()
;
this
.
$refs
[
"
contactForm
"
].
clearValidate
()
if
(
!
this
.
form
.
customerContacts
.
find
((
e
)
=>
e
.
isDefault
))
{
this
.
form
.
customerContacts
[
0
].
isDefault
=
1
;
this
.
form
.
customerContacts
[
0
].
isDefault
=
1
}
}
},
getZhongPao
()
{
getZhongPaoBest
({
customerId
:
this
.
customerId
,
customerId
:
this
.
customerId
// departureId: this.departureId,
// objectiveId: this.objectiveId
}).
then
((
r
)
=>
{
if
(
!
this
.
form
.
weightUnit
)
this
.
form
.
weightUnit
=
r
.
data
.
zhongEdge
;
if
(
!
this
.
form
.
lightUnit
)
this
.
form
.
lightUnit
=
r
.
data
.
paoEdge
;
})
;
if
(
!
this
.
form
.
weightUnit
)
this
.
form
.
weightUnit
=
r
.
data
.
zhongEdge
if
(
!
this
.
form
.
lightUnit
)
this
.
form
.
lightUnit
=
r
.
data
.
paoEdge
})
},
getCompetitorList
()
{
getCompetitorList
(
callback
)
{
competitorListAll
().
then
((
r
)
=>
{
this
.
competitorList
=
r
.
data
;
this
.
competitorList
=
r
.
data
this
.
$nextTick
(()
=>
{
callback
&&
callback
()
})
})
},
changeCompetitor
(
val
)
{
if
(
val
==
0
)
{
this
.
$prompt
(
"
请输入主要竞争对手
"
,
"
提示
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
cancelButtonText
:
"
取消
"
}).
then
((
data
)
=>
{
console
.
log
(
data
)
addCompetitor
({
name
:
data
.
value
}).
then
(
_
=>
{
this
.
$message
.
success
(
'
添加成功!
'
)
this
.
getCompetitorList
()
}).
then
((
r
)
=>
{
this
.
$message
.
success
(
"
添加成功!
"
)
this
.
getCompetitorList
(()
=>
{
this
.
form
.
competitorIds
=
r
.
data
})
})
})
}
...
...
@@ -1817,13 +1290,13 @@ export default {
},
computed
:
{
isChinese
()
{
return
this
.
$i18n
.
locale
===
"
zh_CN
"
;
return
this
.
$i18n
.
locale
===
"
zh_CN
"
},
userId
()
{
return
this
.
$store
.
state
.
user
.
id
;
return
this
.
$store
.
state
.
user
.
id
},
customerId
()
{
return
this
.
$route
.
params
.
customerId
;
return
this
.
$route
.
params
.
customerId
},
/* userMemberUser(){
let list = this.memberList.filter(item => {
...
...
@@ -1832,33 +1305,31 @@ export default {
return [...this.selectMemberList,...list]
}, */
productListFilter
()
{
return
this
.
productList
.
filter
((
p
)
=>
p
.
typeId
===
this
.
form
.
productType
)
;
return
this
.
productList
.
filter
((
p
)
=>
p
.
typeId
===
this
.
form
.
productType
)
},
customerSelectFn
()
{
if
(
this
.
recommended
.
length
>
0
)
{
let
i
=
this
.
customerSelect
.
find
(
(
item
)
=>
item
.
id
===
this
.
recommended
[
0
].
id
);
let
i
=
this
.
customerSelect
.
find
((
item
)
=>
item
.
id
===
this
.
recommended
[
0
].
id
)
if
(
!
i
)
{
this
.
customerSelect
.
push
(
this
.
recommended
[
0
])
;
this
.
customerSelect
.
push
(
this
.
recommended
[
0
])
}
return
this
.
customerSelect
;
return
this
.
customerSelect
}
else
{
return
this
.
customerSelect
;
return
this
.
customerSelect
}
}
,
}
},
watch
:
{
zhongLines
()
{
console
.
log
(
"
zhongLines
"
,
this
.
zhongLines
)
;
this
.
updateCustomerLines
()
;
console
.
log
(
"
zhongLines
"
,
this
.
zhongLines
)
this
.
updateCustomerLines
()
},
paoLines
()
{
console
.
log
(
"
paoLines
"
,
this
.
paoLines
)
;
this
.
updateCustomerLines
()
;
}
,
}
,
}
;
console
.
log
(
"
paoLines
"
,
this
.
paoLines
)
this
.
updateCustomerLines
()
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
...
...
@@ -1877,7 +1348,7 @@ export default {
}
}
.title-text
{
font-size
:
18px
;
font-size
:
18px
;
color
:
#111
;
}
</
style
>
src/views/ecw/customer/query.vue
View file @
39da2846
...
...
@@ -334,106 +334,7 @@
<
/el-card
>
<
/el-tab-pane
>
<
el
-
tab
-
pane
name
=
"
follow
"
:
label
=
"
$t('跟进')
"
>
<
el
-
card
class
=
"
box-card
"
>
<
div
slot
=
"
header
"
class
=
"
clearfix
"
>
<
el
-
form
size
=
"
small
"
:
inline
=
"
true
"
label
-
width
=
"
100px
"
>
<
el
-
form
-
item
:
label
=
"
$t('跟进类型')
"
>
<
el
-
select
clearable
multiple
v
-
model
=
"
followForm.followTypes
"
:
placeholder
=
"
$t('请选择')
"
size
=
"
small
"
@
change
=
"
handleQuery
"
>
<
el
-
option
v
-
for
=
"
dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_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
multiple
v
-
model
=
"
followForm.followMethods
"
:
placeholder
=
"
$t('请选择')
"
size
=
"
small
"
@
change
=
"
handleQuery
"
>
<
el
-
option
v
-
for
=
"
dict in getDictDatas(DICT_TYPE.CUSTOMER_FOLLOWUP_METHOD)
"
:
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
multiple
v
-
model
=
"
followForm.resultTypes
"
:
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
multiple
v
-
model
=
"
followForm.statuses
"
:
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
=
"
() => {
followForm = { pageNo: 1, pageSize: 10
}
getCustomerFollowList()
}
"
>
{{
$t
(
"
重置
"
)
}}
<
/el-button
>
<
el
-
button
type
=
"
success
"
@
click
=
"
customerFollowFn('follow')
"
v
-
hasPermi
=
"
['ecw:customer:follow-create']
"
>
{{
$t
(
"
新增
"
)
}}
<
/el-button
>
<
el
-
button
type
=
"
warning
"
@
click
=
"
handleExport
"
v
-
hasPermi
=
"
['ecw:customer:follow-export']
"
>
{{
$t
(
"
导出
"
)
}}
<
/el-button
>
<
/el-form-item
>
<
/el-form
>
<
/div
>
<
el
-
table
:
data
=
"
customerFollowList
"
style
=
"
width: 100%
"
>
<
el
-
table
-
column
prop
=
"
number
"
:
label
=
"
$t('编号')
"
width
=
"
120
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
a
href
=
"
javascript:void(0)
"
@
click
=
"
handleCustomerFollowLink(scope.row)
"
class
=
"
link-type
"
>
{{
scope
.
row
.
number
}}
<
/a
>
<
/template
>
<
/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
=
"
offerNumber
"
:
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
=
"
customerNumber
"
:
label
=
"
$t('客户编号')
"
><
/el-table-column
>
<
el
-
table
-
column
prop
=
"
contactName
"
:
label
=
"
$t('联系人')
"
><
/el-table-column
>
<
el
-
table
-
column
prop
=
"
contactPhone
"
:
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
"
prop
=
"
parentNumber
"
><
/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
=
"
150px
"
:
label
=
"
$t('操作')
"
align
=
"
center
"
fixed
=
"
right
"
class
-
name
=
"
small-padding fixed-width
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
handleCustomerFollow(scope.row, scope.row.status === 0)
"
v
-
hasPermi
=
"
['ecw:customer:follow-update']
"
>
{{
$t
(
"
编辑
"
)
}}
<
/el-button
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-collection
"
@
click
=
"
handleCustomerFollow(scope.row, true)
"
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
>
<
logListCommon
ref
=
"
logListCommon
"
v
-
if
=
"
activeName === 'follow'
"
:
customerId
=
"
id
"
/>
<
/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
>
...
...
@@ -705,7 +606,7 @@
<
/div
>
<
/el-dialog
>
<
customer
-
follow
ref
=
"
customerFollow
"
v
-
if
=
"
customerFollowVisible
"
:
id
=
"
id
"
:
customer
-
id
=
"
id
"
:
customer
-
service
=
"
customer.customerService
"
:
customer
-
number
=
"
customer.number
"
@
refresh
=
"
getCustomerFollowList
"
/>
<
customer
-
follow
ref
=
"
customerFollow
"
v
-
if
=
"
customerFollowVisible
"
:
customer
-
id
=
"
id
"
:
customer
-
service
=
"
customer.customerService
"
:
customer
-
number
=
"
customer.number
"
@
refresh
=
"
logListCommonRefresh
"
/>
<
/div
>
<
/template
>
...
...
@@ -731,7 +632,8 @@ 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
,
exportCustomerFollow
}
from
"
@/api/ecw/customerFollow
"
import
logListCommon
from
"
@/views/ecw/offer/logListCommon
"
export
default
{
name
:
"
query
"
,
...
...
@@ -740,7 +642,8 @@ export default {
Template
,
CustomerFollow
,
CustomerComplaint
,
customerLog
customerLog
,
logListCommon
}
,
created
()
{
// 获取币种
...
...
@@ -811,7 +714,6 @@ export default {
this
.
getInfoListOfferPage
()
//报价
break
case
"
follow
"
:
this
.
getCustomerFollowList
()
case
"
bill
"
:
this
.
infoListReceiptFn
()
//账单
break
...
...
@@ -991,14 +893,7 @@ export default {
objectiveId
:
null
,
destWarehouseId
:
null
,
customerFollowVisible
:
false
,
followForm
:
{
pageNo
:
1
,
pageSize
:
10
}
,
followTime
:
[],
nextTime
:
[],
customerFollowTotal
:
0
,
customerFollowList
:
[],
currencyList
:
[],
userId
:
undefined
}
...
...
@@ -1080,18 +975,6 @@ export default {
this
.
$router
.
push
({
path
:
"
/offer/create
"
,
query
:
{
customerId
:
row
.
id
,
customerType
:
row
.
type
,
type
:
1
}
}
)
}
,
handleCustomerFollow
(
row
,
flag
)
{
this
.
customerFollowVisible
=
true
this
.
$nextTick
((
_
)
=>
{
this
.
$refs
[
"
customerFollow
"
].
handleUpdate
(
row
,
flag
)
}
)
}
,
handleCustomerFollowLink
(
row
)
{
this
.
customerFollowVisible
=
true
this
.
$nextTick
((
_
)
=>
{
this
.
$refs
[
"
customerFollow
"
].
handleView
(
row
)
}
)
}
,
checkPermi
,
userIdFormatter
(
row
,
column
,
cellValue
)
{
const
member
=
this
.
memberList
.
find
((
e
)
=>
e
.
id
===
cellValue
)
...
...
@@ -1192,27 +1075,6 @@ export default {
this
.
infoListOfferFrom
=
{
pageNo
:
1
,
pageSize
:
10
}
this
.
getInfoListOfferPage
()
}
,
getCustomerFollowList
()
{
getCustomerFollowList
({
...
this
.
followForm
,
customerId
:
this
.
customerId
}
).
then
((
r
)
=>
{
this
.
customerFollowList
=
r
.
data
.
list
this
.
customerFollowTotal
=
r
.
data
.
total
}
)
}
,
/** 跟进记录导出按钮操作 */
handleExport
()
{
// 执行导出
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认导出客户跟进记录数据项?
"
)).
then
(()
=>
{
exportCustomerFollow
({
...
this
.
followForm
,
customerId
:
this
.
customerId
}
).
then
((
r
)
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
已加入导出队列,请稍后在下载日志中下载
"
))
}
)
}
)
}
,
// 数据
getOrderStatistics
()
{
orderStatistics
({
customerId
:
this
.
id
}
).
then
((
r
)
=>
{
...
...
@@ -1340,6 +1202,9 @@ export default {
this
.
$message
.
success
(
"
操作成功
"
)
this
.
handleQuery
()
}
)
}
,
logListCommonRefresh
()
{
this
.
$refs
.
logListCommon
&&
this
.
$refs
.
logListCommon
.
handleQuery
()
}
}
}
...
...
src/views/ecw/offer/edit.vue
View file @
39da2846
...
...
@@ -1100,6 +1100,9 @@ export default {
if
(
this
.
form
.
offerId
!=
this
.
$route
.
query
.
id
)
{
this
.
getOffer
()
}
if
(
this
.
$route
.
query
.
copyId
&&
this
.
form
.
copyId
!=
this
.
$route
.
query
.
copyId
)
{
this
.
getOffer
()
}
},
async
created
()
{
await
this
.
getChannelList
()
...
...
@@ -1154,7 +1157,7 @@ export default {
getOffer
()
{
//加了是否从全部客户列表中报价按钮进来的判断
if
(
this
.
$route
.
query
!==
1
)
{
getOffer
(
this
.
$route
.
query
.
id
).
then
((
res
)
=>
{
getOffer
(
this
.
$route
.
query
.
id
||
this
.
$route
.
query
.
copyId
).
then
((
res
)
=>
{
let
formData
=
res
.
data
formData
.
type
=
formData
.
type
?
formData
.
type
.
split
(
"
,
"
).
filter
((
item
)
=>
item
!=
""
)
:
[]
formData
.
prodCreateReqVOList
=
[]
...
...
@@ -1187,6 +1190,14 @@ export default {
})
})
}
if
(
this
.
$route
.
query
.
copyId
)
{
formData
.
offerId
=
""
formData
.
startTime
=
""
formData
.
endTime
=
""
formData
.
stopTime
=
""
}
this
.
$set
(
this
,
"
form
"
,
formData
)
// 接口只返回了发货人和收货人ID,还需要调用接口获取详细信息回显
getCustomerContactsSelect
({
...
...
src/views/ecw/offer/index.vue
View file @
39da2846
<
template
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<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-input
v-model
.trim=
"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-input
v-model.trim=
"queryParams.searchCustomer"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('联系方式')"
prop=
"relationPhone"
>
<el-input
v-model.trim=
"queryParams.relationPhone"
clearable
@
keyup.enter.native=
"handleQuery"
@
input=
"queryParams.relationPhone = queryParams.relationPhone.replace(/\s+/g, '')"
/>
</el-form-item>
<el-form-item
:label=
"$t('
创建时间')"
prop=
"orderNo
"
>
<el-
date-picker
type=
"datetime"
v-model=
"queryParams.beginCreateTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
{{
$t
(
'
到
'
)
}}
<el-date-picker
v-model=
"queryParams.endCreateTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker
>
<el-form-item
:label=
"$t('
区号')"
prop=
"relationAreaCode
"
>
<el-
input
v-model.trim=
"queryParams.relationAreaCode"
:placeholder=
"$t('请输入客户')"
clearable
@
keyup.enter.native=
"handleQuery"
@
input=
"queryParams.relationAreaCode = queryParams.relationAreaCode.replace(/\s+/g, '')"
/
>
</el-form-item>
<el-form-item
:label=
"$t('始发地')"
prop=
"departureId"
>
...
...
@@ -20,92 +23,149 @@
<el-option
v-for=
"item in exportCityList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('目的地')"
prop=
"objectiveId"
>
<el-select
v-model=
"queryParams.objectiveId"
:placeholder=
"$t('请选择目的地')"
clearable
>
<el-option
v-for=
"item in importCityList"
:label=
"$l(item, 'title')"
:value=
"item.id"
:key=
"item.id"
></el-option>
<el-form-item
:label=
"$t('目的国')"
prop=
"destCountryId"
>
<el-select
v-model=
"destCountryId"
multiple
:label=
"destCountryId"
:placeholder=
"$t('请选择目的国')"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"item in AddressProvince"
:key=
"item.guojia"
:label=
"item.guojiaName"
:value=
"item.guojia"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('目的城市')"
prop=
"objectiveId"
>
<el-select
v-model=
"objectiveId"
multiple
:placeholder=
"$t('请选择目的城市')"
style=
"width: 200px"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"item in AddressCity"
:key=
"item.shi"
:label=
"item.shiName"
:value=
"item.shi"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('目的仓')"
prop=
"destWarehouseId"
>
<el-select
v-model=
"destWarehouseId"
multiple
:placeholder=
"$t('请选择目的仓')"
style=
"width: 200px"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"item in AddressTown"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('
运输方式')"
prop=
"transportId
"
>
<
dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportId"
formatter=
"number"
clearable
/>
<el-form-item
:label=
"$t('
客户经理')"
prop=
"salesmanIds
"
>
<
user-selector
v-model=
"queryParams.salesmanIds"
multiple
clearable
@
change=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('
商品')"
prop=
"prodTitle
"
>
<
el-input
v-model=
"queryParams.prodTitle"
:placeholder=
"$t('请输入商品类型、品名或品牌')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-form-item
:label=
"$t('
销售阶段')"
prop=
"statusList
"
>
<
dict-selector
:type=
"DICT_TYPE.ECW_OFFER_STATUS"
multiple
v-model=
"queryParams.statusList"
clearable
@
change=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('控货')"
prop=
"control"
>
<dict-selector
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
v-model=
"queryParams.control"
clearable
/>
<el-form-item
:label=
"$t('重要程度')"
prop=
"importances"
>
<el-select
v-model=
"queryParams.importances"
multiple
:placeholder=
"$t('请选择')"
clearable
@
change=
"handleQuery"
>
<el-option
v-for=
"item in [1, 2, 3, 4, 5]"
:label=
"item"
:value=
"item"
:key=
"item"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('客户经理')"
prop=
"followUpSalesmanId"
>
<user-selector
v-model=
"queryParams.followUpSalesmanId"
clearable
/>
<el-form-item
:label=
"$t('创建时间')"
>
<el-date-picker
v-model=
"queryTmp.createTime"
type=
"datetimerange"
range-separator=
"-"
:start-placeholder=
"$t('开始日期')"
:end-placeholder=
"$t('结束日期')"
value-format=
"yyyy-MM-dd HH:mm:ss"
@
change=
"handleQuery"
>
</el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('销售阶段')"
prop=
"status"
>
<dict-selector
:type=
"DICT_TYPE.ECW_OFFER_STATUS"
v-model=
"queryParams.status"
clearable
/>
<el-form-item
:label=
"$t('运输方式')"
prop=
"transportId"
v-show=
"showSearch"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportId"
multiple
formatter=
"number"
clearable
@
change=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('报关方式')"
prop=
"customsType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"queryParams.customsType"
clearable
/>
<el-form-item
:label=
"$t('出货渠道')"
prop=
"channelIds"
v-show=
"showSearch"
>
<selector
:clearable=
"true"
:options=
"channelList"
:label-field=
"$l('name')"
value-field=
"channelId"
v-model=
"queryParams.channelIds"
multiple
@
change=
"handleQuery"
></selector>
</el-form-item>
<el-form-item
:label=
"$t('商品')"
prop=
"prodTitle"
v-show=
"showSearch"
>
<el-input
v-model.trim=
"queryParams.prodTitle"
:placeholder=
"$t('请输入商品类型、品名或品牌')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('控货')"
prop=
"control"
v-show=
"showSearch"
>
<dict-selector
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
v-model=
"queryParams.control"
clearable
@
change=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('报关方式')"
prop=
"customsType"
v-show=
"showSearch"
>
<dict-selector
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"queryParams.customsType"
clearable
@
change=
"handleQuery"
/>
</el-form-item>
<div>
<el-form-item
:label=
"$t('预计结束时间')"
prop=
"orderNo"
>
<el-date-picker
type=
"datetime"
v-model=
"queryParams.beginStopTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
{{
$t
(
'
到
'
)
}}
<el-date-picker
type=
"datetime"
v-model=
"queryParams.endStopTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</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>
</div>
<el-form-item
:label=
"$t('增值服务')"
prop=
"serviceType"
v-show=
"showSearch"
>
<el-select
v-model=
"queryParams.serviceType"
:placeholder=
"$t('请选择')"
clearable
@
change=
"handleQuery"
>
<el-option
:label=
"$t('普通订单')"
:value=
"0"
></el-option>
<el-option
:label=
"$t('集运服务')"
:value=
"1"
></el-option>
<el-option
:label=
"$t('海外仓')"
:value=
"2"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('客户来源')"
prop=
"sourceIds"
v-show=
"showSearch"
>
<dict-selector
:type=
"DICT_TYPE.CUSTOMER_SOURCE"
multiple
v-model=
"queryParams.sourceIds"
clearable
@
change=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('有效期开始')"
v-show=
"showSearch"
>
<el-date-picker
v-model=
"queryTmp.startTime"
type=
"daterange"
range-separator=
"-"
:start-placeholder=
"$t('开始日期')"
:end-placeholder=
"$t('结束日期')"
value-format=
"yyyy-MM-dd"
@
change=
"handleQuery"
>
</el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('有效期结束')"
v-show=
"showSearch"
>
<el-date-picker
v-model=
"queryTmp.endTime"
type=
"daterange"
range-separator=
"-"
:start-placeholder=
"$t('开始日期')"
:end-placeholder=
"$t('结束日期')"
value-format=
"yyyy-MM-dd"
@
change=
"handleQuery"
>
</el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('预计结束时间')"
v-show=
"showSearch"
>
<el-date-picker
v-model=
"queryTmp.stopTime"
type=
"datetimerange"
range-separator=
"-"
:start-placeholder=
"$t('开始日期')"
:end-placeholder=
"$t('结束日期')"
value-format=
"yyyy-MM-dd HH:mm:ss"
@
change=
"handleQuery"
>
</el-date-picker>
</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-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['ecw:offer:create']"
>
{{
$t
(
'
新增
'
)
}}
</el-button>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['ecw:offer:create']"
>
{{
$t
(
"
新增
"
)
}}
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['ecw:offer:export']"
>
{{
$t
(
'
导出
'
)
}}
</el-button>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['ecw:offer:export']"
>
{{
$t
(
"
导出
"
)
}}
</el-button>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
border
>
<el-table-column
:label=
"$t('报价单号')"
align=
"left"
prop=
"number"
width=
"
200px
"
>
<template
slot-scope=
"
{
row
}">
<el-link
type=
"primary"
@
click.native=
"$router.push('detail?offerId=' + row.offerId)"
>
{{
row
.
number
}}
</el-link>
<el-table-column
:label=
"$t('报价单号')"
align=
"left"
prop=
"number"
width=
"
150
"
>
<template
slot-scope=
"
{
row
}">
<el-link
type=
"primary"
@
click.native=
"$router.push('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=
"left"
width=
"120"
>
<
template
slot-scope=
"{ row }"
>
<a
class=
"el-link el-link--primary is-underline"
href=
"javascript:;"
@
click=
"$router.push(`/order/detail?orderId=$
{row.orderId}`)">
{{
row
.
orderNo
}}
</a>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('联系人')"
align=
"left"
prop=
"relationName"
width=
"120"
/>
<el-table-column
:label=
"$t('联系电话')"
align=
"left"
prop=
"relationPhone"
width=
"150"
/>
<el-table-column
:label=
"$t('重要程序')"
align=
"center"
prop=
"importance"
/>
<el-table-column
:label=
"$t('始发地')"
align=
"left"
prop=
"departureName"
/>
<el-table-column
:label=
"$t('目的地')"
align=
"center"
prop=
"objectiveName"
/>
<el-table-column
:label=
"$t('销售阶段')"
align=
"left"
width=
"180"
>
<
template
slot-scope=
"{row}"
>
<el-table-column
:label=
"$t('运输方式')"
align=
"center"
>
<
template
slot-scope=
"{ row }"
>
{{
$l
(
transportTypes
[
row
.
transportType
],
"
label
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('销售阶段')"
align=
"left"
width=
"100"
>
<
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"
>
<el-table-column
:label=
"$t('预计结束时间')"
align=
"left"
width=
"100"
>
<
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
"
>
<
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
}
"
>
<
el
-
table
-
column
:
label
=
"
$t('预计销售额')
"
align
=
"
left
"
prop
=
"
estCost
"
width
=
"
160
"
>
<
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
]
}}
{{
item
.
amount
}}
{{
currencyMap
[
item
.
currencyId
]
}}
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('客户经理')
"
align
=
"
left
"
prop
=
"
creatorName
"
>
<
el
-
table
-
column
:
label
=
"
$t('客户经理')
"
align
=
"
left
"
prop
=
"
creatorName
"
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('创建时间')
"
align
=
"
left
"
width
=
"
120
"
>
<
template
slot
-
scope
=
"
{ row
}
"
>
<
span
>
{{
parseTime
(
row
.
createTime
,
"
{y
}
-{m
}
-{d
}
{h
}
:{i
}
:{s
}
"
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('有效期')
"
align
=
"
left
"
width
=
"
120
"
>
<
template
slot
-
scope
=
"
{ row
}
"
>
<
div
>
{{
parseTime
(
row
.
startTime
,
"
{y
}
-{m
}
-{d
}
"
)
}}
<
/div
>
{{
parseTime
(
row
.
endTime
,
"
{y
}
-{m
}
-{d
}
"
)
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('操作')
"
align
=
"
center
"
class
-
name
=
"
small-padding fixed-width
"
>
<
template
slot
-
scope
=
"
scope
"
>
...
...
@@ -122,34 +182,37 @@
<
el
-
dropdown
>
<
el
-
button
icon
=
"
el-icon-plus
"
circle
type
=
"
primary
"
><
/el-button
>
<
el
-
dropdown
-
menu
slot
=
"
dropdown
"
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('detail?offerId=' + scope.row.offerId)
"
v
-
hasPermi
=
"
['ecw:offer:show']
"
>
{{
$t
(
'
详情
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('edit?id=' + scope.row.offerId)
"
v
-
if
=
"
[1,2,3,7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:update']
"
>
{{
$t
(
'
编辑
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('logList?offerId=' + scope.row.offerId)
"
v
-
if
=
"
[1,3,7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:loglist']
"
>
{{
$t
(
'
跟进
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push(`result?offerId=${scope.row.offerId
}
&number=${scope.row.number
}
`)
"
v
-
if
=
"
[3,7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:result']
"
>
{{
$t
(
'
结果
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('/offer/special?offerId=' + scope.row.offerId)
"
v
-
if
=
"
[1,3,7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:discount','ecw:offer:commission']
"
>
{{
$t
(
'
特价
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
cancel(scope.row.offerId)
"
v
-
if
=
"
[1,3,7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:cancel']
"
>
{{
$t
(
'
取消
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
recovery(scope.row.offerId)
"
v
-
if
=
"
[0].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:recovery']
"
>
{{
$t
(
'
恢复
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
deleteOffer(scope.row.offerId)
"
v
-
if
=
"
[0,1,2,3,4,5,6,7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:delete']
"
>
{{
$t
(
'
删除
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('detail?offerId=' + scope.row.offerId)
"
v
-
hasPermi
=
"
['ecw:offer:show']
"
>
{{
$t
(
"
详情
"
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('edit?id=' + scope.row.offerId)
"
v
-
if
=
"
[1, 2, 3, 7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:update']
"
>
{{
$t
(
"
编辑
"
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('create?copyId=' + scope.row.offerId)
"
v
-
if
=
"
[1, 2, 3, 7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:update']
"
>
{{
$t
(
"
复制
"
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('logList?offerId=' + scope.row.offerId)
"
v
-
if
=
"
[1, 3, 7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:loglist']
"
>
{{
$t
(
"
跟进
"
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push(`result?offerId=${scope.row.offerId
}
&number=${scope.row.number
}
`)
"
v
-
if
=
"
[3, 7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:result']
"
>
{{
$t
(
"
结果
"
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('/offer/special?offerId=' + scope.row.offerId)
"
v
-
if
=
"
[1, 3, 7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:discount', 'ecw:offer:commission']
"
>
{{
$t
(
"
特价
"
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
cancel(scope.row.offerId)
"
v
-
if
=
"
[1, 3, 7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:cancel']
"
>
{{
$t
(
"
取消
"
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
recovery(scope.row.offerId)
"
v
-
if
=
"
[0].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:recovery']
"
>
{{
$t
(
"
恢复
"
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
deleteOffer(scope.row.offerId)
"
v
-
if
=
"
[0, 1, 2, 3, 4, 5, 6, 7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:delete']
"
>
{{
$t
(
"
删除
"
)
}}
<
/el-dropdown-item
>
<
/el-dropdown-menu
>
<
/el-dropdown
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<!--
分页组件
-->
<
pagination
v
-
show
=
"
total > 0
"
:
total
=
"
total
"
:
page
.
sync
=
"
queryParams.pageNo
"
:
limit
.
sync
=
"
queryParams.pageSize
"
@
pagination
=
"
getList
"
/>
<
pagination
v
-
show
=
"
total > 0
"
:
total
=
"
total
"
:
page
.
sync
=
"
queryParams.pageNo
"
:
limit
.
sync
=
"
queryParams.pageSize
"
@
pagination
=
"
getList
"
/>
<
/div
>
<
/template
>
<
script
>
import
{
deleteOffer
,
getOfferPage
,
exportOfferExcel
,
cancel
,
recovery
,
offerDeptPage
,
exportDeptOfferExcel
}
from
"
@/api/ecw/offer
"
;
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
;
import
{
getTradeCityList
}
from
'
@/api/ecw/region
'
import
UserSelector
from
'
@/components/UserSelector
'
import
{
deleteOffer
,
getOfferPage
,
exportOfferExcel
,
cancel
,
recovery
,
offerDeptPage
,
exportDeptOfferExcel
}
from
"
@/api/ecw/offer
"
import
{
getChannelList
}
from
"
@/api/ecw/channel
"
import
{
getRegionList
}
from
"
@/api/ecw/order
"
import
{
getCurrencyList
}
from
"
@/api/ecw/currency
"
import
{
getTradeCityList
}
from
"
@/api/ecw/region
"
import
UserSelector
from
"
@/components/UserSelector
"
import
Selector
from
"
@/components/Selector
"
export
default
{
name
:
"
EcwOfferIndex
"
,
components
:
{
Selector
,
UserSelector
}
,
data
()
{
...
...
@@ -159,70 +222,321 @@ export default {
// 导出遮罩层
exportLoading
:
false
,
// 显示搜索条件
showSearch
:
tru
e
,
showSearch
:
fals
e
,
// 总条数
total
:
0
,
// 报价单管理列表
list
:
[],
// 查询参数
queryParams
:
{
salesmanIds
:
[],
statusList
:
[],
importances
:
[],
channelIds
:
[],
sourceIds
:
[],
pageNo
:
1
,
pageSize
:
10
}
,
queryTmp
:
{
createTime
:
[
""
,
""
],
stopTime
:
[
""
,
""
],
startTime
:
[
""
,
""
],
endTime
:
[
""
,
""
]
}
,
currencyList
:
[],
tradeCityList
:[],
dept
:
false
,
// 是否部门订单
}
;
tradeCityList
:
[],
channelList
:
[],
AddressCity
:
[],
AddressProvince
:
[],
AddressTown
:
[],
destCountryId
:
null
,
objectiveId
:
null
,
destWarehouseId
:
null
,
// 选中数组
ids
:
[],
//目的国
countryList
:
[],
//目的城市
cityList
:
[],
//目的仓
destWarehouseList
:
[],
dept
:
false
// 是否部门订单
}
}
,
computed
:{
currencyMap
(){
let
map
=
{
}
this
.
currencyList
.
forEach
(
item
=>
{
map
[
item
.
id
]
=
this
.
$l
(
item
,
'
title
'
)
}
)
return
map
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
)
return
this
.
tradeCityList
.
filter
(
(
item
)
=>
item
.
type
==
2
)
}
,
importCityList
()
{
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
1
)
return
this
.
tradeCityList
.
filter
(
(
item
)
=>
item
.
type
==
1
)
}
,
transportTypes
()
{
let
obj
=
{
}
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_TRANSPORT_TYPE
).
forEach
((
item
)
=>
{
obj
[
item
.
value
]
=
item
}
)
return
obj
}
}
,
activated
(){
activated
()
{
this
.
getList
()
}
,
created
()
{
console
.
log
(
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_OFFER_STATUS
))
console
.
log
(
"
offer index
"
,
this
.
$route
)
// 部门订单
if
(
this
.
$route
.
fullPath
.
indexOf
(
'
dept
'
)
>
-
1
)
{
if
(
this
.
$route
.
fullPath
.
indexOf
(
"
dept
"
)
>
-
1
)
{
this
.
dept
=
true
}
getTradeCityList
().
then
(
res
=>
this
.
tradeCityList
=
res
.
data
)
getTradeCityList
().
then
(
(
res
)
=>
(
this
.
tradeCityList
=
res
.
data
)
)
getCurrencyList
().
then
(
res
=>
{
getCurrencyList
().
then
(
(
res
)
=>
{
this
.
currencyList
=
res
.
data
}
)
this
.
getList
();
this
.
getList
()
getChannelList
().
then
((
res
)
=>
(
this
.
channelList
=
res
.
data
))
this
.
init
()
}
,
watch
:
{
destCountryId
:
{
//监听当前地区值的变化,于与上方地区值进行了双向绑定
deep
:
true
,
//深度监听
handler
()
{
//每当值省份值改变时其下地区值进行清空
this
.
AddressCity
=
[]
this
.
AddressTown
=
[]
this
.
objectiveId
=
""
this
.
destWarehouseId
=
""
this
.
findByprovinceCode
()
if
(
this
.
destCountryId
==
""
)
{
getRegionList
(
4
,
4
)
.
then
(({
data
}
)
=>
{
this
.
AddressCity
=
data
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
)
}
)
getRegionList
(
5
,
5
)
.
then
(({
data
}
)
=>
{
this
.
AddressTown
=
data
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
)
}
)
}
else
if
(
this
.
destCountryId
!=
""
&&
this
.
objectiveId
==
""
&&
this
.
destWarehouseId
==
""
)
{
getRegionList
(
2
,
this
.
destCountryId
)
.
then
(({
data
}
)
=>
{
this
.
AddressCity
=
data
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
)
}
)
getRegionList
(
5
,
5
)
.
then
(({
data
}
)
=>
{
this
.
AddressTown
=
data
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
)
}
)
}
//重新加载目的城市
//目的城市
// getRegionList(4, 4).then((
{
data
}
)
=>
{
// this.AddressCity = data;
//
}
)
// .catch(error =>
{
// console.log(error);
//
}
);
// getRegionList(5, 5).then((
{
data
}
)
=>
{
// this.AddressTown = data;
//
}
)
// .catch(error =>
{
// console.log(error);
//
}
);
}
}
,
objectiveId
:
{
deep
:
true
,
//深度监听
handler
()
{
this
.
AddressTown
=
[]
this
.
destWarehouseId
=
""
this
.
findBycityCode
()
if
(
this
.
objectiveId
!=
""
&&
this
.
destCountryId
!=
""
&&
this
.
destWarehouseId
==
""
)
{
//获取当前城市值id,获取该城市下区域
getRegionList
(
3
,
this
.
objectiveId
)
.
then
(({
data
}
)
=>
{
this
.
AddressTown
=
data
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
)
}
)
}
else
if
(
this
.
destCountryId
==
""
&&
this
.
objectiveId
==
""
&&
this
.
destWarehouseId
==
""
)
{
getRegionList
(
5
,
5
)
.
then
(({
data
}
)
=>
{
this
.
AddressTown
=
data
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
)
}
)
}
else
if
(
this
.
destCountryId
!=
""
&&
this
.
objectiveId
==
""
&&
this
.
destWarehouseId
==
""
)
{
getRegionList
(
2
,
this
.
destCountryId
)
.
then
(({
data
}
)
=>
{
this
.
AddressCity
=
data
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
)
}
)
getRegionList
(
5
,
5
)
.
then
(({
data
}
)
=>
{
this
.
AddressTown
=
data
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
)
}
)
}
}
}
,
destWarehouseId
:
{
deep
:
true
,
//深度监听
handler
()
{
if
(
this
.
objectiveId
!=
""
&&
this
.
destCountryId
!=
""
&&
this
.
destWarehouseId
==
""
)
{
//获取当前城市值id,获取该城市下区域
getRegionList
(
3
,
this
.
objectiveId
)
.
then
(({
data
}
)
=>
{
this
.
AddressTown
=
data
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
)
}
)
}
else
if
(
this
.
destCountryId
!=
""
&&
this
.
objectiveId
==
""
&&
this
.
destWarehouseId
==
""
)
{
getRegionList
(
5
,
5
)
.
then
(({
data
}
)
=>
{
this
.
AddressTown
=
data
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
)
}
)
}
}
}
}
,
methods
:
{
init
()
{
//加载时发起请求获取所有省份值
getRegionList
(
1
,
1
)
.
then
(({
data
}
)
=>
{
this
.
AddressProvince
=
data
console
.
log
(
this
.
AddressProvince
)
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
)
}
)
//目的城市
getRegionList
(
4
,
4
)
.
then
(({
data
}
)
=>
{
this
.
AddressCity
=
data
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
)
}
)
//目的仓
getRegionList
(
5
,
5
)
.
then
(({
data
}
)
=>
{
this
.
AddressTown
=
data
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
)
}
)
}
,
findByprovinceCode
()
{
//获取当前省份值id,获取该省份下城市 destCountryId provinceCode
getRegionList
(
2
,
this
.
destCountryId
)
.
then
(({
data
}
)
=>
{
this
.
AddressCity
=
data
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
)
}
)
}
,
findBycityCode
()
{
//获取当前城市值id,获取该城市下区域
getRegionList
(
3
,
this
.
objectiveId
)
.
then
(({
data
}
)
=>
{
this
.
AddressTown
=
data
// 去重
// let uniqueDataList = data.filter((item, index, self) =>
{
// // 返回第一个匹配项的索引,用于判断当前项是否为第一个匹配项
// const firstIndex = self.findIndex((obj) => obj.guojia === item.guojia);
// // 如果当前项是第一个匹配项,则保留,否则过滤掉
// return index === firstIndex;
//
}
);
// this.AddressProvince = uniqueDataList
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
)
}
)
}
,
formatQuery
()
{
let
obj
=
{
}
//目的国
if
(
this
.
destCountryId
!=
null
&&
this
.
destCountryId
!=
""
)
{
obj
.
destCountryIds
=
this
.
destCountryId
}
//目的城市
if
(
this
.
objectiveId
!=
null
&&
this
.
objectiveId
!=
""
)
{
obj
.
objectiveIds
=
this
.
objectiveId
}
//目的仓
if
(
this
.
destWarehouseId
!=
null
&&
this
.
destWarehouseId
!=
""
)
{
obj
.
destWarehouseIds
=
this
.
destWarehouseId
}
obj
.
beginCreateTime
=
this
.
queryTmp
.
createTime
[
0
]
obj
.
endCreateTime
=
this
.
queryTmp
.
createTime
[
1
]
obj
.
beginStopTime
=
this
.
queryTmp
.
stopTime
[
0
]
obj
.
endStopTime
=
this
.
queryTmp
.
stopTime
[
1
]
obj
.
beginStartTime
=
this
.
queryTmp
.
startTime
[
0
]
obj
.
endStartTime
=
this
.
queryTmp
.
startTime
[
1
]
obj
.
beginEndTime
=
this
.
queryTmp
.
endTime
[
0
]
obj
.
endEndTime
=
this
.
queryTmp
.
endTime
[
1
]
return
obj
}
,
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
let
func
=
this
.
dept
?
offerDeptPage
:
getOfferPage
// 执行查询
func
(
this
.
queryParams
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
}
);
func
({
...
this
.
queryParams
,
...
this
.
formatQuery
()
}
).
then
((
response
)
=>
{
this
.
list
=
response
.
data
.
list
this
.
total
=
response
.
data
.
total
this
.
loading
=
false
}
)
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
()
;
this
.
queryParams
.
pageNo
=
1
this
.
getList
()
}
,
/** 重置按钮操作 */
resetQuery
()
{
...
...
@@ -230,62 +544,70 @@ export default {
pageNo
:
1
,
pageSize
:
10
}
this
.
handleQuery
()
;
this
.
handleQuery
()
}
,
/** 新增按钮操作 */
handleAdd
()
{
return
this
.
$router
.
push
(
'
create
'
)
return
this
.
$router
.
push
(
"
create
"
)
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
return
this
.
$router
.
push
(
'
edit?id=
'
+
row
.
offerId
)
return
this
.
$router
.
push
(
"
edit?id=
"
+
row
.
offerId
)
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
offerId
=
row
.
offerId
;
this
.
$modal
.
confirm
(
this
.
$t
(
'
是否确认删除报价单管理编号为{offerId
}
的数据项?
'
,
{
offerId
}
)).
then
(
function
()
{
return
deleteOffer
(
offerId
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
删除成功
"
));
}
).
catch
(()
=>
{
}
);
const
offerId
=
row
.
offerId
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认删除报价单管理编号为{offerId
}
的数据项?
"
,
{
offerId
}
))
.
then
(
function
()
{
return
deleteOffer
(
offerId
)
}
)
.
then
(()
=>
{
this
.
getList
()
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
删除成功
"
))
}
)
.
catch
(()
=>
{
}
)
}
,
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{
...
this
.
queryParams
}
;
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
let
params
=
{
...
this
.
queryParams
,
...
this
.
formatQuery
()
}
params
.
pageNo
=
undefined
params
.
pageSize
=
undefined
// 执行导出
this
.
$confirm
(
this
.
$t
(
'
是否确认导出所有报价单管理数据项?
'
)).
then
(()
=>
{
this
.
exportLoading
=
true
;
if
(
this
.
dept
){
this
.
$confirm
(
this
.
$t
(
"
是否确认导出所有报价单管理数据项?
"
))
.
then
(()
=>
{
this
.
exportLoading
=
true
if
(
this
.
dept
)
{
return
exportDeptOfferExcel
(
params
)
}
else
return
exportOfferExcel
(
params
);
}
).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
报价列表.xls
'
);
this
.
exportLoading
=
false
;
}
).
catch
(()
=>
{
}
);
}
else
return
exportOfferExcel
(
params
)
}
)
.
then
((
response
)
=>
{
this
.
$download
.
excel
(
response
,
"
报价列表.xls
"
)
this
.
exportLoading
=
false
}
)
.
catch
(()
=>
{
}
)
}
,
cancel
(
id
){
this
.
doAction
(
this
.
$t
(
'
确定要取消此报价单么?
'
),
cancel
,
id
);
cancel
(
id
)
{
this
.
doAction
(
this
.
$t
(
"
确定要取消此报价单么?
"
),
cancel
,
id
)
}
,
recovery
(
id
){
this
.
doAction
(
this
.
$t
(
'
确定要恢复此报价单么?
'
),
recovery
,
id
);
recovery
(
id
)
{
this
.
doAction
(
this
.
$t
(
"
确定要恢复此报价单么?
"
),
recovery
,
id
)
}
,
deleteOffer
(
id
){
this
.
doAction
(
this
.
$t
(
'
确定要删除此报价单么?
'
),
deleteOffer
,
id
);
deleteOffer
(
id
)
{
this
.
doAction
(
this
.
$t
(
"
确定要删除此报价单么?
"
),
deleteOffer
,
id
)
}
,
doAction
(
tips
,
action
,
id
){
this
.
$confirm
(
tips
).
then
(
res
=>
{
return
action
(
id
)
}
)
.
then
(()
=>
{
this
.
$message
.
success
(
'
操作成功
'
)
this
.
handleQuery
()
}
)
doAction
(
tips
,
action
,
id
)
{
this
.
$confirm
(
tips
)
.
then
((
res
)
=>
{
return
action
(
id
)
}
)
.
then
(()
=>
{
this
.
$message
.
success
(
"
操作成功
"
)
this
.
handleQuery
()
}
)
}
}
}
;
}
<
/script
>
src/views/ecw/offer/logList.vue
View file @
39da2846
<
template
>
<div
class=
"app-container"
>
<el-card>
<div
slot=
"header"
class=
"card-title"
>
{{
$t
(
'
跟进记录列表
'
)
}}
</div>
<!-- 列表 -->
<div
class=
"offer-header"
>
<span
style=
"font-size: 15px;"
>
{{
$t
(
'
报价单号
'
)
}}
:
{{
number
}}
</span>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
>
{{
$t
(
'
新增
'
)
}}
</el-button>
</div>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
:label=
"$t('序号')"
align=
"center"
prop=
"id"
type=
"index"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('跟进类型')"
align=
"center"
prop=
"type"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.ECW_OFFER_TYPE"
:value=
"scope.row.type"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('联系人')"
align=
"center"
prop=
"contactName"
/>
<el-table-column
:label=
"$t('跟进方式')"
align=
"center"
prop=
"followUpMethod"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_FOLLOW_METHOD"
:value=
"scope.row.followUpMethod"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('跟进时间')"
align=
"center"
prop=
"followUpTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
followUpTime
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('客户反馈')"
align=
"center"
prop=
"customerFeedback"
/>
<el-table-column
:label=
"$t('处理结果')"
align=
"center"
prop=
"processingResults"
/>
<el-table-column
:label=
"$t('客户经理')"
align=
"center"
prop=
"followUpSalesmanName"
>
<
template
slot-scope=
"scope"
>
<span>
{{
getCustomerService
(
scope
.
row
.
followUpSalesmanId
)
}}
</span>
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"params.page"
:limit.sync=
"params.rows"
@
pagination=
"getList"
/>
</el-card>
<logListCommon
:offerId=
"offerId"
/>
</div>
</
template
>
<
script
>
import
{
getOfferLogPage
}
from
"
@/api/ecw/offerLog
"
;
import
{
DICT_TYPE
}
from
'
@/utils/dict
'
import
{
getOffer
}
from
'
@/api/ecw/offer
'
import
{
userList
}
from
"
@/api/system/user
"
import
logListCommon
from
"
@/views/ecw/offer/logListCommon
"
export
default
{
name
:
"
OfferLog
"
,
components
:
{
},
name
:
"
offerLogList
"
,
components
:
{
logListCommon
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
list
:
[],
total
:
0
,
params
:{
page
:
1
,
rows
:
20
,
offerId
:
0
,
type
:
2
},
number
:
''
,
relationId
:
0
,
creatorName
:
'
test
'
,
creatorData
:[]
};
return
{}
},
created
()
{
if
(
this
.
$route
.
query
.
offerId
){
this
.
params
.
offerId
=
this
.
$route
.
query
.
offerId
this
.
getList
();
this
.
getRelationID
()
computed
:
{
offerId
()
{
return
parseInt
(
this
.
$route
.
query
.
offerId
||
0
)
}
userList
(
'
customer service
'
).
then
(
res
=>
this
.
creatorData
=
res
.
data
)
},
methods
:
{
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
let
params
=
{...
this
.
params
};
// 执行查询
getOfferLogPage
(
params
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
});
},
getCustomerService
(
id
){
var
user
=
this
.
creatorData
.
find
(
item
=>
item
.
id
==
id
)
if
(
user
)
return
user
.
nickname
return
''
},
getRelationID
(){
getOffer
(
this
.
params
.
offerId
).
then
(
response
=>
{
this
.
relationId
=
response
.
data
.
consignorId
;
this
.
number
=
response
.
data
.
number
;
})
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
$router
.
push
({
path
:
"
/offer/createLog
"
,
query
:{
offerId
:
this
.
params
.
offerId
,
number
:
this
.
number
}
});
},
}
}
;
}
</
script
>
<
style
scoped
>
.card-title
{
font-size
:
18px
;
font-weight
:
bold
;
}
.offer-header
{
padding-bottom
:
16px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.card-title
{
font-size
:
18px
;
font-weight
:
bold
;
}
.offer-header
{
padding-bottom
:
16px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
</
style
>
src/views/ecw/offer/logListCommon.vue
0 → 100644
View file @
39da2846
<
template
>
<div>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<el-form
size=
"small"
:inline=
"true"
label-width=
"100px"
>
<el-form-item
:label=
"$t('编号')"
prop=
"number"
>
<el-input
v-model.trim=
"followForm.number"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('报价单号')"
prop=
"offerNumber"
>
<el-input
v-model.trim=
"followForm.offerNumber"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('联系人')"
prop=
"contactName"
>
<el-input
v-model.trim=
"followForm.contactName"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('联系方式')"
prop=
"contactPhone"
>
<el-input
v-model.trim=
"followForm.contactPhone"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('客户经理')"
prop=
"salesmanIds"
>
<user-selector
v-model=
"followForm.salesmanIds"
multiple
clearable
@
change=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('下次跟进时间')"
>
<el-date-picker
v-model=
"followFormTmp.nextTime"
type=
"datetimerange"
range-separator=
"-"
:start-placeholder=
"$t('开始日期')"
:end-placeholder=
"$t('结束日期')"
value-format=
"yyyy-MM-dd HH:mm:ss"
@
change=
"handleQuery"
>
</el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('关联跟进记录')"
prop=
"parentNumber"
>
<el-input
v-model.trim=
"followForm.parentNumber"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<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>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"getCustomerFollowList"
>
{{
$t
(
"
搜索
"
)
}}
</el-button>
<el-button
type=
"primary"
@
click=
"
() =>
{
followForm = { pageNo: 1, pageSize: 10 }
getCustomerFollowList()
}
"
>
{{
$t
(
"
重置
"
)
}}
</el-button>
<el-button
type=
"success"
@
click=
"customerFollowFn('follow')"
v-hasPermi=
"['ecw:customer:follow-create']"
>
{{
$t
(
"
新增
"
)
}}
</el-button>
<el-button
type=
"warning"
@
click=
"handleExport"
v-hasPermi=
"['ecw:customer:follow-export']"
>
{{
$t
(
"
导出
"
)
}}
</el-button>
</el-form-item>
</el-form>
</div>
<el-table
:data=
"customerFollowList"
style=
"width: 100%"
>
<el-table-column
prop=
"number"
:label=
"$t('编号')"
width=
"120"
>
<template
slot-scope=
"scope"
>
<a
href=
"javascript:void(0)"
@
click=
"handleCustomerFollowLink(scope.row)"
class=
"link-type"
>
{{
scope
.
row
.
number
}}
</a>
</
template
>
</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=
"offerNumber"
: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=
"customerNumber"
:label=
"$t('客户编号')"
></el-table-column>
<el-table-column
prop=
"contactName"
:label=
"$t('联系人')"
></el-table-column>
<el-table-column
prop=
"contactPhone"
: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"
prop=
"parentNumber"
></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=
"150px"
:label=
"$t('操作')"
align=
"center"
fixed=
"right"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
v-if=
"!scope.row.status"
@
click=
"handleCustomerFollow(scope.row)"
v-hasPermi=
"['ecw:customer:follow-update']"
>
{{
$t
(
"
编辑
"
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-collection"
@
click=
"handleCustomerFollow(scope.row, true)"
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>
<customer-follow
ref=
"customerFollow"
@
handleCustomerFollowAdd=
"handleCustomerFollowAdd"
@
refresh=
"handleQuery"
v-if=
"customerFollowVisible"
:customer-id=
"customerId"
:offerId=
"offerId"
/>
</div>
</template>
<
script
>
import
{
getCustomerFollowList
,
exportCustomerFollow
}
from
"
@/api/ecw/customerFollow
"
import
CustomerFollow
from
"
@/views/ecw/customer/components/customerFollow
"
import
UserSelector
from
"
@/components/UserSelector
"
export
default
{
name
:
"
logListCommon
"
,
components
:
{
UserSelector
,
CustomerFollow
},
props
:
[
"
customerId
"
,
"
offerId
"
],
data
()
{
return
{
customerFollowVisible
:
false
,
customerFollowTotal
:
0
,
customerFollowList
:
[],
followForm
:
{
pageNo
:
1
,
pageSize
:
10
},
followFormTmp
:
{
nextTime
:
[
""
,
""
]
}
}
},
created
()
{
this
.
handleQuery
()
},
computed
:
{
isChinese
()
{
return
this
.
$i18n
.
locale
===
"
zh_CN
"
},
customerId_offerId
()
{
return
`
${
this
.
customerId
}
_
${
this
.
offerId
}
`
}
},
watch
:
{
customerId_offerId
()
{
this
.
handleQuery
()
}
},
methods
:
{
handleCustomerFollowAdd
(
row
)
{
this
.
customerFollowVisible
=
false
setTimeout
(()
=>
{
this
.
customerFollowVisible
=
true
this
.
$nextTick
((
_
)
=>
{
this
.
$refs
[
"
customerFollow
"
].
handleUpdate
(
row
)
})
},
100
)
},
handleCustomerFollow
(
row
,
flag
)
{
this
.
customerFollowVisible
=
true
this
.
$nextTick
((
_
)
=>
{
this
.
$refs
[
"
customerFollow
"
].
handleUpdate
(
row
,
flag
)
})
},
handleCustomerFollowLink
(
row
)
{
this
.
customerFollowVisible
=
true
this
.
$nextTick
((
_
)
=>
{
this
.
$refs
[
"
customerFollow
"
].
handleView
(
row
)
})
},
formatQuery
()
{
let
obj
=
{}
obj
.
customerId
=
this
.
customerId
||
null
obj
.
offerId
=
this
.
offerId
||
null
obj
.
beginNextTime
=
this
.
followFormTmp
.
nextTime
[
0
]
obj
.
endNextTime
=
this
.
followFormTmp
.
nextTime
[
1
]
return
obj
},
handleQuery
()
{
this
.
followForm
.
pageNo
=
1
this
.
customerFollowTotal
=
0
this
.
customerFollowList
=
[]
this
.
getCustomerFollowList
()
},
/** 跟进记录导出按钮操作 */
handleExport
()
{
// 执行导出
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认导出客户跟进记录数据项?
"
)).
then
(()
=>
{
exportCustomerFollow
({
...
this
.
followForm
,
...
this
.
formatQuery
(),
pageNo
:
1
,
pageSize
:
10000000
}).
then
((
r
)
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
已加入导出队列,请稍后在下载日志中下载
"
))
})
})
},
getCustomerFollowList
()
{
getCustomerFollowList
({
...
this
.
followForm
,
...
this
.
formatQuery
()
}).
then
((
r
)
=>
{
this
.
customerFollowList
=
r
.
data
.
list
this
.
customerFollowTotal
=
r
.
data
.
total
})
}
}
}
</
script
>
src/views/ecw/order/index.vue
View file @
39da2846
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/views/ecw/productPrice/batchEdit.vue
View file @
39da2846
...
...
@@ -317,7 +317,6 @@ export default {
specialProducts
:
[],
// priceStepList: [{},{}], // 阶梯价格
// specialList:[], // 特殊需求,默认四个
rules
()
{},
product
:
null
,
/* productType: null, */
currencyList
:
[],
...
...
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