Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
portalhtml
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
rex
portalhtml
Commits
9ef133d8
Commit
9ef133d8
authored
Oct 13, 2021
by
qinj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代理商审批列表页
parent
7ef66d90
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
109 additions
and
299 deletions
+109
-299
customers.js
src/api/customers.js
+12
-7
zh.js
src/lang/zh.js
+2
-1
Navbar.vue
src/layout/components/Navbar.vue
+2
-2
constant.js
src/views/customers/potential-customers/constant.js
+79
-134
index.vue
src/views/customers/potential-customers/index.vue
+14
-155
No files found.
src/api/customers.js
View file @
9ef133d8
...
...
@@ -8,7 +8,11 @@ export const customer = {
updateUrl
:
'/customer/update'
,
deleteUrl
:
'/customer/delete'
,
}
//查询省级供应商待审批列表
export
const
province
=
{
searchUrl
:
'/customer/searchProcessCustomer'
,
}
// 查询全部代理商数据
export
function
getAllData
(
data
)
{
return
request
({
...
...
@@ -25,6 +29,14 @@ export function customerCreate(data) {
data
})
}
// 签约产品组
export
function
searchProduct
(
data
)
{
return
request
({
method
:
'post'
,
url
:
'/commonSession/searchAll'
,
data
})
}
// // 客户发布记录
// export const releaseRecord = {
// createUrl: '/releaserecord/create',
...
...
@@ -73,13 +85,6 @@ export function customerCreate(data) {
// })
// }
// // 一级分类
// export function fetchFirstLevelClassification() {
// return request({
// method: 'post',
// url: '/levelClassification/searchAllOne'
// })
// }
// // 二级分类
// export function fetchSecondLevelClassification(data) {
...
...
src/lang/zh.js
View file @
9ef133d8
...
...
@@ -185,7 +185,8 @@ export default {
takeEffect
:
'生效'
,
invalid
:
'失效'
,
baseInfo
:
'基础信息'
,
viewAttachments
:
'查看附件'
viewAttachments
:
'查看附件'
,
approve
:
'审批'
},
example
:
{
warning
:
'创建和编辑页面是不能被 keep-alive 缓存的,因为keep-alive 的 include 目前不支持根据路由来缓存,所以目前都是基于 component name 来进行缓存的。如果你想类似的实现缓存效果,可以使用 localStorage 等浏览器缓存方案。或者不要使用 keep-alive 的 include,直接缓存所有页面。详情见'
...
...
src/layout/components/Navbar.vue
View file @
9ef133d8
...
...
@@ -55,7 +55,7 @@
</ul>
</li>
<!-- 消息三小列表 -->
<li
<
!--
<
li
v-for=
"route in topRoutes.slice(-1)"
:key=
"route.meta.title"
class=
"nav-item"
...
...
@@ -72,7 +72,7 @@
/>
<span>
{{
route
.
meta
.
topTitle
}}
</span>
<el-badge
:value=
"2"
class=
"item"
/>
</li>
</li>
-->
</ul>
<!--
<div
class=
"Mymessage"
>
<router-link
to=
"/message/index"
>
...
...
src/views/customers/potential-customers/constant.js
View file @
9ef133d8
import
dictionary
from
'@/api/dictionary
'
import
{
customer
}
from
'@/api/customers'
import
i18n
from
'@/lang
'
import
{
province
,
searchProduct
}
from
'@/api/customers'
// 潜在客户主列表配置
const
tableConfig
=
{
url
:
customer
.
searchUrl
,
initialParams
:
{
roleCode
:
'BUP002'
},
url
:
province
.
searchUrl
,
defaultColumns
:
{
minWidth
:
120
,
showOverflowTooltip
:
true
,
align
:
'center'
},
columns
:
{
searchColums
:
{
Name
:
{
label
:
'客户名称'
,
label
:
'公司名称'
,
showInSearch
:
true
,
type
:
'input'
,
fixed
:
'left'
,
renderItem
:
(
h
,
scope
,
listeners
)
=>
{
return
h
(
'el-button'
,
{
return
h
(
'el-button'
,
{
on
:
{
click
:
(
e
)
=>
listeners
.
handleCheck
(
scope
.
row
)
click
:
(
e
)
=>
listeners
.
handleDetails
(
scope
.
row
)
},
props
:
{
type
:
'text'
}
},
scope
.
row
.
ID
)
}
},
scope
.
row
.
Name
)
ExtProductGroup_SDK
:
{
label
:
'签约产品组'
,
showInSearch
:
true
,
type
:
'select'
,
fixed
:
'left'
,
isOptions
:
'true'
,
options
:
async
data
=>
{
const
res
=
await
searchProduct
({
code
:
'ExtProductGroup_SDK'
,
module
:
'Customer'
})
var
result
=
res
.
map
(
item
=>
{
return
{
text
:
item
.
content
,
value
:
item
.
keyword
}
})
return
result
},
showInSearch
:
true
},
Ext_CustomerType_KUT
:
{
label
:
'客户类型'
,
type
:
'select'
,
value
:
'Ext_CustomerType_KUTText'
,
showInSearch
:
true
,
options
:
dictionary
.
customerType
},
Ext_CustomerStatus_KUT
:
{
label
:
'客户状态'
,
type
:
'select'
,
value
:
'Ext_CustomerStatus_KUTText'
,
showInSearch
:
true
,
options
:
dictionary
.
customerStatus
columns
:
{
ExtCustomerID_SDK
:
{
label
:
'代理商编码'
,
type
:
'input'
},
Ext_CustomerMainContactName_KUT
:
{
label
:
'
联系人
'
,
Name
:
{
label
:
'
公司名称
'
,
type
:
'input'
},
Ext
_CustomerMainContactPhone_KUT
:
{
label
:
'
手机号码
'
,
Ext
CorporateName_SDK
:
{
label
:
'
法定人代表
'
,
type
:
'input'
},
Ext
_CustomerFollowUpDate_KUT
:
{
label
:
'
最后跟进
'
,
Ext
SocialUnifiedCreditCode_SDK
:
{
label
:
'
统一社会信用代码
'
,
type
:
'input'
},
Ext_CustomerForm_KUT
:
{
label
:
'来源'
,
value
:
'Ext_CustomerForm_KUTText
'
,
CreationOn
:
{
label
:
'注册时间
'
,
type
:
'input'
},
// Ext_QuoteOppotunity_KUT: {
// type: 'input',
// label: '代理商类型',
// showInSearch: true
// },
handle
:
{
label
:
'操作'
,
hideInFilter
:
true
,
fixed
:
'right'
,
minWidth
:
100
,
hideInFilter
:
true
,
renderItem
:
(
h
,
scope
,
listeners
)
=>
{
return
h
(
'div'
,
{},
[
h
(
'el-button'
,
{
on
:
{
click
:
(
e
)
=>
listeners
.
handleEdit
(
scope
.
row
)
},
class
:
'el-icon-edit'
,
props
:
{
type
:
'text'
}
},
'编辑'
),
scope
.
row
.
Ext_CustomerStatus_KUTText
===
'草稿'
&&
h
(
'el-button'
,
{
return
h
(
'div'
,
[
h
(
'el-button'
,
{
on
:
{
click
:
(
e
)
=>
listeners
.
handleDelete
(
scope
.
row
)
click
:
(
e
)
=>
listeners
.
handleEdit
(
scope
.
row
,
'approve'
)
},
class
:
'el-icon-delete'
,
props
:
{
type
:
'text'
type
:
'text'
,
label
:
'审批'
}
},
'删除'
)
},
i18n
.
t
(
'table.approve'
)),
// h('el-button', {
// on: {
// click: (e) => listeners.handleTakeEffect(scope.row, 'takeEffect')
// },
// props: {
// icon: 'el-icon-circle-check',
// type: 'text'
// }
// }, i18n.t('table.takeEffect')),
// h('el-button', {
// on: {
// click: (e) => listeners.handleInvalid(scope.row, 'invalid')
// },
// props: {
// icon: 'el-icon-circle-check',
// type: 'text'
// }
// }, i18n.t('table.invalid'))
])
}
}
}
}
// 注销客户弹框配置
const
CancellationFormConfig
=
{
title
:
'注销原因'
,
createUrl
:
customer
.
updateUrl
,
labelPosition
:
'left'
,
submitBtnText
:
'确定'
,
span
:
22
,
formDesc
:
{
Ext_CustomerStatus_KUT
:
{
type
:
'input'
,
label
:
'客户状态'
,
default
:
'131'
,
vif
:
false
,
layout
:
24
},
Ext_CustomerCancellationReasons_KUT
:
{
type
:
'textarea'
,
label
:
'注销原因'
,
layout
:
24
}
}
}
// 激活客户弹框配置
const
ActivationFormConfig
=
{
title
:
'激活原因'
,
createUrl
:
customer
.
updateUrl
,
labelPosition
:
'left'
,
submitBtnText
:
'确定'
,
span
:
22
,
formDesc
:
{
Ext_CustomerStatus_KUT
:
{
type
:
'input'
,
label
:
'客户状态'
,
default
:
'111'
,
vif
:
false
,
layout
:
24
},
Ext_CustomerActivationReasons_KUT
:
{
type
:
'textarea'
,
label
:
'激活原因'
,
layout
:
24
}
}
}
// 移入资源池弹框配置
const
ResourcePoolFormConfig
=
{
title
:
'移入资源池'
,
createUrl
:
customer
.
toPoolUrl
,
labelPosition
:
'left'
,
submitBtnText
:
'确定'
,
span
:
22
,
formDesc
:
{
Ext_CustomerActivationReasons_KUT
:
{
type
:
'textarea'
,
label
:
'移入资源池原因'
,
layout
:
24
}
}
}
export
default
{
tableConfig
,
ActivationFormConfig
,
CancellationFormConfig
,
ResourcePoolFormConfig
}
export
default
tableConfig
src/views/customers/potential-customers/index.vue
View file @
9ef133d8
<
template
>
<div
class=
"app-container"
>
<ele-search
:columns=
"tableConfig.
column
s"
:columns=
"tableConfig.
searchColum
s"
@
handleSearch=
"handleSearch"
@
handleReset=
"handleReset"
@
handleFilter=
"handleFilter"
/>
<div
class=
"table-container"
>
<TableBtns>
<template
v-slot:left
>
<el-dropdown
style=
"margin-right: 10px;"
@
command=
"handleAdd"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
>
添加
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
:command=
"1"
>
创建个人客户
</el-dropdown-item>
<el-dropdown-item
:command=
"2"
>
创建企业客户
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button
plain
icon=
"el-icon-refresh"
@
click=
"handleShowDialog(config.followTask)"
>
分配
</el-button>
<el-button
plain
icon=
"el-icon-user"
@
click=
"handleShowDialog(config.resourcePool)"
>
转资源池
</el-button>
<el-button
plain
icon=
"el-icon-document"
@
click=
"handleShowDialog(config.supervise)"
>
督办
</el-button>
<export-btn
:expand-params=
"expandParams"
config-code=
"customer"
/>
</
template
>
</TableBtns>
<ele-table
ref=
"eleTable"
v-bind=
"tableConfig"
:expand-params=
"expandParams"
:listeners=
"tableListeners"
@
handleSelectionChange=
"handleSelectionChange"
/>
<!-- 弹框部分 -->
<ele-form-dialog
:title=
"dialogTitle"
:form-data=
"formData"
:request-fn=
"handleSave"
:visible
.
sync=
"dialogFormVisible"
v-bind=
"formConfig"
:loading=
"loading"
/>
</div>
</div>
...
...
@@ -71,125 +22,33 @@
<
script
>
import
constant
from
'./constant'
import
tableMixin
from
'@/mixins/table'
import
followTask
from
'../important-customers/components/record-info/components/follow-task/constant'
import
supervise
from
'../important-customers/components/record-info/components/supervise/constant'
import
{
customer
}
from
'@/api/customers'
export
default
{
mixins
:
[
tableMixin
],
inject
:
[
'reload'
],
data
()
{
return
{
expandParams
:
{},
// 筛选条件
tableListeners
:
{},
// 事件监听对象,供ele-table内部调用
tableConfig
:
constant
.
tableConfig
,
enterpriseUrl
:
'/customers/enterprise'
,
individualUrl
:
'/customers/individual'
,
enterpriseDetailUrl
:
'/customers/enterprise-detail'
,
individualDetailUrl
:
'/customers/individual-detail'
,
selection
:
[],
config
:
{
followTask
,
supervise
,
resourcePool
:
constant
.
ResourcePoolFormConfig
},
dialogTitle
:
''
,
dialogFormVisible
:
false
,
formData
:
{},
formConfig
:
{
formDesc
:
{}
},
loading
:
false
tableConfig
:
constant
}
},
created
()
{
this
.
tableListeners
=
{
handleCheck
:
this
.
handleCheck
,
handleEdit
:
this
.
handleEdit
,
handleDelete
:
this
.
handleDelete
// handleDetails: this.handleDetails, // 添加
// handleTakeEffect: this.handleTakeEffect, // 生效
handleEdit
:
this
.
handleEdit
,
// 编辑
// handleInvalid: this.handleInvalid // 失效
}
},
methods
:
{
handleAdd
(
type
)
{
if
(
type
===
1
)
{
this
.
$router
.
push
({
path
:
this
.
individualUrl
})
}
else
{
this
.
$router
.
push
({
path
:
this
.
enterpriseUrl
})
}
},
handleCheck
(
row
)
{
if
(
row
.
Ext_CustomerType_KUT
===
'121'
)
{
this
.
$router
.
push
({
path
:
this
.
individualDetailUrl
,
query
:
{
objectID
:
row
.
ObjectID
}
})
}
else
if
(
row
.
Ext_CustomerType_KUT
===
'131'
)
{
this
.
$router
.
push
({
path
:
this
.
enterpriseDetailUrl
,
query
:
{
objectID
:
row
.
ObjectID
}
})
}
},
handleEdit
(
row
)
{
if
(
row
.
Ext_CustomerType_KUT
===
'121'
)
{
this
.
$router
.
push
({
path
:
this
.
individualUrl
,
query
:
{
objectID
:
row
.
ObjectID
}
})
}
else
if
(
row
.
Ext_CustomerType_KUT
===
'131'
)
{
this
.
$router
.
push
({
path
:
this
.
enterpriseUrl
,
query
:
{
objectID
:
row
.
ObjectID
}
})
}
// 编辑
handleEdit
(
val
)
{
this
.
$router
.
push
({
path
:
'/customersAdd'
,
query
:{
id
:
val
.
ObjectID
}
})
},
handleSelectionChange
(
selection
)
{
console
.
log
(
selection
)
this
.
selection
=
selection
},
handleShowDialog
(
obj
)
{
if
(
this
.
selection
.
length
===
0
)
{
this
.
$message
.
warning
(
'请先选择一个客户'
)
return
}
this
.
dialogTitle
=
obj
.
title
?
obj
.
title
:
'添加'
+
obj
.
tableConfig
.
tableTitle
this
.
postUrl
=
obj
.
createUrl
this
.
formData
=
{
objectID
:
this
.
selection
[
0
].
ObjectID
,
roleCode
:
this
.
selection
[
0
].
roleCode
}
this
.
formConfig
=
obj
.
formConfig
||
obj
this
.
dialogFormVisible
=
true
},
handleSave
(
data
)
{
this
.
loading
=
true
data
=
this
.
$translateToC4CData
(
data
)
this
.
$request
(
this
.
postUrl
,
[
data
]).
then
(
res
=>
{
this
.
loading
=
false
this
.
dialogFormVisible
=
false
}).
catch
(()
=>
{
this
.
loading
=
false
})
},
handleDelete
(
row
)
{
this
.
$confirm
(
'此操作将删除该客户, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
const
data
=
{
objectID
:
row
.
ObjectID
,
ext_CustomerStatus_KUT
:
'191'
}
this
.
$request
(
customer
.
updateUrl
,
data
).
then
(
res
=>
{
this
.
$message
.
success
(
'删除成功'
)
this
.
handleSearch
()
})
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
>
</
style
>
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