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 6c81b83d
authored
Apr 24, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
财务设置,分账
1 parent
271b38e6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
122 deletions
src/api/merchant.js
src/components/d2-dialog/index.vue
src/views/systemConfig/merchant/divisionRule.vue
src/views/systemConfig/merchant/merchantDetail.vue
src/views/systemConfig/merchant/merchantManage.vue
src/views/systemConfig/serviceManage.vue
src/api/merchant.js
View file @
6c81b83
...
@@ -54,3 +54,15 @@ export function getShopDetail(data) {
...
@@ -54,3 +54,15 @@ export function getShopDetail(data) {
data
.
method
=
`
${
path
}
servicemerchantref.shop.detail`
data
.
method
=
`
${
path
}
servicemerchantref.shop.detail`
return
request
(
data
,
'post'
)
return
request
(
data
,
'post'
)
}
}
// 获取分账规则
export
function
getDivisionRuleApi
(
data
)
{
data
.
method
=
`
${
path2
}
merchantDivisionRule.get.byMerchantId`
return
request
(
data
,
'post'
)
}
// 修改分账规则
export
function
updateDivisionRuleApi
(
data
)
{
data
.
method
=
`
${
path2
}
merchantDivisionRule.update`
return
request
(
data
,
'post'
)
}
src/components/d2-dialog/index.vue
View file @
6c81b83
...
@@ -11,8 +11,10 @@
...
@@ -11,8 +11,10 @@
>
>
<span
slot=
"title"
>
<span
slot=
"title"
>
{{
title
}}
{{
title
}}
<span
class=
"dialog-sub-title"
>
<slot
name=
"sub-title"
></slot>
<slot
name=
"sub-title"
></slot>
</span>
</span>
</span>
<slot></slot>
<slot></slot>
<div
slot=
"footer"
>
<div
slot=
"footer"
>
<slot
name=
"btn-start"
></slot>
<slot
name=
"btn-start"
></slot>
...
@@ -77,4 +79,8 @@ export default {
...
@@ -77,4 +79,8 @@ export default {
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.dialog-sub-title
{
font-size
:
12px
;
color
:
#666666
;
}
</
style
>
</
style
>
src/views/systemConfig/merchant/divisionRule.vue
0 → 100644
View file @
6c81b83
This diff is collapsed.
Click to expand it.
src/views/systemConfig/merchant/merchantDetail.vue
View file @
6c81b83
...
@@ -30,88 +30,6 @@
...
@@ -30,88 +30,6 @@
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<p
class=
"edit-sub-title"
>
交易结算规则
</p>
<el-form-item
label=
""
prop=
"autoFlag"
>
<span
class=
"tips-block"
slot=
"label"
>
<span
class=
"tips-label"
>
线上自动分账
</span>
<el-tooltip
popper-class=
"tooltip-class"
effect=
"dark"
content=
"产生交易后会自动打款给商户,开启及关闭操作第二天生效。"
placement=
"top"
>
<span
class=
"tips-icon"
></span>
</el-tooltip>
:
</span>
<el-radio-group
v-model=
"form.autoFlag"
>
<el-switch
v-model=
"form.autoFlag"
active-value=
"Y"
inactive-value=
"N"
>
</el-switch>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"结算时间方式"
prop=
"settleTimeType"
>
<span
class=
"tips-block"
slot=
"label"
>
<span
class=
"tips-label"
>
结算周期
</span>
<el-tooltip
popper-class=
"tooltip-class"
effect=
"dark"
content=
"用户支付的款项可按T+1或指定日自动打款给商户。"
placement=
"top"
>
<span
class=
"tips-icon"
></span>
</el-tooltip>
:
</span>
<el-radio-group
v-model=
"form.settleTimeType"
:disabled=
"form.autoFlag === 'N'"
>
<div
class=
"block_item"
>
<el-radio
:label=
"1"
>
结算周期 T+
<el-input-number
v-model=
"settleTimeObj.first"
controls-position=
"right"
size=
"small"
:min=
"0"
:max=
"30"
:disabled=
"form.settleTimeType === 2 || form.autoFlag === 'N'"
></el-input-number>
日
</el-radio>
</div>
<div
class=
"block_item"
>
<el-radio
:label=
"2"
>
固定日期结算:每月
<el-input-number
v-model=
"settleTimeObj.second"
controls-position=
"right"
size=
"small"
:min=
"1"
:max=
"31"
:disabled=
"form.settleTimeType === 1 || form.autoFlag === 'N'"
></el-input-number>
日
</el-radio>
</div>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"结算方式"
prop=
"settleAmountType"
>
<span>
全额打款至商户
</span>
</el-form-item>
<div>
<div>
<p
class=
"edit-sub-title"
>
分账比例设置
</p>
<p
class=
"edit-sub-title"
>
分账比例设置
</p>
<div
class=
"account-card-block"
>
<div
class=
"account-card-block"
>
...
@@ -477,16 +395,8 @@ export default {
...
@@ -477,16 +395,8 @@ export default {
data
()
{
data
()
{
return
{
return
{
sessionName
:
'merchatDetailItem'
,
sessionName
:
'merchatDetailItem'
,
// 结算周期
settleTimeObj
:
{
first
:
'1'
,
second
:
'1'
},
form
:
{
form
:
{
merchantName
:
''
,
merchantName
:
''
,
autoFlag
:
'N'
,
settleTimeType
:
1
,
settleTime
:
'1'
,
bizType
:
'1'
,
bizType
:
'1'
,
settleAmountType
:
'1'
settleAmountType
:
'1'
},
},
...
@@ -497,15 +407,7 @@ export default {
...
@@ -497,15 +407,7 @@ export default {
phone
:
''
phone
:
''
},
},
rules
:
{
rules
:
{
autoFlag
:
[
smsCode
:
[{
required
:
true
,
message
:
'请输入验证码'
,
trigger
:
'blur'
}]
{
required
:
true
,
message
:
'请选择是否开启自动打款结算'
,
trigger
:
'change'
}
],
settleTimeType
:
[
{
required
:
true
,
message
:
'请选择结算时间方式'
,
trigger
:
'change'
}
],
smsCode
:
[
{
required
:
true
,
message
:
'请输入验证码'
,
trigger
:
'blur'
}
]
},
},
// 编辑按钮
// 编辑按钮
isFirstSetEdit
:
false
,
isFirstSetEdit
:
false
,
...
@@ -593,12 +495,8 @@ export default {
...
@@ -593,12 +495,8 @@ export default {
Object
.
assign
(
this
.
form
,
JSON
.
parse
(
sessionStorage
.
getItem
(
this
.
sessionName
)))
Object
.
assign
(
this
.
form
,
JSON
.
parse
(
sessionStorage
.
getItem
(
this
.
sessionName
)))
}
}
getAccountRule
({
'merchantId'
:
this
.
form
.
merchantId
}).
then
(
res
=>
{
getAccountRule
({
'merchantId'
:
this
.
form
.
merchantId
}).
then
(
res
=>
{
console
.
log
(
res
)
//
console.log(res)
if
(
res
)
{
if
(
res
)
{
this
.
form
.
autoFlag
=
res
.
autoFlag
this
.
form
.
settleTimeType
=
res
.
settleTimeType
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
+
''
...
@@ -712,23 +610,19 @@ export default {
...
@@ -712,23 +610,19 @@ export default {
},
},
assignConfirm
()
{
assignConfirm
()
{
// console.log(this.form)
// console.log(this.form)
console
.
log
(
this
.
accountSetForm
)
//
console.log(this.accountSetForm)
console
.
log
(
this
.
accountSecondSetForm
)
//
console.log(this.accountSecondSetForm)
var
params
=
{
var
params
=
{
merchantId
:
this
.
form
.
merchantId
,
merchantId
:
this
.
form
.
merchantId
,
channelType
:
this
.
form
.
channelType
,
channelType
:
this
.
form
.
channelType
,
smsCode
:
this
.
form
.
smsCode
,
smsCode
:
this
.
form
.
smsCode
,
bizType
:
this
.
form
.
bizType
,
bizType
:
this
.
form
.
bizType
,
autoFlag
:
this
.
form
.
autoFlag
,
settleTimeType
:
this
.
form
.
settleTimeType
,
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
,
merchantProfitValue
:
this
.
accountSetForm
.
list
[
0
].
merchantProfitValue
,
merchantProfitValue
:
this
.
accountSetForm
.
list
[
0
].
merchantProfitValue
,
incentiveType
:
this
.
accountSetForm
.
incentiveType
,
incentiveType
:
this
.
accountSetForm
.
incentiveType
,
incentiveValue
:
this
.
accountSetForm
.
incentiveValue
,
incentiveValue
:
this
.
accountSetForm
.
incentiveValue
,
// partnerProfitPer: this.accountSecondSetForm.list[0].partnerProfitPer,
goodsTypeSettleRuleList
:
[]
goodsTypeSettleRuleList
:
[]
}
}
// 是否配置服务商
// 是否配置服务商
...
@@ -740,14 +634,11 @@ export default {
...
@@ -740,14 +634,11 @@ export default {
goodsTypeName
:
item
.
goodsTypeName
,
goodsTypeName
:
item
.
goodsTypeName
,
merchantSettleType
:
item
.
merchantSettleType
,
merchantSettleType
:
item
.
merchantSettleType
,
merchantProfitValue
:
item
.
merchantProfitValue
merchantProfitValue
:
item
.
merchantProfitValue
// partnerProfitPer: this.accountSecondSetForm.list[index].partnerProfitPer
})
})
// 是否配置服务商
// 是否配置服务商
this
.
form
.
parentMerchantName
&&
(
params
.
goodsTypeSettleRuleList
[
index
-
1
].
partnerProfitPer
=
this
.
accountSecondSetForm
.
list
[
index
].
partnerProfitPer
)
this
.
form
.
parentMerchantName
&&
(
params
.
goodsTypeSettleRuleList
[
index
-
1
].
partnerProfitPer
=
this
.
accountSecondSetForm
.
list
[
index
].
partnerProfitPer
)
}
}
})
})
console
.
log
(
params
)
updateRule
(
params
).
then
((
res
)
=>
{
updateRule
(
params
).
then
((
res
)
=>
{
this
.
$message
({
this
.
$message
({
message
:
'修改成功'
,
message
:
'修改成功'
,
...
@@ -778,7 +669,6 @@ export default {
...
@@ -778,7 +669,6 @@ export default {
}
}
})
})
}
else
{
}
else
{
console
.
log
(
'error submit!!'
)
return
false
return
false
}
}
})
})
...
...
src/views/systemConfig/merchant/merchantManage.vue
View file @
6c81b83
...
@@ -143,8 +143,12 @@
...
@@ -143,8 +143,12 @@
disabled=
"true"
disabled=
"true"
>
配置管理
</el-tab-pane>
>
配置管理
</el-tab-pane>
</el-tabs>
</el-tabs>
</d2-dialog>
</d2-dialog>
<division-rule
:divisionRuleVisible=
"divisionRuleVisible"
:merchantInfo=
"merchantInfo"
@
handleRuleClose=
"handleRuleClose"
></division-rule>
</d2-container>
</d2-container>
</
template
>
</
template
>
...
@@ -152,6 +156,7 @@
...
@@ -152,6 +156,7 @@
import
{
Util
}
from
'@/common/util'
import
{
Util
}
from
'@/common/util'
import
_
from
'lodash'
import
_
from
'lodash'
import
viewDetail
from
'./viewDetail'
import
viewDetail
from
'./viewDetail'
import
divisionRule
from
'./divisionRule'
import
{
getList
,
deleteMerchant
,
serviceGetMerchantList
,
addServiceMerchant
}
from
'@api/merchant'
import
{
getList
,
deleteMerchant
,
serviceGetMerchantList
,
addServiceMerchant
}
from
'@api/merchant'
import
{
mapActions
}
from
'vuex'
import
{
mapActions
}
from
'vuex'
import
{
getParkStore
}
from
'@api/editCustomer'
import
{
getParkStore
}
from
'@api/editCustomer'
...
@@ -263,6 +268,9 @@ export default {
...
@@ -263,6 +268,9 @@ export default {
storeApi
:
serviceGetMerchantList
,
storeApi
:
serviceGetMerchantList
,
sourcePage
:
'serviceStore'
,
sourcePage
:
'serviceStore'
,
storeSelected
:
[],
storeSelected
:
[],
// 分账
divisionRuleVisible
:
false
,
merchantInfo
:
{},
// 查看详情
// 查看详情
detailActiveName
:
'first'
,
detailActiveName
:
'first'
,
viewDetailVisible
:
false
,
viewDetailVisible
:
false
,
...
@@ -276,7 +284,8 @@ export default {
...
@@ -276,7 +284,8 @@ export default {
},
},
components
:
{
components
:
{
viewDetail
viewDetail
,
divisionRule
},
},
mounted
()
{
mounted
()
{
...
@@ -391,7 +400,13 @@ export default {
...
@@ -391,7 +400,13 @@ export default {
this
.
handleViewClose
()
this
.
handleViewClose
()
},
},
// 分账
// 分账
handleAccount
()
{
},
handleAccount
(
row
)
{
this
.
merchantInfo
=
row
this
.
handleRuleClose
()
},
handleRuleClose
()
{
this
.
divisionRuleVisible
=
!
this
.
divisionRuleVisible
},
// 删除
// 删除
handleDelete
(
row
)
{
handleDelete
(
row
)
{
this
.
$confirm
(
'是否要进行删除操作?'
,
'提示'
,
{
this
.
$confirm
(
'是否要进行删除操作?'
,
'提示'
,
{
...
...
src/views/systemConfig/serviceManage.vue
View file @
6c81b83
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
@
confirmDialog=
"handleRelateConfirm"
@
confirmDialog=
"handleRelateConfirm"
@
closeDialog=
"handleRelateClose"
@
closeDialog=
"handleRelateClose"
>
>
<span
slot=
"sub-title"
class=
"relate-sub-title"
>
为园区店关联对应的服务商,一家园区店只能关联一个服务商
</span>
<span
slot=
"sub-title"
>
为园区店关联对应的服务商,一家园区店只能关联一个服务商
</span>
<el-form
<el-form
ref=
"relateDialog"
ref=
"relateDialog"
:model=
"relateForm"
:model=
"relateForm"
...
@@ -357,8 +357,4 @@ export default {
...
@@ -357,8 +357,4 @@ export default {
.delete-dialog
.delete-title
{
.delete-dialog
.delete-title
{
font-size
:
16px
;
font-size
:
16px
;
}
}
.relate-dialog
.relate-sub-title
{
font-size
:
12px
;
color
:
#666666
;
}
</
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