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 d346b7d3
authored
Dec 08, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
切换分支
1 parent
e787a79b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
297 additions
and
25 deletions
src/store/modules/d2admin/modules/account.js
src/store/modules/d2admin/modules/base.js
src/views/systemConfig/merchant/financialRules/components/classificationCpt.vue
src/views/systemConfig/merchant/financialRules/components/tableAccount.vue
src/views/systemConfig/merchant/financialRules/index.vue
src/store/modules/d2admin/modules/account.js
View file @
d346b7d
...
...
@@ -171,7 +171,7 @@ export default {
// DB -> store 持久化数据加载全局尺寸
await
dispatch
(
"d2admin/size/load"
,
null
,
{
root
:
true
})
// DB - > 初始化 基础数据
// await dispatch('d2admin/base/init'
, null, { root: true })
await
dispatch
(
"d2admin/base/init"
,
null
,
{
root
:
true
})
// 后台接口 -> store
// await dispatch('d2admin/auth/init', null, { root: true })
// end
...
...
src/store/modules/d2admin/modules/base.js
View file @
d346b7d
...
...
@@ -33,7 +33,7 @@ export default {
async
([
channelType
,
productType
])
=>
{
state
.
channelType
=
channelType
state
.
productType
=
productType
console
.
log
(
productType
,
"productType"
)
//
console.log(productType, "productType")
await
dispatch
(
"save2db"
,
{
name
:
""
,
value
:
state
...
...
src/views/systemConfig/merchant/financialRules/components/classificationCpt.vue
View file @
d346b7d
...
...
@@ -28,32 +28,144 @@
</el-select>
</el-form-item>
<p
v-if=
"!tabindex"
>
全部商品
</p>
<p
class=
"edit-sub-title"
>
流量方分润
</p>
<el-form-item
required
:label=
"'手续费计算'"
>
<el-radio-group
v-model=
"classificationObj.shop4sDeductChargeFlag "
>
<el-radio
:label=
"'Y'"
>
扣除手续费
</el-radio>
<el-radio
:label=
"'N'"
>
不扣除手续费
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-for=
"(item,index) in classificationObj.trafficSide"
:key=
"index+100"
:label=
"item.expenseCategoryName"
required
>
<el-select
v-model=
"classificationObj.trafficSide[index].expenseCategoryCalculateType"
placeholder=
"请选择分润模式"
>
<el-option
v-for=
"el in defaultSelectOptions"
:key=
"el.expenseCategoryCalculateType"
:label=
"el.label"
:value=
"el.expenseCategoryCalculateType"
/>
</el-select>
</el-form-item>
<p
class=
"edit-sub-title"
>
服务商分润
</p>
<el-form-item
required
:label=
"'手续费计算'"
>
<el-radio-group
v-model=
"classificationObj.partnerDeductChargeFlag "
>
<el-radio
:label=
"'Y'"
>
扣除手续费
</el-radio>
<el-radio
:label=
"'N'"
>
不扣除手续费
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-for=
"(item,index) in classificationObj.serviceProvider"
:key=
"index+200"
:label=
"item.expenseCategoryName"
required
>
<el-select
v-model=
"classificationObj.serviceProvider[index].expenseCategoryCalculateType"
placeholder=
"请选择分润模式"
>
<el-option
v-for=
"el in severSelectOptions"
:key=
"el.expenseCategoryCalculateType"
:label=
"el.label"
:value=
"el.expenseCategoryCalculateType"
/>
</el-select>
</el-form-item>
<p
class=
"edit-sub-title"
>
其他费用
<span
class=
"title-tips"
>
用于费用预留,进行完流量方和服务商分润后,会自动先预留出对应的费用给承担方
</span>
</p>
<el-form-item
required
:label=
"'产品成本'"
>
<el-radio-group
v-model=
"classificationObj.goodsCostFlag "
>
<el-radio
:label=
"'Y'"
>
不扣除产品成本
</el-radio>
<el-radio
:label=
"'N'"
>
扣除产品成本
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
v-for=
"(item,index) in classificationObj.platformPublic"
:key=
"index+300"
:label=
"item.expenseCategoryName"
required
>
<el-select
v-model=
"classificationObj.platformPublic[index].expenseCategoryCalculateType"
placeholder=
"请选择分润模式"
>
<el-option
v-for=
"el in defaultSelectOptions"
:key=
"el.expenseCategoryCalculateType"
:label=
"el.label"
:value=
"el.expenseCategoryCalculateType"
/>
</el-select>
</el-form-item>
<!--
<p>
区别
</p>
-->
</el-form>
<!--
<div>
classificationCpt
</div>
-->
<!--
<div
class=
"headerContainer"
></div>
<div
class=
"publicContainer"
></div>
<el-tabs
type=
"border-card"
>
<el-tab-pane>
<span
slot=
"label"
><i
class=
"el-icon-date"
></i>
我的行程
</span>
我的行程
</el-tab-pane>
<el-tab-pane
label=
"消息中心"
>
消息中心
</el-tab-pane>
<el-tab-pane
label=
"角色管理"
>
角色管理
</el-tab-pane>
<el-tab-pane
label=
"定时任务补偿"
>
定时任务补偿
</el-tab-pane>
</el-tabs>
-->
<tableAccount
:table-select-options=
"tableSelectOptions"
:classification-obj-select=
"classificationObjSelect"
/>
</div>
</
template
>
<
script
>
// 1按毛利比例;2按收入比例;3按固定金额
// 1按收入比例;2按毛利比例;3按固定金额;4按(产值-流量成本)比例;5按(产值-流量成本-其他费用不包含产品成本))比例;6按(产值-流量成本-其他费用包含产品成本)比例);其他费用:1按收入比例
import
{
mapActions
,
mapState
,
mapMutations
}
from
'vuex'
import
tableAccount
from
'./tableAccount'
const
defaultSelectOptions
=
[
{
expenseCategoryCalculateType
:
1
,
label
:
'按毛利比例'
},
{
expenseCategoryCalculateType
:
2
,
label
:
'按收入比例'
},
{
expenseCategoryCalculateType
:
3
,
label
:
'按固定金额'
}
]
const
severSelectOptions
=
[
{
expenseCategoryCalculateType
:
1
,
label
:
'按收入比例'
},
{
expenseCategoryCalculateType
:
2
,
label
:
'按毛利比例'
},
{
expenseCategoryCalculateType
:
3
,
label
:
'按固定金额'
},
{
expenseCategoryCalculateType
:
4
,
label
:
'按(产值-流量成本)比例'
},
{
expenseCategoryCalculateType
:
5
,
label
:
'按(产值-流量成本-其他费用不包含产品成本))比例'
},
{
expenseCategoryCalculateType
:
6
,
label
:
'按(产值-流量成本-其他费用包含产品成本)比例'
}
]
export
default
{
name
:
'ClassificationCpt'
,
// isNeedVuex: true,
components
:
{
tableAccount
},
props
:
{
goodsList
:
{
type
:
Array
,
...
...
@@ -65,13 +177,50 @@ export default {
},
tabindex
:
{
default
:
0
},
classificationObjSelect
:
// 类目选择
{
type
:
Object
,
default
()
{
return
{}
}
},
// 平台方和导流方
financialLedgerParty
:
{
type
:
Object
,
default
()
{
return
{}
}
}
},
data
()
{
return
{
classificationObj
:
{
goodsTypeGroupRelations
:
[]
goodsTypeGroupRelations
:
[],
trafficSide
:
[],
serviceProviderSide
:
[],
platformPublic
:
[],
shop4sDeductChargeFlag
:
'Y'
,
// 导流方POS机支付是否扣除手续费(Y:扣除,N:不扣)
partnerDeductChargeFlag
:
'Y'
,
// 服务商POS机支付是否扣除手续费(Y:扣除,N:不扣)
goodsCostFlag
:
'Y'
,
// 平台方是否扣除产品成本(Y:计算,N:不计算)
groupType
:
1
,
expenseCategoryRules
:
[]
// expenseCategoryRules: [
// {
// expenseCategoryCalculateType: "string", // 计算方式
// expenseCategoryValue: 0, // 费用类目计算值(%/元)
// targetMerchantName: 'test',
// targetMerchantId: '22',
// expenseCategoryId: 0, // 费用类目id
// expenseCategoryName: "string" // 费用类目名
// }
// ]
},
defaultSelectOptions
:
Object
.
freeze
(
defaultSelectOptions
),
severSelectOptions
:
Object
.
freeze
(
severSelectOptions
),
rules
:
{
goodsTypeGroupRelations
:
[{
required
:
true
,
message
:
'请选择商品'
,
trigger
:
'change'
}]
}
...
...
@@ -102,6 +251,37 @@ export default {
}
})
return
list
},
// 已选的服务商列表
severList
()
{
const
list
=
this
.
classificationObj
.
expenseCategoryRules
return
list
.
map
((
item
)
=>
{
if
(
item
.
targetMerchantId
)
{
return
{
targetMerchantType
:
2
,
merchantId
:
item
.
targetMerchantId
,
merchantName
:
item
.
targetMerchantName
}
}
})
},
// 分账金额设置 对应的选项
tableSelectOptions
()
{
const
info
=
this
.
financialLedgerParty
// 平台方
const
platformSideobj
=
{
merchantId
:
info
.
realityPlatformMerchantId
,
// 实际分账平台方商户id(嘀加智慧云为-1)
merchantName
:
info
.
realityPlatformMerchantName
,
targetMerchantType
:
1
}
// 4s 店
const
merchantSideobj
=
{
merchantId
:
info
.
realityShopMerchantId
,
// 实际分账商户方商户id(嘀加智慧云为-1)
merchantName
:
info
.
realityShopMerchantName
,
targetMerchantType
:
3
}
return
[
platformSideobj
,
merchantSideobj
]
// this.tableSelectOptions =
}
},
filters
:
{
...
...
@@ -128,7 +308,21 @@ export default {
}
},
deep
:
true
},
classificationObjSelect
:
{
handler
()
{
this
.
initList
()
},
deep
:
true
,
immediate
:
true
}
// financialLedgerParty: {
// handler() {
// this.changeFinancialLedgerPartySelect()
// },
// immediate: true
// }
},
mounted
()
{
// console.log(this.test, 'test')
...
...
@@ -147,9 +341,36 @@ export default {
},
getParams
()
{
return
this
.
classificationObj
},
initList
()
{
this
.
classificationObj
.
groupType
=
this
.
tabindex
?
1
:
2
const
setList
=
this
.
classificationObjSelect
// const list = {}
// console.log('setList', setList)
for
(
const
key
in
setList
)
{
// console.log('setList[key]', setList[key])
this
.
classificationObj
[
key
]
=
[]
setList
[
key
].
forEach
((
item
)
=>
{
const
obj
=
{
expenseCategoryCalculateType
:
''
,
// 计算方式
expenseCategoryValue
:
''
,
// 费用类目计算值(%/元)
targetMerchantName
:
'2'
,
targetMerchantId
:
'1'
,
expenseCategoryId
:
item
.
id
,
// 费用类目id
expenseCategoryName
:
item
.
applicationObjectName
// 费用类目名
// { applicationObjectType: 1, applicationObjectName: 'test1', id: 1 }
}
// console.log(obj, 'obj')
this
.
classificationObj
[
key
].
push
(
obj
)
})
}
// console.log(list)
// this.classificationObj.expenseCategoryRules = list
// this.classificationObjSelect =
}
//
song
() {
// return 111
//
changeFinancialLedgerPartySelect
() {
// }
}
}
...
...
src/views/systemConfig/merchant/financialRules/components/tableAccount.vue
0 → 100644
View file @
d346b7d
This diff is collapsed.
Click to expand it.
src/views/systemConfig/merchant/financialRules/index.vue
View file @
d346b7d
...
...
@@ -78,7 +78,7 @@
</div>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"平台方分账方
:
"
<el-form-item
label=
"平台方分账方"
prop=
"realityPlatformMerchantId"
required
>
<el-select
v-model=
"financialObj.realityPlatformMerchantId"
...
...
@@ -89,9 +89,10 @@
:value=
"item.merchantId"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"流量方分账方
:
"
<el-form-item
label=
"流量方分账方"
prop=
"realityShopMerchantId"
required
>
<!-- @change="refreshData" -->
<el-select
v-model=
"financialObj.realityShopMerchantId"
placeholder=
""
>
<el-option
v-for=
"item in baseData.merchantLevelList"
...
...
@@ -119,7 +120,9 @@
<classificationCpt
:goods-list=
"goodsTypeGroupRelations"
:ref=
"`classification$
{item.name}`"
:goods-select-list="goodsSelectList"
:financial-ledger-party="financialLedgerParty"
:tabindex="idx"
:classification-obj-select="classificationObj"
@assignGoodsList="assignGoodsList"
@deleteGoodsItem="deleteGoodsItem" />
</div>
...
...
@@ -184,6 +187,11 @@ export default {
{
goodsType
:
5
,
goodsTypeName
:
'商品5'
},
{
goodsType
:
6
,
goodsTypeName
:
'商品6'
}
],
classificationObj
:
{
trafficSide
:
[{
applicationObjectType
:
2
,
applicationObjectName
:
'test1'
,
id
:
3
},
{
applicationObjectType
:
2
,
applicationObjectName
:
'test2'
,
id
:
4
}],
serviceProvider
:
[{
applicationObjectType
:
3
,
applicationObjectName
:
'test1'
,
id
:
6
},
{
applicationObjectType
:
2
,
applicationObjectName
:
'test2'
,
id
:
5
}],
platformPublic
:
[{
applicationObjectType
:
1
,
applicationObjectName
:
'test1'
,
id
:
1
},
{
applicationObjectType
:
2
,
applicationObjectName
:
'test2'
,
id
:
2
}]
},
sceneList
:
Object
.
freeze
(
sceneList
),
// tabsList: [{ name: '全部商品分类', showIcon: false }],
// tabsIndex: '1',
...
...
@@ -235,12 +243,12 @@ export default {
},
expenseCategoryRules
:
[
{
expenseCategoryId
:
0
,
// 费用类目id
expenseCategoryName
:
"string"
,
// 费用类目名
expenseCategoryCalculateType
:
"string"
,
// 计算方式
expenseCategoryValue
:
0
,
// 费用类目计算值(%/元)
targetMerchantName
:
'test'
,
targetMerchantId
:
'22'
,
targetMerchantName
:
'test'
expenseCategoryId
:
0
,
// 费用类目id
expenseCategoryName
:
"string"
// 费用类目名
}
]
}
...
...
@@ -292,9 +300,11 @@ export default {
// .FinancialRules.active
test
:
(
state
)
=>
state
.
FinancialRules
.
active
,
productType
:
(
state
)
=>
state
.
d2admin
.
base
.
productType
//
}),
routerInfo
()
{
// console.log(this.$route)
return
this
.
$route
.
query
.
params
?
JSON
.
parse
(
this
.
$route
.
query
.
params
)
:
''
},
addVisible
()
{
...
...
@@ -308,8 +318,45 @@ export default {
// console.log(length2 < length3)
console
.
log
((
length1
-
length3
)
>
0
&&
length1
>
length2
)
return
(
length1
-
length3
)
>
0
&&
length1
>
length2
},
//
financialLedgerParty
()
{
const
{
realityPlatformMerchantId
,
realityPlatformMerchantName
,
realityShopMerchantId
,
realityShopMerchantName
}
=
this
.
financialObj
return
{
realityPlatformMerchantId
,
// 实际分账平台方商户id(嘀加智慧云为-1)
realityPlatformMerchantName
,
// 实际分账平台方商户名称
realityShopMerchantId
,
realityShopMerchantName
}
}
},
watch
:
{
'financialObj.realityShopMerchantId'
:
{
handler
(
val
)
{
// this.financialObj.realityShopMerchantId
const
obj
=
this
.
baseData
.
merchantLevelList
.
find
(
item
=>
item
.
merchantId
==
val
)
const
shop
=
{
realityShopMerchantId
:
obj
.
merchantId
,
realityShopMerchantName
:
obj
.
merchantName
,
realityShopUserType
:
obj
.
userType
}
this
.
financialObj
=
Object
.
assign
(
this
.
financialObj
,
shop
)
}
},
'financialObj.PlatformLevelList'
:
{
handler
(
val
)
{
// this.financialObj.realityShopMerchantId
const
obj
=
this
.
baseData
.
PlatformLevelList
.
find
(
item
=>
item
.
merchantId
==
val
)
const
Platform
=
{
realityPlatformMerchantId
:
obj
.
merchantId
,
realityPlatformMerchantName
:
obj
.
merchantName
,
realityPlatformUserType
:
obj
.
userType
}
this
.
financialObj
=
Object
.
assign
(
this
.
financialObj
,
Platform
)
}
}
},
mounted
()
{
// console.log(this.$route.query.params)
// console.log(JSON.parse(this.$route.query.params))
...
...
@@ -490,6 +537,10 @@ export default {
}
return
arr
},
[])
},
refreshData
()
{
// el-select 强制刷新
}
}
}
...
...
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