Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-appreciation
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 fa36dcf8
authored
Apr 28, 2024
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
联调
1 parent
ba434982
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
102 additions
and
13 deletions
src/api/modules/rules.js
src/views/inSale/upgrade.vue
src/views/inSale/upgradeOrder.vue
src/views/insurance/index.vue
src/api/modules/rules.js
View file @
fa36dcf
...
@@ -17,6 +17,10 @@ const isOpenUpgrade = () => {
...
@@ -17,6 +17,10 @@ const isOpenUpgrade = () => {
let
method
=
'dj.api.serviceMerchant.isOpenSmartcarlife'
let
method
=
'dj.api.serviceMerchant.isOpenSmartcarlife'
return
method
return
method
}
}
const
isOpenInsurance
=
()
=>
{
let
method
=
'dj.api.serviceMerchant.isOpenScene0'
return
method
}
// 订单统计
// 订单统计
const
orderTotal
=
()
=>
{
const
orderTotal
=
()
=>
{
let
method
=
'dj.api.smartcarlife.orderReport.total'
let
method
=
'dj.api.smartcarlife.orderReport.total'
...
@@ -133,4 +137,4 @@ const getMerchantList = params => {
...
@@ -133,4 +137,4 @@ const getMerchantList = params => {
sign
:
true
sign
:
true
})
})
}
}
export
{
getRulesData
,
getRulesListData
,
guestComTotal
,
isOpenUpgrade
,
orderTotal
,
couponsTotal
,
couponsTotalByDay
,
moneyTotal
,
findCoupons
,
findupGradeOrder
,
newFindupGradeOrder
,
checkCoupons
,
mydivision
,
exportMydivision
,
exportUpgrade
,
exportCoupons
,
getEmployName
,
checkDetail
,
orderTotalOfJT
,
orderTotalNumOfJT
,
myAccountTotalNumOfJT
,
get4SList
,
introConpute
,
getMerchantList
}
export
{
getRulesData
,
getRulesListData
,
guestComTotal
,
isOpenUpgrade
,
isOpenInsurance
,
orderTotal
,
couponsTotal
,
couponsTotalByDay
,
moneyTotal
,
findCoupons
,
findupGradeOrder
,
newFindupGradeOrder
,
checkCoupons
,
mydivision
,
exportMydivision
,
exportUpgrade
,
exportCoupons
,
getEmployName
,
checkDetail
,
orderTotalOfJT
,
orderTotalNumOfJT
,
myAccountTotalNumOfJT
,
get4SList
,
introConpute
,
getMerchantList
}
src/views/inSale/upgrade.vue
View file @
fa36dcf
...
@@ -5,29 +5,39 @@
...
@@ -5,29 +5,39 @@
<div
class=
"text"
>
该业务场景的优势介绍可点击
</div>
<div
class=
"text"
>
该业务场景的优势介绍可点击
</div>
<div
@
click=
"toIntroductPage"
class=
"btn_text"
>
去查看
</div>
<div
@
click=
"toIntroductPage"
class=
"btn_text"
>
去查看
</div>
</div>
</div>
<not-open-con
v-if=
"openType == 0"
></not-open-con>
<template
v-if=
"!openType"
>
<not-open-con
v-if=
"pageName != 'insurance'"
></not-open-con>
<warranty
v-else
></warranty>
</
template
>
<open-con
v-if=
"openType == 1"
></open-con>
<open-con
v-if=
"openType == 1"
></open-con>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
notOpenCon
from
'./upgradeIntro.vue'
import
notOpenCon
from
'./upgradeIntro.vue'
import
warranty
from
'@/views/publicity/warranty.vue'
import
openCon
from
'./open.vue'
import
openCon
from
'./open.vue'
import
{
isOpenUpgrade
}
from
'../../api/modules/rules'
import
{
isOpenUpgrade
,
isOpenInsurance
}
from
'../../api/modules/rules'
import
{
converterApi
}
from
'../../api/modules/converter'
import
{
converterApi
}
from
'../../api/modules/converter'
export
default
{
export
default
{
name
:
'index'
,
name
:
'index'
,
components
:
{
components
:
{
'not-open-con'
:
notOpenCon
,
'not-open-con'
:
notOpenCon
,
'open-con'
:
openCon
'open-con'
:
openCon
,
warranty
},
},
inject
:
[
'pageName'
],
data
()
{
data
()
{
return
{
return
{
openType
:
2
// 0未开通 1已开通
openType
:
2
// 0未开通 1已开通
}
}
},
},
created
()
{
created
()
{
if
(
this
.
pageName
==
'insurance'
)
{
this
.
judgeShowInsurance
()
}
else
{
this
.
judgeOpen
()
this
.
judgeOpen
()
}
// if(localStorage.getItem('openInfo')){
// if(localStorage.getItem('openInfo')){
// let info = JSON.parse(localStorage.getItem('openInfo'))
// let info = JSON.parse(localStorage.getItem('openInfo'))
// this.openType = info.open
// this.openType = info.open
...
@@ -60,9 +70,29 @@ export default {
...
@@ -60,9 +70,29 @@ export default {
loading
.
close
()
loading
.
close
()
})
})
},
},
judgeShowInsurance
()
{
let
method
=
isOpenInsurance
()
let
para
=
{
routerMethod
:
method
}
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'Loading'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.3)'
})
converterApi
(
para
)
.
then
(
res
=>
{
this
.
openType
=
res
})
.
finally
(
end
=>
{
loading
.
close
()
})
},
toIntroductPage
()
{
toIntroductPage
()
{
const
title
=
'业务介绍'
const
title
=
'业务介绍'
this
.
$router
.
push
({
path
:
'/inSale/upgradeIntro'
,
query
:
{
$title
:
title
}
})
const
pageUrl
=
this
.
pageName
==
'insurance'
?
'/publicity/warranty'
:
'/inSale/upgradeIntro'
this
.
$router
.
push
({
path
:
pageUrl
,
query
:
{
$title
:
title
}
})
}
}
}
}
}
}
...
...
src/views/inSale/upgradeOrder.vue
View file @
fa36dcf
...
@@ -216,6 +216,7 @@ export default {
...
@@ -216,6 +216,7 @@ export default {
props
:
{
props
:
{
list
:
Array
list
:
Array
},
},
inject
:
[
'pageName'
],
data
()
{
data
()
{
return
{
return
{
pageTypeObj
:
PAYTYPEOBJ
,
pageTypeObj
:
PAYTYPEOBJ
,
...
@@ -531,6 +532,14 @@ export default {
...
@@ -531,6 +532,14 @@ export default {
disabled
:
false
disabled
:
false
},
},
{
{
value
:
'setMealRule'
,
label
:
'套餐规则'
,
filter
:
true
,
level
:
3
,
width
:
'200'
,
disabled
:
false
},
{
value
:
'shopTrafficMoney'
,
value
:
'shopTrafficMoney'
,
label
:
'分账金额/元'
,
label
:
'分账金额/元'
,
level
:
3
,
level
:
3
,
...
@@ -674,6 +683,11 @@ export default {
...
@@ -674,6 +683,11 @@ export default {
width
:
'200'
width
:
'200'
},
},
{
{
label
:
'套餐规则'
,
prop
:
'setMealRule'
,
width
:
'200'
},
{
label
:
'分账金额/元'
,
label
:
'分账金额/元'
,
prop
:
'shopTrafficMoney'
,
prop
:
'shopTrafficMoney'
,
width
:
'110'
,
width
:
'110'
,
...
@@ -733,6 +747,18 @@ export default {
...
@@ -733,6 +747,18 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
if
(
this
.
pageName
!=
'insurance'
)
{
this
.
fieldList
=
this
.
fieldList
.
filter
(
item
=>
!
item
.
filter
)
this
.
$nextTick
(()
=>
{
const
_target
=
this
.
newTableParams
.
tableColumns
?.
find
(
item
=>
item
.
label
==
'导流方利润'
)
if
(
_target
)
{
const
_targetIdx
=
_target
?.
children
?.
findIndex
(
item
=>
item
.
prop
==
'setMealRule'
)
if
(
_targetIdx
>
-
1
)
{
_target
?.
children
?.
splice
(
_targetIdx
,
1
)
}
}
})
}
let
openInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'openInfo'
))
let
openInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'openInfo'
))
let
startDate
=
utils
.
dateFormat
(
openInfo
.
openDate
)
let
startDate
=
utils
.
dateFormat
(
openInfo
.
openDate
)
let
endDate
=
utils
.
dateFormat
(
new
Date
())
let
endDate
=
utils
.
dateFormat
(
new
Date
())
...
@@ -751,18 +777,16 @@ export default {
...
@@ -751,18 +777,16 @@ export default {
},
},
methods
:
{
methods
:
{
objectSpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
})
{
objectSpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
columnIndex
==
2
)
console
.
log
(
row
.
rowspan
,
rowIndex
,
columnIndex
)
const
mergeColList
=
[
'orderCode'
,
'tradeNo'
,
'customerName'
,
'sellerName'
,
'employeeName'
,
'payTypeName'
,
'subTotalPrice'
,
'realityShopMerchantName'
,
'subShopMerchantName'
,
'orderRule'
,
'shopTrafficMoney'
,
'divisionTypeName'
]
// column没有prop,只能用label判断
// column没有prop,只能用label判断
const
mergeColNameList
=
[
'主订单编号'
,
'交易参考号'
,
'客户姓名'
,
'转化员姓名'
,
'销售顾问'
,
'支付方式'
,
'支付金额/元'
,
'分账对象'
,
'二级流量方'
,
'整单规则'
,
'分账金额/元'
,
'分账类型'
]
const
mergeColNameList
=
[
'主订单编号'
,
'交易参考号'
,
'客户姓名'
,
'转化员姓名'
,
'销售顾问'
,
'支付方式'
,
'支付金额/元'
,
'分账对象'
,
'二级流量方'
,
'整单规则'
,
'分账金额/元'
,
'分账类型'
]
return
{
return
{
rowspan
:
mergeColNameList
.
includes
(
column
.
label
)
?
row
.
rowspan
:
1
,
rowspan
:
mergeColNameList
.
includes
(
column
.
label
)
?
row
.
rowspan
:
column
.
label
==
'套餐规则'
?
row
.
setMealRowspan
:
1
,
colspan
:
1
colspan
:
1
}
}
},
},
setClass
({
row
,
column
,
rowIndex
,
columnIndex
})
{
setClass
({
row
,
column
,
rowIndex
,
columnIndex
})
{
const
mergeColNameList
=
[
'主订单编号'
,
'交易参考号'
,
'客户姓名'
,
'转化员姓名'
,
'销售顾问'
,
'支付方式'
,
'支付金额/元'
,
'分账对象'
,
'二级流量方'
,
'整单规则'
,
'分账金额/元'
,
'分账类型'
]
const
mergeColNameList
=
[
'主订单编号'
,
'交易参考号'
,
'客户姓名'
,
'转化员姓名'
,
'销售顾问'
,
'支付方式'
,
'支付金额/元'
,
'分账对象'
,
'二级流量方'
,
'整单规则'
,
'分账金额/元'
,
'分账类型'
]
return
mergeColNameList
.
includes
(
column
.
label
)
&&
row
.
rowspan
>
1
?
'add-border'
:
''
return
(
mergeColNameList
.
includes
(
column
.
label
)
&&
row
.
rowspan
>
1
)
||
(
column
.
label
==
'套餐规则'
&&
row
.
setMealRowspan
>
1
)
?
'add-border'
:
''
},
},
/**获取商户列表 */
/**获取商户列表 */
getMerchanListData
(
accountLevel
)
{
getMerchanListData
(
accountLevel
)
{
...
@@ -992,15 +1016,18 @@ export default {
...
@@ -992,15 +1016,18 @@ export default {
const
orderRuleObj
=
item
.
mainProfitAllocation
||
{}
const
orderRuleObj
=
item
.
mainProfitAllocation
||
{}
packageOrderList
.
forEach
((
subItem
,
sunIdx
)
=>
{
packageOrderList
.
forEach
((
subItem
,
sunIdx
)
=>
{
const
subOrderList
=
subItem
.
subOrderList
||
[]
const
subOrderList
=
subItem
.
subOrderList
||
[]
const
setMealRuleObj
=
subItem
.
profitAllocationRule
||
{}
subOrderList
.
forEach
((
ele
,
eleIdx
)
=>
{
subOrderList
.
forEach
((
ele
,
eleIdx
)
=>
{
const
{
id
,
subOrderCode
,
subTotalPrice
,
upgradeGoodsCommodityCode
,
upgradeGoodsName
,
upgradeGoodsTypeName
,
subProfitAllocation
,
profitAllocationRule
}
=
ele
const
{
id
,
subOrderCode
,
subTotalPrice
,
upgradeGoodsCommodityCode
,
upgradeGoodsName
,
upgradeGoodsTypeName
,
subProfitAllocation
,
profitAllocationRule
}
=
ele
let
{
shopTrafficMoneyCalculateType
,
shopTrafficMoneyCalculateValue
}
=
profitAllocationRule
||
{}
let
{
shopTrafficMoneyCalculateType
,
shopTrafficMoneyCalculateValue
}
=
profitAllocationRule
||
{}
const
{
goodsCost
,
virtualAccountCost
,
actualIncomeMoney
}
=
subProfitAllocation
||
{}
const
{
goodsCost
,
virtualAccountCost
,
actualIncomeMoney
}
=
subProfitAllocation
||
{}
let
ruleType
=
TYPELIST
[
shopTrafficMoneyCalculateType
]
let
ruleType
=
TYPELIST
[
shopTrafficMoneyCalculateType
]
||
'--'
let
orderRuleType
=
TYPELIST
[
orderRuleObj
.
shopTrafficMoneyCalculateType
]
let
setMealRuleType
=
TYPELIST
[
setMealRuleObj
.
shopTrafficMoneyCalculateType
]
||
'--'
let
orderRuleType
=
TYPELIST
[
orderRuleObj
.
shopTrafficMoneyCalculateType
]
||
'--'
const
_obj
=
{
const
_obj
=
{
...
item
,
...
item
,
rowspan
:
1
,
rowspan
:
1
,
setMealRowspan
:
eleIdx
==
0
?
subOrderList
.
length
:
0
,
id
,
id
,
subOrderCode
,
subOrderCode
,
subTotalPrice
,
subTotalPrice
,
...
@@ -1011,8 +1038,9 @@ export default {
...
@@ -1011,8 +1038,9 @@ export default {
realityShopMerchantName
:
orderRuleObj
.
shopMerchantName
,
realityShopMerchantName
:
orderRuleObj
.
shopMerchantName
,
shopTrafficMoney
:
orderRuleObj
.
shopTrafficMoney
,
shopTrafficMoney
:
orderRuleObj
.
shopTrafficMoney
,
goodsCost
:
virtualAccountCost
||
goodsCost
,
goodsCost
:
virtualAccountCost
||
goodsCost
,
rule
:
`
${
ruleType
}${
shopTrafficMoneyCalculateType
==
0
?
''
:
shopTrafficMoneyCalculateValue
}${
shopTrafficMoneyCalculateType
==
0
?
''
:
'%'
}
`
,
rule
:
`
${
ruleType
}${
!
shopTrafficMoneyCalculateType
?
''
:
shopTrafficMoneyCalculateValue
}${
!
shopTrafficMoneyCalculateType
?
''
:
'%'
}
`
,
orderRule
:
`
${
orderRuleType
}${
orderRuleObj
.
shopTrafficMoneyCalculateType
==
0
?
''
:
orderRuleObj
.
shopTrafficMoneyCalculateValue
}${
orderRuleObj
.
shopTrafficMoneyCalculateType
==
0
?
''
:
'%'
}
`
,
orderRule
:
`
${
orderRuleType
}${
!
orderRuleObj
.
shopTrafficMoneyCalculateType
?
''
:
orderRuleObj
.
shopTrafficMoneyCalculateValue
}${
!
orderRuleObj
.
shopTrafficMoneyCalculateType
?
''
:
'%'
}
`
,
setMealRule
:
`
${
setMealRuleType
}${
!
setMealRuleObj
.
shopTrafficMoneyCalculateType
?
''
:
setMealRuleObj
.
shopTrafficMoneyCalculateValue
}${
!
setMealRuleObj
.
shopTrafficMoneyCalculateType
?
''
:
'%'
}
`
,
divisionTypeName
:
item
.
divisionType
==
1
?
'线下对账'
:
'线上分账'
,
divisionTypeName
:
item
.
divisionType
==
1
?
'线下对账'
:
'线上分账'
,
payTypeName
:
PAYTYPEOBJ
[
item
.
payType
],
payTypeName
:
PAYTYPEOBJ
[
item
.
payType
],
paySuccessDate
:
utils
.
dateFormat
(
item
.
paySuccessDate
,
'YYYY-MM-DD HH:mm:ss'
)
paySuccessDate
:
utils
.
dateFormat
(
item
.
paySuccessDate
,
'YYYY-MM-DD HH:mm:ss'
)
...
...
src/views/insurance/index.vue
0 → 100644
View file @
fa36dcf
<
template
>
<div>
<upgrade></upgrade>
</div>
</
template
>
<
script
>
import
upgrade
from
'@/views/inSale/upgrade.vue'
export
default
{
name
:
'index'
,
components
:
{
upgrade
:
upgrade
},
provide
()
{
return
{
pageName
:
'insurance'
}
},
data
()
{
return
{}
},
created
()
{},
mounted
()
{},
methods
:
{}
}
</
script
>
<
style
lang=
"scss"
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