Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5ef628c7
authored
Apr 10, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
商户管理;服务商管理
1 parent
2a823f4b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
609 additions
and
291 deletions
src/api/merchant.js
src/api/serviceManage.js
src/common/constants.js
src/router/routes.js
src/views/systemConfig/account/accountDetail.vue
src/views/systemConfig/account/accountList.vue
src/views/systemConfig/merchantDetail.vue → src/views/systemConfig/merchant/merchantDetail.vue
src/views/systemConfig/merchant/merchantManage.vue
src/views/systemConfig/merchant/viewDetail.vue
src/views/systemConfig/merchantManage.vue
src/views/systemConfig/serviceManage.vue
src/api/merchant.js
View file @
5ef628c
import
request
from
'./request'
import
RequestMethods
from
'./request.methods'
const
path
=
'dj.api.'
const
path2
=
'dj.api.smartcarlife.'
export
function
getList
(
data
)
{
...
...
@@ -7,6 +9,24 @@ export function getList(data) {
return
request
(
data
)
}
// 删除4s门店
export
function
deleteMerchant
(
data
)
{
data
.
method
=
`
${
path
}
servicemerchantref.delete.byId`
return
request
(
data
)
}
// 获取4s列表
export
function
serviceGetMerchantList
(
data
)
{
data
.
method
=
`
${
path
}
merchant.page`
return
request
(
data
)
}
// 新增4s门店
export
function
addServiceMerchant
(
data
)
{
data
.
method
=
`
${
path
}
servicemerchantref.add`
return
request
(
data
,
RequestMethods
.
POST
)
}
// 财务
export
function
updateRule
(
data
)
{
data
.
method
=
`
${
path2
}
merchantSettleAccountRule.update`
...
...
src/api/serviceManage.js
0 → 100644
View file @
5ef628c
import
request
from
'./request'
const
path
=
'dj.api.'
export
function
getList
(
data
)
{
data
.
method
=
`
${
path
}
servicemerchantref.page`
return
request
(
data
)
}
src/common/constants.js
View file @
5ef628c
...
...
@@ -2,22 +2,10 @@
* @Author: limin
* @Date: 2019-09-01 19:06:01
* @Last Modified by: chenwq
* @Last Modified time: 2021-0
1-20 11:24:55
* @Last Modified time: 2021-0
4-10 11:49:28
*/
// import { LOGIN_URL, REG_URL, ROLE_LIST_URL } from '@/api/sys.account'
// import { BASE_DATA_URL } from '@/api/sys.base'
export
const
TYPE_NAME
=
'confType'
/**
* 后台提供一个接 通过类型获取对应数据
* 此处定义类型
*/
// export const ConfigType = {
// STATION: 'STATION_TYPE',
// POST: 'POST_TYPE',
// SUBSYS: 'SUBSYSTEM_TYPE'
// }
/**
* 前端基础数据管理对应的接口名称的key
*/
...
...
@@ -26,35 +14,10 @@ export const BaseData = {
productType
:
'productType'
}
/**
* 注册类型
*/
export
const
RegistType
=
{
BY_SELF
:
'1'
,
// 自注册
BY_ADMIN
:
'2'
// 管理员创建
}
/**
* 前端免登录验证接口名
*/
// export const LogExternals = [
// 'fims.user.login', // 登录
// 'fims.user.register', // 注册
// 'fims.configuration.from.conftype', // 基础数据
// 'fims.role.list' // 角色列表
// ]
/**
* 登录来源
*/
// export const LOGIN_TYPE = 1 // 1pc,2小程序
/**
* 超级管理员类型
*/
export
const
SUPPER_ADMIN
=
true
//
/**
* 职务置灰选项
*/
// export const POST_DISABLED = ['2001', '2002', '2003'] // 总经理 仓库 部门经理
// 商户类型 - 除广汇外
export
const
userType
=
{
1
:
'员工'
,
...
...
src/router/routes.js
View file @
5ef628c
...
...
@@ -560,7 +560,7 @@ export const resources = {
label
:
'删除'
,
handle
:
'handleDelete'
}],
component
:
_import
(
'systemConfig/merchantManage'
)
component
:
_import
(
'systemConfig/merchant
/merchant
Manage'
)
},
'90604'
:
{
path
:
'/merchantDetail'
,
...
...
@@ -573,7 +573,7 @@ export const resources = {
cache
:
false
,
activePath
:
'/merchantManage'
},
component
:
_import
(
'systemConfig/merchantDetail'
)
component
:
_import
(
'systemConfig/merchant
/merchant
Detail'
)
},
'90605'
:
{
path
:
'/serviceManage'
,
...
...
@@ -591,7 +591,7 @@ export const resources = {
label
:
'关联服务商'
,
category
:
'Button'
,
type
:
'primary'
,
handle
:
'handle
Add
'
handle
:
'handle
Relate
'
},
{
authId
:
'9060502'
,
parentId
:
'90605'
,
...
...
@@ -614,7 +614,15 @@ export const resources = {
authId
:
'9060601'
,
parentId
:
'90606'
,
label
:
'虚拟对账账户'
,
handle
:
'handleApply'
handle
:
'handleApply'
,
ruleObj
:
{
attr
:
'userType'
,
rule
:
{
'2'
:
'虚拟对账账户'
,
'3'
:
'虚拟对账账户'
,
'4'
:
'账户详情'
}
}
}],
component
:
_import
(
'systemConfig/account/accountList'
)
},
...
...
src/views/systemConfig/account/accountDetail.vue
0 → 100644
View file @
5ef628c
<!-- 虚拟对公账户详情 -->
<
template
>
<div
class=
"account-detail"
>
<el-form
:model=
"detailForm"
label-width=
"190px"
v-loading=
"$store.state.d2admin.loading.value"
>
<p
class=
"edit-sub-title"
>
账户信息
</p>
<el-form-item
label=
"客户名称:"
prop=
"name"
>
<span>
{{
detailForm
.
merchantName
}}
</span>
</el-form-item>
<p
class=
"edit-sub-title"
>
申请资料
</p>
<block
v-for=
"(item, index) in applyForm"
:key=
"index"
>
<el-form-item
:label=
"item.label + ':'"
:prop=
"item.prop"
>
<span
v-if=
"item.type === 'img'"
>
<img
class=
"detail-img"
src=
"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=270411355,4161548721&fm=26&gp=0.jpg"
>
</span>
<span
v-else-if=
"item.formmater"
>
{{
item
.
formatter
(
item
)
}}
</span>
<span
v-else
>
{{
detailForm
[
item
.
prop
]
}}
</span>
</el-form-item>
</block>
</el-form>
</div>
</
template
>
<
script
>
export
default
{
name
:
'accountDetail'
,
data
()
{
return
{
applyForm
:
[{
label
:
'商户类型'
,
prop
:
'userType'
},
{
label
:
'法人姓名'
,
prop
:
''
},
{
label
:
'法人身份证号'
,
prop
:
''
},
{
label
:
'法人身份证正反面'
,
prop
:
''
,
type
:
'img'
},
{
label
:
'法人手机号'
,
prop
:
'userType'
},
{
label
:
'提现手机号'
,
prop
:
''
},
{
label
:
'银行卡账户类型'
,
prop
:
''
},
{
label
:
'开户行所在的省/市'
,
prop
:
''
},
{
label
:
'结算银行卡'
,
prop
:
''
},
{
label
:
'结算银行卡正反面照'
,
prop
:
''
,
type
:
'img'
},
{
label
:
'银行预留手机号'
,
prop
:
''
},
{
label
:
'客户协议书'
,
prop
:
''
,
type
:
'img'
},
{
label
:
'门头照'
,
prop
:
''
,
type
:
'img'
},
{
label
:
'经营场所图'
,
prop
:
''
,
type
:
'img'
}]
}
},
props
:
{
detailForm
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
mounted
()
{
console
.
log
(
this
.
detailForm
)
},
methods
:
{}
}
</
script
>
<
style
scoped
>
.account-detail
.detail-img
{
width
:
140px
;
transition
:
width
0.5s
;
cursor
:
pointer
;
}
.account-detail
.detail-img
:hover
{
width
:
100%
;
}
</
style
>
src/views/systemConfig/account/accountList.vue
View file @
5ef628c
<!-- 虚拟对账账户 -->
<
template
>
<div></div>
<d2-container
class=
"account-list"
>
<div
class=
"header"
slot=
"header"
>
<d2-search
ref=
"showSearch"
:searchForm=
"searchForm"
:formData=
"showFormData"
>
</d2-search>
<div
class=
"up-btns"
>
<el-button
:id=
"tableParams.btnId"
size=
"small"
type=
"primary"
>
查询
</el-button>
<el-button
size=
"small"
@
click=
"handleReset"
>
重置
</el-button>
</div>
</div>
<div
class=
"d2-container-content"
>
<d2-table
ref=
"merchantTable"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
>
<auth-button
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
></auth-button>
</d2-table>
</div>
<d2-dialog
title=
"申请虚拟对公账户详情"
:isVisible
.
sync=
"accountDetailVisible"
width=
"70%"
btnOkLabel=
"确定"
noCancel=
"true"
@
confirmDialog=
"handleDetailClose"
@
closeDialog=
"handleDetailClose"
>
<account-detail
:detailForm=
"detailForm"
></account-detail>
</d2-dialog>
</d2-container>
</
template
>
<
script
>
import
{
getList
}
from
'@api/merchant'
import
{
mapActions
}
from
'vuex'
import
accountDetail
from
'./accountDetail'
import
{
BaseData
,
userType
,
ghUserType
,
merchantClassifyList
}
from
'@/common/constants.js'
export
default
{
name
:
'accountList'
,
data
()
{
return
{
// 账户详情
accountDetailVisible
:
false
,
detailForm
:
{},
// 搜索
searchForm
:
{
merchantType
:
''
,
channelType
:
''
,
merchantName
:
''
,
status
:
''
},
showFormData
:
[{
label
:
'商户分类'
,
name
:
'merchantType'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confLabel'
,
optionsName
:
'merchantClassifyList'
},
{
label
:
'渠道'
,
name
:
'channelType'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'value'
,
optionLabel
:
'name'
,
optionsName
:
'channelTypeList'
},
{
label
:
'商户名称'
,
name
:
'merchantName'
,
type
:
'input'
},
{
label
:
'账户状态'
,
name
:
'status'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confLabel'
,
optionsName
:
'statusList'
}],
// 表格
getListApi
:
getList
,
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
tableOption
:
true
,
tableColumns
:
[{
label
:
'名称'
,
prop
:
'merchantName'
},
{
label
:
'编号'
,
prop
:
'number'
},
{
label
:
'商户类型'
,
prop
:
'userType'
,
formatter
:
(
cellValue
)
=>
{
var
typeList
=
cellValue
.
channelType
===
2
?
ghUserType
:
userType
return
typeList
[
cellValue
.
userType
]
}
},
{
label
:
'账户状态'
,
prop
:
'status'
},
{
label
:
'最近更新时间'
,
prop
:
'time'
}]
},
baseData
:
{
channelTypeList
:
[],
statusList
:
[{
confId
:
'1'
,
confLabel
:
'未申请'
},
{
confId
:
'2'
,
confLabel
:
'审核中'
},
{
confId
:
'3'
,
confLabel
:
'生效'
},
{
confId
:
'4'
,
confLabel
:
'失败'
}],
merchantClassifyList
:
merchantClassifyList
}
}
},
components
:
{},
components
:
{
accountDetail
},
mounted
()
{
this
.
getBaseData
()
},
computed
:
{},
methods
:
{
...
mapActions
(
'd2admin/base'
,
[
'get'
]),
mounted
()
{},
async
getBaseData
()
{
this
.
baseData
.
channelTypeList
=
await
this
.
get
(
BaseData
.
channelType
)
this
.
getOptionsList
()
},
methods
:
{}
getOptionsList
()
{
this
.
showFormData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
'select'
)
{
if
(
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
.
showFormData
[
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{}
temp
[
this
.
showFormData
[
index
].
optionId
]
=
''
temp
[
this
.
showFormData
[
index
].
optionLabel
]
=
'全部'
this
.
baseData
[
item
.
optionsName
].
unshift
(
temp
)
}
this
.
$set
(
this
.
showFormData
[
index
],
'optionList'
,
this
.
baseData
[
item
.
optionsName
])
}
})
},
// 账户状态不同,会有不同的操作
handleApply
(
cellValue
)
{
// 查看详情
this
.
detailForm
=
cellValue
this
.
handleDetailClose
()
},
handleDetailClose
()
{
this
.
accountDetailVisible
=
!
this
.
accountDetailVisible
}
}
}
</
script
>
...
...
src/views/systemConfig/merchantDetail.vue
→
src/views/systemConfig/merchant
/merchant
Detail.vue
View file @
5ef628c
File moved
src/views/systemConfig/merchant/merchantManage.vue
0 → 100644
View file @
5ef628c
This diff is collapsed.
Click to expand it.
src/views/systemConfig/merchant/viewDetail.vue
0 → 100644
View file @
5ef628c
<!-- 查看详情 -->
<
template
>
<div
class=
"view-detail"
>
<p
class=
"edit-sub-title"
>
导流方(4S店)基础信息
</p>
<table
cellpadding=
'0'
cellspacing=
'0'
>
<tr>
<th>
商户编号:
</th>
<th>
商户名称:
</th>
<th>
联系人:
</th>
<th>
联系电话:
</th>
</tr>
<tr>
<td
colspan=
"3"
>
地址:
</td>
<td>
创建时间:
</td>
</tr>
<tr>
<td>
登录账户:
</td>
<td>
商户类型:
</td>
<td>
商户分类:
</td>
<td>
阳光激励费
</td>
</tr>
</table>
<table
cellpadding=
'0'
cellspacing=
'0'
>
<tr>
<td>
分账品类
</td>
<td>
分账模式
</td>
<td>
分润比例
</td>
</tr>
</table>
<p
class=
"edit-sub-title m-t-10"
>
关联的园区店基础信息
</p>
<table
cellpadding=
'0'
cellspacing=
'0'
>
<tr>
<th>
园区店编号:
</th>
<th>
园区店名称:
</th>
<th>
联系人:
</th>
<th>
联系电话:
</th>
</tr>
<tr>
<td
colspan=
"3"
>
地址:
</td>
<td>
创建时间:
</td>
</tr>
<tr>
<td
colspan=
"2"
>
经营模式:
</td>
<td>
收款方式:
</td>
<td>
分账周期:
</td>
</tr>
</table>
<p
class=
"edit-sub-title m-t-10"
>
关联的服务商基础信息
</p>
<table
cellpadding=
'0'
cellspacing=
'0'
>
<tr>
<th>
商户编号:
</th>
<th>
商户名称:
</th>
<th>
联系人:
</th>
<th>
联系电话:
</th>
</tr>
<tr>
<td
colspan=
"3"
>
地址:
</td>
<td>
创建时间:
</td>
</tr>
</table>
<table
cellpadding=
'0'
cellspacing=
'0'
>
<tr>
<td>
分账品类
</td>
<td>
分账模式
</td>
<td>
分润比例
</td>
</tr>
</table>
</div>
</
template
>
<
script
>
export
default
{
name
:
'viewDetail'
,
data
()
{
return
{
}
},
props
:
{
viewDetailData
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
mounted
()
{
},
methods
:
{}
}
</
script
>
<
style
scoped
>
.edit-sub-title
{
margin-bottom
:
10px
;
}
.m-t-10
{
margin-top
:
10px
;
}
table
{
width
:
98%
;
color
:
#666666
;
border
:
1px
solid
#e5e6e7
;
border-width
:
1px
0
0
1px
;
}
table
tr
{
height
:
30px
;
line-height
:
30px
;
}
table
th
,
table
td
{
font-size
:
12px
;
font-weight
:
normal
;
padding
:
0px
10px
;
border
:
1px
solid
#e5e6e7
;
border-width
:
0px
1px
1px
0px
;
border-spacing
:
0
;
text-align
:
left
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
</
style
>
src/views/systemConfig/merchantManage.vue
deleted
100644 → 0
View file @
2a823f4
<!-- 商户管理 -->
<
template
>
<d2-container
class=
"merchant_manage"
>
<div
class=
"header"
slot=
"header"
>
<d2-search
ref=
"showSearch"
class=
"merchant_manage_search"
:searchForm=
"searchForm"
:formData=
"showFormData"
labelWidth=
"100px"
>
</d2-search>
<div
class=
"up-btns"
>
<el-button
:id=
"tableParams.btnId"
size=
"small"
type=
"primary"
>
查询
</el-button>
<el-button
size=
"small"
@
click=
"handleReset"
>
重置
</el-button>
</div>
</div>
<div
class=
"d2-container-content"
>
<d2-table
ref=
"merchantTable"
:getListApi=
"getListApi"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
>
<auth-button
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
></auth-button>
</d2-table>
</div>
</d2-container>
</
template
>
<
script
>
import
_
from
'lodash'
import
{
getList
}
from
'@api/merchant'
import
{
mapActions
}
from
'vuex'
import
{
BaseData
,
userTypeList
,
ghUserTypeList
,
userType
,
ghUserType
,
merchantClassifyList
}
from
'@/common/constants.js'
export
default
{
name
:
'merchantManage'
,
data
()
{
return
{
searchForm
:
{
userType
:
''
,
merchantType
:
''
,
channelType
:
''
,
merchantName
:
''
,
yqMerchantName
:
''
},
showFormData
:
[{
label
:
'渠道'
,
name
:
'channelType'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'value'
,
optionLabel
:
'name'
,
optionsName
:
'channelTypeList'
,
changeAttr
:
(
value
,
targetItem
)
=>
{
if
(
value
)
{
this
.
baseData
.
userTypeList
=
value
===
2
?
this
.
ghUserTypeList
:
this
.
userTypeList
}
this
.
searchForm
.
userType
=
''
this
.
getOptionsList
()
}
},
{
label
:
'商户类型'
,
name
:
'userType'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confLabel'
,
optionsName
:
'userTypeList'
},
{
label
:
'商户分类'
,
name
:
'merchantType'
,
type
:
'select'
,
optionList
:
[],
optionId
:
'confId'
,
optionLabel
:
'confLabel'
,
optionsName
:
'merchantClassifyList'
},
{
label
:
'商户名称'
,
name
:
'merchantName'
,
type
:
'input'
,
isClear
:
true
,
keyFn
:
this
.
keyDowmGetList
},
{
label
:
'园区店名称'
,
name
:
'yqMerchantName'
,
type
:
'input'
,
isClear
:
true
,
keyFn
:
this
.
keyDowmGetList
}],
getListApi
:
getList
,
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
tableOption
:
true
,
tableColumns
:
[{
label
:
'登录账户'
,
prop
:
'accountName'
},
{
label
:
'商户号'
,
prop
:
'merchantId'
},
{
label
:
'商户名称'
,
prop
:
'merchantName'
},
{
label
:
'商户简称'
,
prop
:
'shortName'
},
{
label
:
'商户类型'
,
prop
:
'userType'
,
formatter
:
(
cellValue
)
=>
{
var
typeList
=
cellValue
.
channelType
===
2
?
ghUserType
:
userType
return
typeList
[
cellValue
.
userType
]
}
},
{
label
:
'商户分类'
,
prop
:
'merchantType'
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
merchantType
==
'6'
?
'园区店'
:
'4s店'
}
},
{
label
:
'联系人'
,
prop
:
'contactName'
},
{
label
:
'手机号'
,
prop
:
'phone'
,
width
:
'120'
},
{
label
:
'商户地址'
,
prop
:
'fullAddress'
,
width
:
'170px'
},
{
label
:
'园区店名称'
,
prop
:
'yqMerchantName'
,
width
:
'170px'
},
{
label
:
'更新时间'
,
width
:
'150px'
,
formatter
:
(
cellValue
)
=>
{
if
(
cellValue
&&
cellValue
.
settleAccountRule
)
{
return
cellValue
.
settleAccountRule
.
updateDateStr
}
return
''
}
},
{
label
:
'渠道'
,
prop
:
'channelType'
,
formatter
:
(
cellValue
)
=>
{
return
{
1
:
'嘀加'
,
2
:
'广汇'
}[
cellValue
.
channelType
]
}
}]
},
baseData
:
{
channelTypeList
:
[],
userTypeList
:
[],
merchantClassifyList
:
merchantClassifyList
}
}
},
mounted
()
{
this
.
getBaseData
()
this
.
userTypeList
=
_
.
cloneDeep
(
userTypeList
).
filter
(
item
=>
item
.
confLabel
!==
'员工'
)
this
.
ghUserTypeList
=
_
.
cloneDeep
(
ghUserTypeList
).
filter
(
item
=>
!
[
'员工'
,
'供应商'
].
includes
(
item
.
confLabel
))
},
methods
:
{
...
mapActions
(
'd2admin/base'
,
[
'get'
]),
...
mapActions
({
close
:
'd2admin/page/close'
}),
async
getBaseData
()
{
this
.
baseData
.
channelTypeList
=
await
this
.
get
(
BaseData
.
channelType
)
this
.
getOptionsList
()
},
keyDowmGetList
()
{
this
.
$refs
.
merchantTable
.
refreshTable
()
},
// 财务
handleDetail
(
row
)
{
this
.
close
({
tagName
:
'/merchantDetail'
})
this
.
$router
.
push
({
name
:
'merchantDetail'
,
params
:
row
})
},
handleReset
()
{
this
.
searchForm
=
{
userType
:
''
,
merchantType
:
''
,
channelType
:
''
,
merchantName
:
''
,
yqMerchantName
:
''
}
this
.
baseData
.
userTypeList
=
[]
this
.
getOptionsList
()
},
getOptionsList
()
{
this
.
showFormData
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
'select'
)
{
const
optionList
=
this
.
baseData
[
item
.
optionsName
]
if
(
item
.
optionsName
===
'channelTypeList'
)
{
if
(
optionList
.
length
&&
optionList
[
0
].
name
!==
'全部'
)
{
optionList
.
unshift
({
value
:
''
,
name
:
'全部'
})
}
}
else
if
(
optionList
.
length
&&
optionList
[
0
].
confLabel
!==
'全部'
)
{
optionList
.
unshift
({
confId
:
''
,
confLabel
:
'全部'
})
}
this
.
$set
(
this
.
showFormData
[
index
],
'optionList'
,
optionList
)
}
})
}
}
}
</
script
>
<
style
>
.merchant_manage_search.d2-search
.el-form-item--small
.el-form-item__content
{
width
:
calc
(
100%
-
100px
);
}
</
style
>
src/views/systemConfig/serviceManage.vue
View file @
5ef628c
<!-- 服务商管理 -->
<
template
>
<div>
服务商管理
</div>
<d2-container
class=
"service-manage"
>
<div
class=
"header"
slot=
"header"
>
<d2-search
ref=
"showSearch"
class=
"show-search"
:searchForm=
"searchForm"
:formData=
"showFormData"
>
</d2-search>
<div
class=
"up-btns"
>
<el-button
:id=
"tableParams.btnId"
size=
"small"
type=
"primary"
>
查询
</el-button>
<el-button
size=
"small"
@
click=
"handleReset"
>
重置
</el-button>
</div>
</div>
<div
class=
"d2-container-content"
>
<d2-table-header>
<span
slot=
"left"
>
园区店服务商关联列表
</span>
<auth-button
category=
"Button"
></auth-button>
</d2-table-header>
<d2-table
ref=
"serviceStoreTable"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
>
<auth-button
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
></auth-button>
</d2-table>
</div>
</d2-container>
</
template
>
<
script
>
import
{
Util
}
from
'@/common/util'
import
{
getList
}
from
'@api/serviceManage'
import
{
mapActions
}
from
'vuex'
import
{
BaseData
}
from
'@/common/constants.js'
export
default
{
name
:
'serviceManage'
,
data
()
{
return
{
searchForm
:
{
merchantName
:
''
},
showFormData
:
[{
label
:
'商户名称'
,
name
:
'merchantName'
,
type
:
'input'
,
placeholder
:
'请输入服务商/4S店名称'
,
isClear
:
true
,
keyFn
:
this
.
keyDowmGetList
},
{
label
:
'商户号'
,
name
:
''
,
type
:
'input'
,
placeholder
:
'请输入服务商/4S店编号'
,
isClear
:
true
,
keyFn
:
this
.
keyDowmGetList
}],
maxLength
:
10
,
getListApi
:
getList
,
// 表格参数
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
tableOption
:
true
,
tableColumns
:
[{
label
:
'园区店名称'
,
prop
:
'yqMerchantName'
,
width
:
'200'
},
{
label
:
'园区店号'
,
prop
:
''
,
width
:
'160'
},
{
label
:
'登录账户'
,
prop
:
'accountName'
,
width
:
'160'
},
{
label
:
'关联服务商名称'
,
prop
:
'merchantName'
,
width
:
'200'
},
{
label
:
'关联服务商号'
,
prop
:
'merchantId'
,
width
:
'200'
},
{
label
:
'最近更新时间'
,
prop
:
'updatedDate'
,
width
:
'160'
,
formatter
:
(
cellValue
)
=>
{
return
Util
.
dateFormate
(
cellValue
.
updatedDate
,
'YYYY-MM-DD HH:mm:ss'
)
}
}]
},
baseData
:
{
channelType
:
[]
}
}
},
components
:
{},
components
:
{
},
created
()
{
this
.
getBaseData
()
},
computed
:
{},
mounted
()
{
},
methods
:
{
...
mapActions
(
'd2admin/base'
,
[
'get'
]),
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
resolve
()
})
},
mounted
()
{},
async
getBaseData
()
{
this
.
baseData
.
channelType
=
await
this
.
get
(
BaseData
.
channelType
)
},
keyDowmGetList
()
{
this
.
$refs
.
serviceStoreTable
.
refreshTable
()
},
handleReset
()
{
this
.
searchForm
=
{
merchantName
:
''
}
},
handleRelate
()
{
},
methods
:
{}
handleDelete
(
row
)
{
console
.
log
(
row
)
}
}
}
</
script
>
<
style
scoped
>
<
style
>
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment