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 eaa0f9a7
authored
Apr 15, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
商户管理;财务
1 parent
69b93ca6
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
80 additions
and
95 deletions
src/api/merchant.js
src/api/table1.js
src/api/table2.js
src/assets/style/public.scss
src/common/constants.js
src/views/systemConfig/merchant/merchantDetail.vue
src/views/systemConfig/merchant/merchantManage.vue
src/api/merchant.js
View file @
eaa0f9a
...
@@ -5,7 +5,8 @@ const path = 'dj.api.'
...
@@ -5,7 +5,8 @@ const path = 'dj.api.'
const
path2
=
'dj.api.smartcarlife.'
const
path2
=
'dj.api.smartcarlife.'
export
function
getList
(
data
)
{
export
function
getList
(
data
)
{
data
.
method
=
`
${
path2
}
merchantSettleAccountRule.page.byMerchant`
// data.method = `${path2}merchantSettleAccountRule.page.byMerchant`
data
.
method
=
`
${
path
}
servicemerchantref.shop.page`
return
request
(
data
)
return
request
(
data
)
}
}
...
@@ -47,3 +48,9 @@ export function getAccountRule(data) {
...
@@ -47,3 +48,9 @@ export function getAccountRule(data) {
data
.
method
=
`
${
path2
}
merchantSettleAccountRule.get.byMerchantId`
data
.
method
=
`
${
path2
}
merchantSettleAccountRule.get.byMerchantId`
return
request
(
data
,
'post'
)
return
request
(
data
,
'post'
)
}
}
// 财务 - 获取服务4s店(包含园区店、服务商信息)详情
export
function
getShopDetail
(
data
)
{
data
.
method
=
`
${
path
}
servicemerchantref.shop.detail`
return
request
(
data
,
'post'
)
}
\ No newline at end of file
\ No newline at end of file
src/api/table1.js
deleted
100644 → 0
View file @
69b93ca
import
request
from
'./request'
const
path
=
'fims.order.'
function
getListApi
(
data
)
{
data
.
method
=
`
${
path
}
search`
return
request
(
data
)
}
function
editApi
(
data
)
{
data
.
method
=
`
${
path
}
edit`
return
request
(
data
)
}
function
removeApi
(
data
)
{
data
.
method
=
`
${
path
}
delete`
return
request
(
data
)
}
export
{
getListApi
,
editApi
,
removeApi
}
src/api/table2.js
deleted
100644 → 0
View file @
69b93ca
import
request
from
'./request'
const
path
=
'fims.material.'
function
getListApi
(
data
)
{
data
.
method
=
`
${
path
}
list`
return
request
(
data
)
}
export
{
getListApi
}
src/assets/style/public.scss
View file @
eaa0f9a
...
@@ -83,7 +83,7 @@ $prefix: d2;
...
@@ -83,7 +83,7 @@ $prefix: d2;
line-height
:
48px
;
line-height
:
48px
;
color
:
#0947C6
;
color
:
#0947C6
;
border-bottom
:
1px
solid
#E7EAEC
;
border-bottom
:
1px
solid
#E7EAEC
;
padding-left
:
20px
;
//
padding-left: 20px;
margin
:
0
0
;
margin
:
0
0
;
}
}
.
edit-sub-title
:
:
before
{
.
edit-sub-title
:
:
before
{
...
...
src/common/constants.js
View file @
eaa0f9a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: limin
* @Author: limin
* @Date: 2019-09-01 19:06:01
* @Date: 2019-09-01 19:06:01
* @Last Modified by: chenwq
* @Last Modified by: chenwq
* @Last Modified time: 2021-04-1
0 11:49:28
* @Last Modified time: 2021-04-1
5 10:17:12
*/
*/
export
const
TYPE_NAME
=
'confType'
export
const
TYPE_NAME
=
'confType'
...
@@ -95,6 +95,9 @@ export const merchantClassifyList = [{
...
@@ -95,6 +95,9 @@ export const merchantClassifyList = [{
},
{
},
{
confId
:
6
,
confId
:
6
,
confLabel
:
'园区店'
confLabel
:
'园区店'
},
{
confId
:
7
,
confLabel
:
'服务商'
}]
}]
// 品牌商
// 品牌商
...
...
src/views/systemConfig/merchant/merchantDetail.vue
View file @
eaa0f9a
...
@@ -54,10 +54,14 @@
...
@@ -54,10 +54,14 @@
v-model=
"form.autoFlag"
v-model=
"form.autoFlag"
active-value=
"Y"
active-value=
"Y"
inactive-value=
"N"
inactive-value=
"N"
:disabled=
"isConfigAccount"
>
>
</el-switch>
</el-switch>
</el-radio-group>
</el-radio-group>
<span>
关联的4S店和服务商有生效的虚拟对公账户才能开启线上自动分账
<a
href=
"#/accountList"
target=
"_blank"
>
申请虚拟账户 >
</a></span>
<span
v-show=
"isConfigAccount"
>
关联的4S店和服务商有生效的虚拟对公账户才能开启线上自动分账
<a
href=
"#/accountList"
target=
"_blank"
>
申请虚拟账户 >
</a></span>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"结算时间方式"
label=
"结算时间方式"
...
@@ -84,26 +88,24 @@
...
@@ -84,26 +88,24 @@
<div
class=
"block_item"
>
<div
class=
"block_item"
>
<el-radio
:label=
"1"
>
结算周期 T+
<el-radio
:label=
"1"
>
结算周期 T+
<el-input-number
<el-input-number
v-model=
"
form.settleTime
"
v-model=
"
settleTimeObj.first
"
controls-position=
"right"
controls-position=
"right"
@
change=
"handleChange"
size=
"small"
size=
"small"
:min=
"1"
:min=
"1"
:max=
"30"
:max=
"30"
:disabled=
"form.settleTimeType === 2"
:disabled=
"form.settleTimeType === 2
|| form.autoFlag === 'N'
"
></el-input-number>
></el-input-number>
日
</el-radio>
日
</el-radio>
</div>
</div>
<div
class=
"block_item"
>
<div
class=
"block_item"
>
<el-radio
:label=
"2"
>
固定日期结算:每月
<el-radio
:label=
"2"
>
固定日期结算:每月
<el-input-number
<el-input-number
v-model=
"
form.settleTime
"
v-model=
"
settleTimeObj.second
"
controls-position=
"right"
controls-position=
"right"
@
change=
"handleChange"
size=
"small"
size=
"small"
:min=
"1"
:min=
"1"
:max=
"31"
:max=
"31"
:disabled=
"form.settleTimeType === 1"
:disabled=
"form.settleTimeType === 1
|| form.autoFlag === 'N'
"
></el-input-number>
></el-input-number>
日
</el-radio>
日
</el-radio>
</div>
</div>
...
@@ -470,15 +472,22 @@
...
@@ -470,15 +472,22 @@
<
script
>
<
script
>
import
_
from
'lodash'
import
_
from
'lodash'
import
{
mapActions
}
from
'vuex'
import
{
mapActions
}
from
'vuex'
import
{
updateRule
,
sendSms
,
getAdminInfo
,
getAccountRule
}
from
'@api/merchant'
import
{
updateRule
,
sendSms
,
getAdminInfo
,
getAccountRule
,
getShopDetail
}
from
'@api/merchant'
import
{
BaseData
,
userType
,
ghUserType
,
limitPrice
}
from
'@/common/constants.js'
import
{
BaseData
,
userType
,
ghUserType
,
limitPrice
}
from
'@/common/constants.js'
export
default
{
export
default
{
name
:
'merchantDetail'
,
name
:
'merchantDetail'
,
data
()
{
data
()
{
return
{
return
{
sessionName
:
'merchatItem'
,
isConfigAccount
:
false
,
// 结算周期
settleTimeObj
:
{
first
:
'1'
,
second
:
'1'
},
form
:
{
form
:
{
merchantName
:
''
,
merchantName
:
''
,
autoFlag
:
'
Y
'
,
autoFlag
:
'
N
'
,
settleTimeType
:
1
,
settleTimeType
:
1
,
settleTime
:
'1'
,
settleTime
:
'1'
,
bizType
:
'1'
,
bizType
:
'1'
,
...
@@ -533,11 +542,6 @@ export default {
...
@@ -533,11 +542,6 @@ export default {
partnerProfitPer
:
''
partnerProfitPer
:
''
}]
}]
},
},
merchantId
:
''
,
channelType
:
''
,
contactName
:
''
,
phone
:
''
,
settleAccountRule
:
''
,
merchantSettleTypeList
:
[{
merchantSettleTypeList
:
[{
confId
:
'1'
,
confId
:
'1'
,
confLabel
:
'毛利分润'
confLabel
:
'毛利分润'
...
@@ -578,11 +582,30 @@ export default {
...
@@ -578,11 +582,30 @@ export default {
getAdminInfo
({}).
then
(
res
=>
{
getAdminInfo
({}).
then
(
res
=>
{
this
.
adminInfo
=
res
this
.
adminInfo
=
res
})
})
getAccountRule
({
'merchantId'
:
this
.
$route
.
params
.
merchantId
}).
then
(
res
=>
{
if
(
this
.
$route
.
params
.
merchantId
)
{
Object
.
assign
(
this
.
form
,
this
.
$route
.
params
)
this
.
merchantItem
=
{
merchantId
:
this
.
$route
.
params
.
merchantId
,
merchantName
:
this
.
$route
.
params
.
merchantName
,
channelType
:
this
.
$route
.
params
.
channelType
}
sessionStorage
.
setItem
(
this
.
sessionName
,
JSON
.
stringify
(
this
.
merchantItem
))
}
else
{
Object
.
assign
(
this
.
form
,
JSON
.
parse
(
sessionStorage
.
getItem
(
this
.
sessionName
)))
}
getAccountRule
({
'merchantId'
:
this
.
form
.
merchantId
}).
then
(
res
=>
{
if
(
!
res
||
(
res
.
autoFlag
===
'N'
))
{
getShopDetail
({
'merchantId'
:
this
.
form
.
merchantId
}).
then
(
res
=>
{
var
parentStatus
=
res
.
partnerMerchant
?
(
res
.
partnerMerchant
.
accountStatus
!==
3
)
:
true
var
merchantStatus
=
res
.
merchant
?
(
res
.
merchant
.
accountStatus
!==
3
)
:
true
this
.
isConfigAccount
=
parentStatus
||
merchantStatus
})
}
if
(
res
)
{
if
(
res
)
{
this
.
form
.
autoFlag
=
res
.
autoFlag
this
.
form
.
autoFlag
=
res
.
autoFlag
this
.
form
.
settleTimeType
=
res
.
settleTimeType
this
.
form
.
settleTimeType
=
res
.
settleTimeType
this
.
form
.
settleTime
=
res
.
settleTime
this
.
form
.
settleTime
=
res
.
settleTime
this
.
settleTimeObj
[
res
.
settleTimeType
===
1
?
'first'
:
'second'
]
=
res
.
settleTime
this
.
accountSetForm
.
list
[
0
].
merchantSettleType
=
res
.
merchantSettleType
+
''
this
.
accountSetForm
.
list
[
0
].
merchantSettleType
=
res
.
merchantSettleType
+
''
this
.
accountSetForm
.
list
[
0
].
merchantProfitValue
=
res
.
merchantProfitValue
+
''
this
.
accountSetForm
.
list
[
0
].
merchantProfitValue
=
res
.
merchantProfitValue
+
''
this
.
accountSetForm
.
incentiveType
=
res
.
incentiveType
+
''
this
.
accountSetForm
.
incentiveType
=
res
.
incentiveType
+
''
...
@@ -603,22 +626,7 @@ export default {
...
@@ -603,22 +626,7 @@ export default {
})
})
}
}
})
})
Object
.
assign
(
this
.
form
,
this
.
$route
.
params
)
this
.
merchantId
=
this
.
$route
.
params
.
merchantId
this
.
merchantName
=
this
.
$route
.
params
.
merchantName
this
.
channelType
=
this
.
$route
.
params
.
channelType
this
.
contactName
=
this
.
$route
.
params
.
contactName
this
.
phone
=
this
.
$route
.
params
.
phone
this
.
settleAccountRule
=
this
.
$route
.
params
.
settleAccountRule
this
.
getBaseData
()
this
.
getBaseData
()
if
(
this
.
settleAccountRule
)
{
for
(
var
key
in
this
.
form
)
{
if
(
key
in
this
.
settleAccountRule
)
{
this
.
form
[
key
]
=
this
.
settleAccountRule
[
key
]
}
}
}
},
},
methods
:
{
methods
:
{
...
@@ -626,6 +634,10 @@ export default {
...
@@ -626,6 +634,10 @@ export default {
get
:
'd2admin/base/get'
,
get
:
'd2admin/base/get'
,
close
:
'd2admin/page/close'
close
:
'd2admin/page/close'
}),
}),
// 删除session
deleteSession
()
{
sessionStorage
.
removeItem
(
this
.
sessionName
)
},
handleSend
()
{
handleSend
()
{
sendSms
({}).
then
((
res
)
=>
{
sendSms
({}).
then
((
res
)
=>
{
this
.
notice
.
okTips
(
'已发送,30分钟内有效'
)
this
.
notice
.
okTips
(
'已发送,30分钟内有效'
)
...
@@ -722,7 +734,7 @@ export default {
...
@@ -722,7 +734,7 @@ export default {
bizType
:
this
.
form
.
bizType
,
bizType
:
this
.
form
.
bizType
,
autoFlag
:
this
.
form
.
autoFlag
,
autoFlag
:
this
.
form
.
autoFlag
,
settleTimeType
:
this
.
form
.
settleTimeType
,
settleTimeType
:
this
.
form
.
settleTimeType
,
settleTime
:
this
.
form
.
settleTime
,
settleTime
:
this
.
settleTimeObj
[
this
.
form
.
settleTimeType
===
1
?
'first'
:
'second'
]
,
settleAmountType
:
this
.
form
.
settleAmountType
,
settleAmountType
:
this
.
form
.
settleAmountType
,
// 全部-分账设置
// 全部-分账设置
merchantSettleType
:
this
.
accountSetForm
.
list
[
0
].
merchantSettleType
,
merchantSettleType
:
this
.
accountSetForm
.
list
[
0
].
merchantSettleType
,
...
@@ -750,6 +762,7 @@ export default {
...
@@ -750,6 +762,7 @@ export default {
message
:
'修改成功'
,
message
:
'修改成功'
,
type
:
'success'
type
:
'success'
})
})
this
.
deleteSession
()
this
.
close
({
tagName
:
'/merchantManage'
})
this
.
close
({
tagName
:
'/merchantManage'
})
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
'merchantManage'
name
:
'merchantManage'
...
@@ -770,6 +783,7 @@ export default {
...
@@ -770,6 +783,7 @@ export default {
})
})
},
},
onCancel
()
{
onCancel
()
{
this
.
deleteSession
()
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
'merchantManage'
name
:
'merchantManage'
})
})
...
...
src/views/systemConfig/merchant/merchantManage.vue
View file @
eaa0f9a
...
@@ -142,11 +142,9 @@ export default {
...
@@ -142,11 +142,9 @@ export default {
return
{
return
{
userInfo
:
this
.
$store
.
state
.
d2admin
.
user
.
info
,
userInfo
:
this
.
$store
.
state
.
d2admin
.
user
.
info
,
searchForm
:
{
searchForm
:
{
userType
:
''
,
merchantType
:
''
,
merchantType
:
''
,
channelType
:
''
,
channelType
:
''
,
merchantName
:
''
,
keyWord
:
''
yqMerchantName
:
''
},
},
showFormData
:
[{
showFormData
:
[{
label
:
'渠道'
,
label
:
'渠道'
,
...
@@ -155,14 +153,7 @@ export default {
...
@@ -155,14 +153,7 @@ export default {
optionList
:
[],
optionList
:
[],
optionId
:
'value'
,
optionId
:
'value'
,
optionLabel
:
'name'
,
optionLabel
:
'name'
,
optionsName
:
'channelTypeList'
,
optionsName
:
'channelTypeList'
changeAttr
:
(
value
,
targetItem
)
=>
{
if
(
value
)
{
this
.
baseData
.
userTypeList
=
value
===
2
?
this
.
ghUserTypeList
:
this
.
userTypeList
}
this
.
searchForm
.
userType
=
''
this
.
getOptionsList
()
}
},
{
},
{
label
:
'商户分类'
,
label
:
'商户分类'
,
name
:
'merchantType'
,
name
:
'merchantType'
,
...
@@ -173,7 +164,7 @@ export default {
...
@@ -173,7 +164,7 @@ export default {
optionsName
:
'merchantClassifyList'
optionsName
:
'merchantClassifyList'
},
{
},
{
label
:
'商户名称'
,
label
:
'商户名称'
,
name
:
'
merchantName
'
,
name
:
'
keyWord
'
,
type
:
'input'
,
type
:
'input'
,
placeholder
:
'请输入园区店/4S店/服务商商户名称'
,
placeholder
:
'请输入园区店/4S店/服务商商户名称'
,
isClear
:
true
,
isClear
:
true
,
...
@@ -186,16 +177,21 @@ export default {
...
@@ -186,16 +177,21 @@ export default {
tableOption
:
true
,
tableOption
:
true
,
tableColumns
:
[{
tableColumns
:
[{
label
:
'4S店编号'
,
label
:
'4S店编号'
,
prop
:
''
prop
:
'merchantId'
,
width
:
'100px'
},
{
},
{
label
:
'商户名称(4S店)'
,
label
:
'商户名称(4S店)'
,
prop
:
'merchantName'
prop
:
'merchantName'
},
{
},
{
label
:
'登录账户'
,
label
:
'登录账户'
,
prop
:
'accountName'
prop
:
'accountName'
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
merchant
?
cellValue
.
merchant
.
accountName
:
''
}
},
{
},
{
label
:
'渠道'
,
label
:
'渠道'
,
prop
:
'channelType'
,
prop
:
'channelType'
,
width
:
'80px'
,
formatter
:
(
cellValue
)
=>
{
formatter
:
(
cellValue
)
=>
{
return
{
return
{
1
:
'嘀加'
,
1
:
'嘀加'
,
...
@@ -208,21 +204,25 @@ export default {
...
@@ -208,21 +204,25 @@ export default {
width
:
'170px'
width
:
'170px'
},
{
},
{
label
:
'关联园区店号'
,
label
:
'关联园区店号'
,
prop
:
'yqMerchantId'
prop
:
'yqMerchantId'
,
width
:
'120px'
},
{
},
{
label
:
'关联服务商名称'
,
label
:
'关联服务商名称'
,
prop
:
''
prop
:
'merchantName'
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
partnerMerchant
?
cellValue
.
partnerMerchant
.
merchantName
:
''
}
},
{
},
{
label
:
'关联服务商号'
,
label
:
'关联服务商号'
,
prop
:
''
prop
:
'merchantId'
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
partnerMerchant
?
cellValue
.
partnerMerchant
.
merchantId
:
''
}
},
{
},
{
label
:
'最近更新时间'
,
label
:
'最近更新时间'
,
width
:
'150px'
,
width
:
'150px'
,
formatter
:
(
cellValue
)
=>
{
formatter
:
(
cellValue
)
=>
{
if
(
cellValue
&&
cellValue
.
settleAccountRule
)
{
return
new
Date
(
cellValue
.
updatedDate
).
toLocaleString
()
return
cellValue
.
settleAccountRule
.
updateDateStr
}
return
''
}
}
}]
}]
},
},
...
@@ -288,13 +288,10 @@ export default {
...
@@ -288,13 +288,10 @@ export default {
handleReset
()
{
handleReset
()
{
this
.
searchForm
=
{
this
.
searchForm
=
{
userType
:
''
,
merchantType
:
''
,
merchantType
:
''
,
channelType
:
''
,
channelType
:
''
,
merchantName
:
''
,
keyWord
:
''
yqMerchantName
:
''
}
}
this
.
baseData
.
userTypeList
=
[]
this
.
getOptionsList
()
this
.
getOptionsList
()
},
},
...
...
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