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 08dd3ab4
authored
Apr 19, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
虚拟对账账户;虚拟对账账户表单
1 parent
12fe02e8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
435 additions
and
92 deletions
src/api/publicAccount.js
src/components/d2-form/index.vue
src/router/routes.js
src/views/systemConfig/account/accountList.vue
src/views/systemConfig/account/applyAccount.vue
src/views/systemConfig/account/editForm.vue
src/api/publicAccount.js
0 → 100644
View file @
08dd3ab
import
request
from
'./request'
const
path
=
'dj.api.serviceMerchant.'
// 分页查询服务门店
export
function
getListApi
(
data
)
{
data
.
method
=
`
${
path
}
listWithPage`
return
request
(
data
,
'post'
)
}
src/components/d2-form/index.vue
View file @
08dd3ab
...
...
@@ -8,29 +8,6 @@
v-loading=
"$store.state.d2admin.loading.value"
>
<slot
name=
"title"
></slot>
<!--
<div>
<el-form-item
id=
"yqMerchantId"
label=
"园区店:"
prop=
"yqMerchantId"
v-show=
"userInfo.beSuper"
>
<el-select
v-model=
"formData.yqMerchantId"
:disabled=
"merchantDisable"
placeholder=
"请选择"
class=
"el_select itd"
@
change=
"handleMerchantChange"
>
<el-option
v-for=
"x in parkServiceList"
:key=
"x.merchantId"
:value=
"x.merchantId"
:label=
"x.merchantName"
></el-option>
</el-select>
</el-form-item>
</div>
-->
<div
v-for=
"(i, idx) in formList"
:key=
"idx"
...
...
@@ -205,51 +182,7 @@
</div>
</div>
</block>
<!--
<block
class=
"pro-allocate pro-detail-txt"
>
<div>
分配给导流方
<span
style=
"padding-left: 16px;"
>
分润规则:按
<el-select
v-model=
"subItem.profitType"
size=
"mini"
style=
"width: 85px; margin: 0 6px;"
disabled
>
<el-option
v-for=
"x in separateOpt"
:key=
"x.confId"
:value=
"x.confId"
:label=
"x.confLabel"
></el-option>
</el-select>
</span>
</div>
<p
style=
"padding-left: 92px;"
>
分润比例:
<el-input
class=
"pro-item"
v-model=
"subItem.profitValue"
@
input=
"handleProfitInput(subItem.profitValue, subIndex)"
disabled
></el-input>
%
</p>
<p>
分配给合伙人
<span
style=
"padding-left: 16px;"
>
分润比例:
<el-input
class=
"pro-item"
v-model=
"subItem.partnerProfitPer"
@
input=
"handleProfitInput(subItem.partnerProfitPer, subIndex)"
disabled
></el-input>
%
</span>
</p>
</block>
-->
</p>
<!--
<p
v-show=
"!subItem.profitValue"
class=
"error"
>
分账规则不能为空
{{
subItem
.
profitValue
}}
</p>
-->
</div>
</
template
>
<
template
v-else-if=
"item.type === 'photo'"
>
...
...
src/router/routes.js
View file @
08dd3ab
...
...
@@ -616,11 +616,12 @@ export const resources = {
label
:
'虚拟对账账户'
,
handle
:
'handleApply'
,
ruleObj
:
{
attr
:
'
userType
'
,
attr
:
'
accountStatus
'
,
rule
:
{
'2'
:
'虚拟对账账户'
,
'3'
:
'虚拟对账账户'
,
'4'
:
'账户详情'
1
:
'虚拟对账账户'
,
2
:
'虚拟对账账户'
,
3
:
'账户详情'
,
4
:
'虚拟对账账户'
}
}
}],
...
...
src/views/systemConfig/account/accountList.vue
View file @
08dd3ab
...
...
@@ -52,10 +52,11 @@
</
template
>
<
script
>
import
{
getList
}
from
'@api/merchant'
import
{
Util
}
from
'@/common/util'
import
{
getListApi
}
from
'@api/publicAccount'
import
{
mapActions
}
from
'vuex'
import
accountDetail
from
'./accountDetail'
import
{
BaseData
,
userType
,
ghUserType
,
merchantClassifyList
}
from
'@/common/constants.js'
import
{
BaseData
,
merchantClassifyList
}
from
'@/common/constants.js'
export
default
{
name
:
'accountList'
,
data
()
{
...
...
@@ -100,7 +101,7 @@ export default {
optionsName
:
'statusList'
}],
// 表格
getListApi
:
getList
,
getListApi
:
getList
Api
,
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
...
...
@@ -112,33 +113,39 @@ export default {
label
:
'编号'
,
prop
:
'number'
},
{
label
:
'商户
类型
'
,
prop
:
'
user
Type'
,
label
:
'商户
分类
'
,
prop
:
'
merchant
Type'
,
formatter
:
(
cellValue
)
=>
{
var
typeList
=
cellValue
.
channelType
===
2
?
ghUserType
:
userType
return
typeList
[
cellValue
.
userType
]
var
item
=
this
.
baseData
.
merchantClassifyList
.
find
(
item
=>
item
.
confId
===
cellValue
.
merchantType
)
return
item
?
item
.
confLabel
:
''
}
},
{
label
:
'账户状态'
,
prop
:
'status'
prop
:
'accountStatus'
,
formatter
:
(
cellValue
)
=>
{
return
this
.
baseData
.
statusList
.
find
(
item
=>
item
.
confId
===
cellValue
.
accountStatus
).
confLabel
}
},
{
label
:
'最近更新时间'
,
prop
:
'time'
prop
:
'updatedDate'
,
formatter
:
(
cellValue
)
=>
{
return
Util
.
dateFormate
(
cellValue
.
updatedDate
,
'YYYY-MM-DD HH:mm:ss'
)
}
}]
},
baseData
:
{
channelTypeList
:
[],
statusList
:
[{
confId
:
'1'
,
confId
:
1
,
confLabel
:
'未申请'
},
{
confId
:
'2'
,
confId
:
2
,
confLabel
:
'审核中'
},
{
confId
:
'3'
,
confId
:
3
,
confLabel
:
'生效'
},
{
confId
:
'4'
,
confId
:
4
,
confLabel
:
'失败'
}],
merchantClassifyList
:
merchantClassifyList
...
...
@@ -155,7 +162,10 @@ export default {
},
methods
:
{
...
mapActions
(
'd2admin/base'
,
[
'get'
]),
...
mapActions
({
get
:
'd2admin/base/get'
,
close
:
'd2admin/page/close'
}),
async
getBaseData
()
{
this
.
baseData
.
channelTypeList
=
await
this
.
get
(
BaseData
.
channelType
)
...
...
@@ -177,10 +187,20 @@ export default {
},
// 账户状态不同,会有不同的操作
// 1/4 - 待申请/失败(编辑);2 - 审核中(置灰); 3 - 生效中(详情)
handleApply
(
cellValue
)
{
// 查看详情
this
.
detailForm
=
cellValue
this
.
handleDetailClose
()
if
(
cellValue
.
accountStatus
===
3
)
{
this
.
detailForm
=
cellValue
this
.
handleDetailClose
()
return
true
}
// 编辑
this
.
close
({
tagName
:
'/applyAccount'
})
this
.
$router
.
push
({
name
:
'applyAccount'
,
params
:
cellValue
})
},
handleDetailClose
()
{
...
...
src/views/systemConfig/account/applyAccount.vue
View file @
08dd3ab
<!-- 申请虚拟对账账户 -->
<
template
>
<div>
申请虚拟对账账户
</div>
<div>
<edit-form
:title=
"formTitle"
:currentPage=
"custType"
:editForm=
"editForm"
:formRules=
"formRules"
:formList=
"formList"
>
<span
slot=
"custType"
slot-scope=
"scope"
>
<el-radio-group
size=
'mini'
v-model=
"custType"
@
change=
"scope.scope.handleChange"
>
<el-radio
v-for=
"(subItem, subIdx) in scope.scope.radioOptList"
:key=
"subIdx"
:label=
"subItem.value"
>
{{
subItem
.
label
}}
</el-radio>
</el-radio-group>
</span>
</edit-form>
</div>
</
template
>
<
script
>
import
editForm
from
'./editForm'
export
default
{
name
:
'applyAccount'
,
data
()
{
return
{
targetAccount
:
{},
// O - 小微商户;C - 个体商户;B - 个体商户(三个表单数据隔离)
custType
:
'O'
,
// 传给组件的obj
editForm
:
{},
// 小微商户Obj - 三个表单数据隔离
microEditForm
:
{
custType
:
'O'
},
// 个体商户Obj
customerEditForm
:
{
custType
:
'C'
},
// 企业商户Obj
businessEditForm
:
{
custType
:
'B'
},
// 类型对应的对象form
typeToForm
:
{
O
:
'microEditForm'
,
C
:
'customerEditForm'
,
B
:
'businessEditForm'
},
formRules
:
{},
formTitle
:
'申请虚拟对公账号'
,
formList
:
[{
label
:
'商户类型'
,
name
:
'custType'
,
slotName
:
'custType'
,
radioOptList
:
[{
value
:
'O'
,
label
:
'小微商户'
},
{
value
:
'C'
,
label
:
'个体商户'
},
{
value
:
'B'
,
label
:
'企业商户'
}],
handleChange
:
()
=>
{
this
.
editForm
=
this
[
this
.
typeToForm
[
this
.
custType
]]
}
},
{
label
:
'营业执照全称'
,
name
:
'busLicenceName'
,
type
:
'input'
,
// 根据currentPage不同,展示/隐藏
showAttrList
:
[
'C'
,
'B'
],
isClear
:
true
,
rules
:
[{
required
:
true
,
message
:
'请输入营业执照全称'
,
trigger
:
'change'
}]
},
{
label
:
'营业执照号码'
,
name
:
'busLicense'
,
type
:
'input'
,
// 根据currentPage不同,展示/隐藏
showAttrList
:
[
'C'
,
'B'
],
isClear
:
true
,
rules
:
[{
required
:
true
,
message
:
'请输入营业执照号码'
,
trigger
:
'change'
}]
},
{
label
:
'营业执照'
,
name
:
''
,
// 根据currentPage不同,展示/隐藏
showAttrList
:
[
'C'
,
'B'
]
},
{
label
:
'营业执照有效期'
,
name
:
'busLicenseDate'
,
// 根据currentPage不同,展示/隐藏
showAttrList
:
[
'C'
,
'B'
],
type
:
'datePicker'
,
isClear
:
true
,
rules
:
[{
required
:
true
,
message
:
'请选择营业执照有效期'
,
trigger
:
'change'
}]
},
{
label
:
'商户名称'
,
name
:
'anotherName'
,
type
:
'input'
,
isClear
:
true
,
rules
:
[{
required
:
true
,
message
:
'请输入商户名称'
,
trigger
:
'change'
}]
},
{
label
:
'企业地址'
,
name
:
''
,
// 根据currentPage不同,展示/隐藏
showAttrList
:
[
'B'
]
},
{
label
:
'开户许可证/印鉴卡'
,
name
:
''
,
// 根据currentPage不同,展示/隐藏
showAttrList
:
[
'B'
]
},
{
label
:
'开户账户'
,
name
:
''
,
// 根据currentPage不同,展示/隐藏
showAttrList
:
[
'B'
]
},
{
label
:
'开户行所在的省/市'
,
name
:
''
,
showAttrList
:
[
'B'
]
},
{
label
:
'法人身份证正反面'
,
name
:
''
},
{
label
:
'法人姓名'
,
name
:
'legalName'
,
type
:
'input'
,
isClear
:
true
,
rules
:
[{
required
:
true
,
message
:
'请输入法人姓名'
,
trigger
:
'change'
}]
},
{
label
:
'法人身份证号'
,
name
:
'legalCertNo'
,
type
:
'input'
,
rules
:
[{
required
:
true
,
message
:
'请输入法人身份证号'
,
trigger
:
'change'
}]
},
{
label
:
'身份证有效期'
,
name
:
'legalCertDate'
,
type
:
'datePicker'
,
isClear
:
true
,
rules
:
[{
required
:
true
,
message
:
'请选择身份证有效期'
,
trigger
:
'change'
}]
},
{
label
:
'法人手机号'
,
name
:
'legalTel'
,
type
:
'input'
,
rules
:
[{
required
:
true
,
message
:
'请输入法人手机号'
,
trigger
:
'change'
}]
},
{
label
:
'提现人姓名'
,
name
:
'contactsName'
,
type
:
'input'
,
rules
:
[{
required
:
true
,
message
:
'请输入提现人姓名'
,
trigger
:
'change'
}]
},
{
label
:
'提现人手机号'
,
name
:
'contactsPhone'
,
type
:
'input'
,
rules
:
[{
required
:
true
,
message
:
'请输入提现人手机号'
,
trigger
:
'change'
}]
},
{
label
:
'提现人邮箱'
,
name
:
'contactsEmail'
,
type
:
'input'
,
rules
:
[{
required
:
true
,
message
:
'请输入提现人邮箱'
,
trigger
:
'change'
}]
},
{
label
:
'银行卡账户类型'
,
name
:
'bankAccountType'
,
type
:
'radio'
,
showAttrList
:
[
'O'
,
'C'
],
rules
:
[{
required
:
true
,
message
:
'请选择银行卡账户类型'
,
trigger
:
'change'
}],
radioOptList
:
[{
value
:
'corporate'
,
label
:
'对公账户'
},
{
value
:
'personal'
,
label
:
'对私账户'
}]
},
{
label
:
'银行卡类型'
,
name
:
''
,
showAttrList
:
[
'O'
],
type
:
'select'
,
optionId
:
''
,
optionLabel
:
''
,
optionList
:
[]
},
{
label
:
'开户行所在的省/市'
,
name
:
''
,
showAttrList
:
[
'O'
,
'C'
]
},
{
label
:
'结算银行卡正反面照'
,
name
:
''
,
showAttrList
:
[
'O'
,
'C'
]
},
{
label
:
'结算银行卡'
,
name
:
''
,
showAttrList
:
[
'O'
,
'C'
]
},
{
label
:
'结算银行卡用户名'
,
name
:
'bankAccountName'
,
type
:
'input'
,
showAttrList
:
[
'O'
,
'C'
],
rules
:
[{
required
:
true
,
message
:
'请输入结算银行卡用户名'
,
trigger
:
'blur'
}]
},
{
label
:
'银行预留手机号'
,
name
:
'bankTelephoneNo'
,
type
:
'input'
,
showAttrList
:
[
'O'
,
'C'
],
rules
:
[{
required
:
true
,
message
:
'请输入银行预留手机号'
,
trigger
:
'blur'
}]
},
{
label
:
'客户协议书'
},
{
label
:
'门头照'
},
{
label
:
'经营场所图'
},
{
label
:
'操作人手机号'
,
name
:
'operPhone'
,
type
:
'input'
,
rules
:
[{
required
:
true
,
message
:
'请输入操作人手机号'
,
trigger
:
'blur'
}]
},
{
label
:
'操作人手机号验证码'
,
name
:
'smsCode'
,
type
:
'input'
,
rules
:
[{
required
:
true
,
message
:
'请输入操作人手机号验证码'
,
trigger
:
'blur'
}]
}],
baseDate
:
{
}
}
},
components
:
{
},
computed
:
{
},
components
:
{
editForm
},
mounted
()
{},
mounted
()
{
this
.
targetAccount
=
this
.
$route
.
params
// console.log(this.targetAccount)
this
.
editForm
=
this
[
this
.
typeToForm
[
this
.
custType
]]
},
methods
:
{}
}
...
...
src/views/systemConfig/account/editForm.vue
0 → 100644
View file @
08dd3ab
<!-- 编辑表单组件 -->
<
template
>
<d2-container>
<el-form
ref=
"editFrom"
class=
"editFrom d2-container-content"
:model=
"editForm"
:rules=
"formRules"
:label-width=
"labelWidth"
v-loading=
"$store.state.d2admin.loading.value"
>
<p
name=
"title"
class=
"edit-title"
>
{{
title
}}
</p>
<div
v-for=
"(item, index) in formList"
:key=
"index"
>
<el-form-item
v-if=
"item.showAttrList ? item.showAttrList.includes(currentPage) : true"
:prop=
"item.name"
:label=
"item.label ? item.label + ':' : ''"
:id=
"item.name"
:label-width=
"item.label ? labelWidth : '0px'"
:rules=
"item.showAttrList ? (item.showAttrList.includes(currentPage) ? item.rules : []) : item.rules"
class=
"dis-in-block"
:style=
"
{'margin-bottom': !item.type ? '0px' : '22px'}"
>
<el-input
v-if=
"item.type === 'input'"
v-model=
"editForm[item.name]"
:size=
"item.size || 'mini'"
:placeholder=
"'请输入' + item.label"
:maxlength=
"item.maxlength"
:style=
"
{'width': item.width || formDefaultWidth}"
:disabled="item.isDisabled"
clearable
@input="item.handleInput"
@blur="item.handleBlur"
>
<i
slot=
"suffix"
class=
"suffix"
>
{{
item
.
unit
}}
</i>
</el-input>
<!-- 选择框 -->
<el-select
v-else-if=
"item.type === 'select'"
v-model=
"editForm[item.name]"
:size=
"item.size || 'mini'"
:clearable=
"item.isClear"
:placeholder=
"'请选择' + item.label"
@
change=
"selectAddAttr($event, item)"
filterable
:disabled=
"item.isDisabled"
>
<el-option
v-for=
"subItem in item.optionList"
:key=
"subItem[item.optionId]"
:label=
"subItem[item.optionLabel]"
:value=
"subItem[item.optionId]"
>
</el-option>
</el-select>
<!-- 单选框 -->
<el-radio-group
v-else-if=
"item.type === 'radio'"
:size=
"item.size || 'mini'"
v-model=
"editForm[item.name]"
@
change=
"item.handleChange"
>
<el-radio
v-for=
"(subItem, subIdx) in item.radioOptList"
:key=
"subIdx"
:label=
"subItem.value"
>
{{
subItem
.
label
}}
</el-radio>
</el-radio-group>
<!-- 时间 -->
<el-date-picker
v-else-if=
"item.type === 'datePicker'"
v-model=
"editForm[item.name]"
:size=
"item.size || 'mini'"
:type=
"item.dateType || 'daterange'"
:clearable=
"item.isClear || false"
value-format=
"yyyy-MM-dd"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
<slot
v-else
:name=
"item.slotName"
:scope=
"item"
></slot>
</el-form-item>
</div>
</el-form>
</d2-container>
</
template
>
<
script
>
export
default
{
name
:
'editForm'
,
data
()
{
return
{
labelWidth
:
'170px'
,
formDefaultWidth
:
'250px'
}
},
props
:
{
title
:
{
type
:
String
,
default
:
'编辑'
},
// 标记字段,用于显示/隐藏某些表单项
currentPage
:
{
type
:
String
,
default
:
''
},
// 表单规则
formRules
:
{
type
:
Object
,
default
:
()
=>
{
}
},
// 绑定的表单值
editForm
:
{
type
:
Object
,
default
:
()
=>
{
}
},
// 表单列表
formList
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
mounted
()
{
},
methods
:
{
selectAddAttr
(
value
,
targetItem
)
{
}
}
}
</
script
>
<
style
scoped
>
</
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