Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
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 20be577d
authored
Aug 21, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
看产值-指定场景
1 parent
91aa05e0
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
272 additions
and
91 deletions
pages/tab/outputValue/components/merchant/merchant.js
pages/tab/outputValue/components/merchant/merchant.json
pages/tab/outputValue/components/merchant/merchant.wxml
pages/tab/outputValue/components/merchantCom/Membranes/Membranes.js → pages/tab/outputValue/components/merchantCom/MerchantScene/MerchantScene.js
pages/tab/outputValue/components/merchantCom/Membranes/Membranes.json → pages/tab/outputValue/components/merchantCom/MerchantScene/MerchantScene.json
pages/tab/outputValue/components/merchantCom/Membranes/Membranes.scss → pages/tab/outputValue/components/merchantCom/MerchantScene/MerchantScene.scss
pages/tab/outputValue/components/merchantCom/Membranes/Membranes.wxml → pages/tab/outputValue/components/merchantCom/MerchantScene/MerchantScene.wxml
pages/tab/outputValue/components/merchantCom/constant.js
pages/tab/outputValue/outputValue.wxml
pages/tab/outputValue/components/merchant/merchant.js
View file @
20be577
...
...
@@ -6,7 +6,24 @@ Component({
* 组件的属性列表
*/
properties
:
{
searchForm
:
{
type
:
Object
,
value
:
()
=>
{
return
{
// 服务商商户号
partnerMerchantId
:
''
,
// 4S店商户号
merchantId
:
''
,
// 年月(yyyy-MM)
yearMonth
:
''
,
// 场景(1精品升级,3众筹,0会员权益)
sceneType
:
''
}
},
observer
:
function
(
n
)
{
n
&&
this
.
search
()
}
}
},
/**
...
...
@@ -24,50 +41,51 @@ Component({
total
:
'164422'
},
// 1精品升级(太阳膜),3众筹,0会员权益)
merchantList
:
[],
// 服务商-多4s店-全部
// m
erchantList: [{
//
yearMonth: '2023-08',
//
curMonthTotalData: {
//
scene1Total: '5986',
//
scene0Total: '76400',
//
scene3Total: '11000',
//
total: '19567'
//
},
//
merchantDataList: [{
//
merchantName: '四川申蓉汇亚汽车贸易有限公司',
//
curMonthTotalData: {
//
scene1Total: '5026',
//
scene0Total: '11000',
//
scene3Total: '2581',
//
total: '18607'
//
},
//
lastMonthTotalData: {
//
scene1Total: '51122',
//
scene0Total: '2355',
//
scene3Total: '65400',
//
total: '0'
//
}
//
}, {
//
merchantName: '四川港宏新通汽车销售服务有限公司',
//
curMonthTotalData: {
//
scene1Total: '960',
//
scene0Total: '0',
//
scene3Total: '0',
//
total: '960'
//
},
//
lastMonthTotalData: {
//
scene1Total: '123223',
//
scene0Total: '0',
//
scene3Total: '0',
//
total: '0'
//
}
//
}]
//
}],
allM
erchantList
:
[{
yearMonth
:
'2023-08'
,
curMonthTotalData
:
{
scene1Total
:
'5986'
,
scene0Total
:
'76400'
,
scene3Total
:
'11000'
,
total
:
'19567'
},
merchantDataList
:
[{
merchantName
:
'四川申蓉汇亚汽车贸易有限公司'
,
curMonthTotalData
:
{
scene1Total
:
'5026'
,
scene0Total
:
'11000'
,
scene3Total
:
'2581'
,
total
:
'18607'
},
lastMonthTotalData
:
{
scene1Total
:
'51122'
,
scene0Total
:
'2355'
,
scene3Total
:
'65400'
,
total
:
'0'
}
},
{
merchantName
:
'四川港宏新通汽车销售服务有限公司'
,
curMonthTotalData
:
{
scene1Total
:
'960'
,
scene0Total
:
'0'
,
scene3Total
:
'0'
,
total
:
'960'
},
lastMonthTotalData
:
{
scene1Total
:
'123223'
,
scene0Total
:
'0'
,
scene3Total
:
'0'
,
total
:
'0'
}
}]
}],
// 指定场景
m
erchantList
:
[{
otherM
erchantList
:
[{
yearMonth
:
'2023-08'
,
curMonthTotalData
:
{
totalCustomer
:
'
100
'
,
totalCustomer
:
'
22
'
,
total
:
'133862000'
,
notUpgradeCount
:
'22'
,
bizTotal
:
'960523'
,
...
...
@@ -82,8 +100,8 @@ Component({
merchantId
:
111
,
merchantName
:
'广西弘泽汽车销售服务有限公司'
,
bizTotal
:
'39000'
,
cur
Month
TotalData
:
{
totalCustomer
:
''
,
cur
Day
TotalData
:
{
totalCustomer
:
'
177
'
,
total
:
''
,
notUpgradeCount
:
'199'
,
bizTotal
:
'18228'
,
...
...
@@ -94,23 +112,48 @@ Component({
upgradeRate
:
'89'
,
productCode
:
''
},
lastMonthTotalData
:
{
totalCustomer
:
''
,
curMonthTotalData
:
[
{
totalCustomer
:
'
2000
'
,
total
:
''
,
notUpgradeCount
:
'199'
,
bizTotal
:
'258228'
,
custUnitPrice
:
'559'
,
upgradeCount
:
'2000'
,
activityTotal
:
''
,
orderTotal
:
''
,
activityTotal
:
'
1
'
,
orderTotal
:
'
22
'
,
upgradeRate
:
'12'
,
productCode
:
''
}
productCode
:
''
,
productName
:
'数字化美容'
},
{
totalCustomer
:
'2000'
,
total
:
''
,
notUpgradeCount
:
'199'
,
bizTotal
:
'258228'
,
custUnitPrice
:
'559'
,
upgradeCount
:
'2000'
,
activityTotal
:
'3'
,
orderTotal
:
'50'
,
upgradeRate
:
'12'
,
productCode
:
''
,
productName
:
'座椅通风'
},
{
totalCustomer
:
'2000'
,
total
:
''
,
notUpgradeCount
:
'199'
,
bizTotal
:
'258228'
,
custUnitPrice
:
'559'
,
upgradeCount
:
'2000'
,
activityTotal
:
'1'
,
orderTotal
:
'22'
,
upgradeRate
:
'12'
,
productCode
:
''
,
productName
:
'AR导航'
}]
},
{
merchantId
:
222
,
merchantName
:
'益阳佳烨丰田汽车销售服务有限公司啦啦啦啦'
,
bizTotal
:
'19000'
,
cur
Month
TotalData
:
{
cur
Day
TotalData
:
{
totalCustomer
:
''
,
total
:
''
,
notUpgradeCount
:
'199'
,
...
...
@@ -122,18 +165,19 @@ Component({
upgradeRate
:
'89'
,
productCode
:
''
},
lastMonthTotalData
:
{
curMonthTotalData
:
[
{
totalCustomer
:
''
,
total
:
''
,
notUpgradeCount
:
'199'
,
bizTotal
:
'258228'
,
custUnitPrice
:
'559'
,
upgradeCount
:
'2000'
,
activityTotal
:
''
,
orderTotal
:
''
,
activityTotal
:
'
1
'
,
orderTotal
:
'
22
'
,
upgradeRate
:
'5'
,
productCode
:
''
}
productCode
:
''
,
productName
:
'AR导航'
}]
}]
}]
},
...
...
@@ -147,6 +191,14 @@ Component({
* 组件的方法列表
*/
methods
:
{
search
()
{
console
.
log
(
this
.
data
.
searchForm
,
'searchForm---'
)
let
{
sceneType
}
=
this
.
data
.
searchForm
let
{
allMerchantList
,
otherMerchantList
}
=
this
.
data
this
.
setData
({
merchantList
:
!
sceneType
?
allMerchantList
:
otherMerchantList
})
},
getMerchant
(
isReset
=
false
)
{
let
{
userInfo
}
=
wx
.
$storage
.
get
()
let
params
=
{
...
...
pages/tab/outputValue/components/merchant/merchant.json
View file @
20be577
...
...
@@ -3,6 +3,6 @@
"usingComponents"
:
{
"service-total"
:
"../merchantCom/serviceTotal/serviceTotal"
,
"merchant-all"
:
"../merchantCom/merchantAll/merchantAll"
,
"me
mbranes"
:
"../merchantCom/Membranes/Membranes
"
"me
rchant-scene"
:
"../merchantCom/MerchantScene/MerchantScene
"
}
}
\ No newline at end of file
pages/tab/outputValue/components/merchant/merchant.wxml
View file @
20be577
...
...
@@ -2,12 +2,12 @@
<view class="merchantCon">
<scroll-view class="merchant" id="scroller" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindrefresherrefresh="handleSearch" lower-threshold='50' scroll-top="{{busiScrollTop}}">
<!-- 全部 - 服务商总产值 -->
<
!-- <service-total serviceName="{{serviceName}}" totalObj="{{totalObj}}"></service-total> --
>
<
service-total wx:if="{{!searchForm.sceneType}}" serviceName="{{serviceName}}" totalObj="{{totalObj}}"></service-total
>
<view wx:for="{{merchantList}}" wx:key="index" class="merchant-content">
<!-- 全部 -->
<
!-- <merchant-all curInfo="{{item}}"></merchant-all> --
>
<!--
太阳膜 - scene1
-->
<me
mbranes curInfo="{{item}}"></membranes
>
<
merchant-all wx:if="{{!searchForm.sceneType}}" curInfo="{{item}}"></merchant-all
>
<!--
指定场景:太阳膜,售后众筹,会员权益/升级
-->
<me
rchant-scene wx:else searchForm="{{searchForm}}" curInfo="{{item}}"></merchant-scene
>
</view>
<view wx:if="{{!merchantList.length}}" class="end-txt">
<nothing-tips tips="暂无数据~" bgColor="{{'#FFFFFF'}}" bg="{{bgUrl}}" />
...
...
pages/tab/outputValue/components/merchantCom/Me
mbranes/Membranes
.js
→
pages/tab/outputValue/components/merchantCom/Me
rchantScene/MerchantScene
.js
View file @
20be577
// pages/tab/outputValue/components/merchantCom/Me
mbranes/Membranes
.js
// pages/tab/outputValue/components/merchantCom/Me
rchantScene/MerchantScene
.js
import
constant
from
'../constant'
Component
({
/**
...
...
@@ -9,6 +9,24 @@ Component({
type
:
Object
,
value
:
()
=>
{
},
observer
(
n
)
{
}
},
searchForm
:
{
type
:
Object
,
value
:
()
=>
{
return
{
// 服务商商户号
partnerMerchantId
:
''
,
// 4S店商户号
merchantId
:
''
,
// 年月(yyyy-MM)
yearMonth
:
''
,
// 场景(1精品升级,3众筹,0会员权益)
sceneType
:
'1'
}
},
observer
:
function
(
n
)
{
n
&
this
.
dealData
()
}
}
},
...
...
@@ -16,8 +34,10 @@ Component({
* 组件的初始数据
*/
data
:
{
sceneToInfo
:
constant
.
sceneToInfo
,
sceneTopList
:
constant
.
membranesTopList
,
sceneFormList
:
constant
.
membranesFormList
,
sceneObj
:
{},
compareList
:
[],
switchChecked
:
false
},
...
...
@@ -26,11 +46,14 @@ Component({
* 组件的方法列表
*/
methods
:
{
// switchChange() {
// this.setData({
// switchChecked: !this.data.switchChecked
// })
// },
dealData
()
{
let
{
searchForm
,
sceneToInfo
}
=
this
.
data
let
sceneObj
=
sceneToInfo
.
find
(
item
=>
item
.
type
==
(
searchForm
.
sceneType
||
1
))
this
.
setData
({
sceneObj
:
sceneObj
,
sceneTopList
:
constant
[(
sceneObj
.
name
||
'membranes'
)
+
'TopList'
],
sceneFormList
:
constant
[(
sceneObj
.
name
||
'membranes'
)
+
'FormList'
]
})
}
}
})
pages/tab/outputValue/components/merchantCom/Me
mbranes/Membranes
.json
→
pages/tab/outputValue/components/merchantCom/Me
rchantScene/MerchantScene
.json
View file @
20be577
File moved
pages/tab/outputValue/components/merchantCom/Me
mbranes/Membranes
.scss
→
pages/tab/outputValue/components/merchantCom/Me
rchantScene/MerchantScene
.scss
View file @
20be577
/* pages/tab/outputValue/components/merchantCom/Me
mbranes/Membranes
.wxss */
.me
mbranes
{
/* pages/tab/outputValue/components/merchantCom/Me
rchantScene/MerchantScene
.wxss */
.me
rchant-scene
{
background-color
:
#ffffff
;
margin-top
:
24rpx
;
box-shadow
:
0
2rpx
20rpx
0
#b4bacc
52
;
...
...
@@ -48,6 +48,10 @@
font-size
:
40rpx
;
}
.m-b-12
{
margin-bottom
:
12rpx
;
}
.top
{
position
:
relative
;
padding
:
32rpx
24rpx
;
...
...
@@ -84,6 +88,14 @@
padding
:
0
36rpx
;
}
.business-total
{
position
:
absolute
;
top
:
0
;
right
:
0
;
top
:
66rpx
;
right
:
24rpx
;
}
.top-num-box
{
display
:
flex
;
justify-content
:
space-between
;
...
...
@@ -162,7 +174,7 @@
}
.list-content
{
padding
:
10rpx
24
rpx
36rpx
;
padding
:
10rpx
10
rpx
36rpx
;
.com-box
{
display
:
flex
;
...
...
@@ -187,19 +199,38 @@
}
.cur-block
{
width
:
calc
(
100%
/
5
)
;
width
:
20%
;
text-align
:
center
;
}
.label
{
font-size
:
28rpx
;
color
:
#323436
;
margin-bottom
:
16rpx
;
}
.label
{
font-size
:
28rpx
;
color
:
#323436
;
margin-bottom
:
16rpx
;
}
.cur-block.member
{
width
:
25%
;
}
// .compare-block {
// width: 33.33%;
// }
}
.list-content.crowdfund
{
display
:
flex
;
flex-wrap
:
wrap
;
.crowdfund-item
{
width
:
50%
;
margin-bottom
:
48rpx
;
}
.crowdfund-item
:nth-last-child
(
1
),
.crowdfund-item
:nth-last-child
(
2
)
{
margin-bottom
:
0
;
}
}
}
}
\ No newline at end of file
pages/tab/outputValue/components/merchantCom/Me
mbranes/Membranes
.wxml
→
pages/tab/outputValue/components/merchantCom/Me
rchantScene/MerchantScene
.wxml
View file @
20be577
<!--pages/tab/outputValue/components/merchantCom/Me
mbranes/Membranes
.wxml-->
<!--pages/tab/outputValue/components/merchantCom/Me
rchantScene/MerchantScene
.wxml-->
<wxs src="/pages/tab/outputValue/index.wxs" module="filter" />
<view class="me
mbranes
">
<view class="me
rchant-scene
">
<view class="top">
<view class="scene-label">太阳膜</view>
<view class="scene-label">{{sceneObj.label}}</view>
<view wx:if="{{sceneObj.name == 'membranes'}}" class="business-total label">业务产值
<text class="num-red">¥{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData.bizTotal || 0)}}</text>
</view>
<view>
<text class="num-month">8</text><text class="month">月</text><text class="year">2023年</text>
</view>
...
...
@@ -12,13 +15,16 @@
<view class="total-txt">本月业绩产生至{{curInfo.merchantDataList.length}}家门店</view>
</view>
<view>
<view wx:if="{{sceneObj.name != 'membranes'}}" class="label m-b-12">业务产值
<text class="num-red">¥{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData.bizTotal || 0)}}</text>
</view>
<view wx:for="{{sceneTopList}}" wx:key="index" class="top-right-box">
<view class="label">{{item.label}}</view>
<view class="num-grey">
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>
{{filter.money_three_for_two_thousands(curInfo.curMonthTotalData[item.name] || 0)}}
<text wx:if="{{item.suffix}}">{{item.suffix}}</text>
</view>
<text wx:if="{{item.suffix}}">{{item.suffix}}</text>
</view>
</view>
</view>
...
...
@@ -33,19 +39,26 @@
</view>
<view class="num-blue">¥{{filter.money_three_for_two_thousands(item.bizTotal || 0)}}</view>
</view>
<!-- 内容 -->
<view class="list-content">
<!-- 内容 - 售后众筹 -->
<view wx:if="{{sceneObj.name == 'crowdfund'}}" class="list-content crowdfund">
<view wx:for="{{item.curMonthTotalData}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="crowdfund-item">
<view class="label">{{subItem.productName}}</view>
<view class="num">{{subItem.activityTotal || 0}}场/{{subItem.orderTotal || 0}}单/¥{{filter.money_three_for_two_thousands(subItem.bizTotal || 0)}}</view>
</view>
</view>
<!-- 内容 - 太阳膜、会员权益/升级 -->
<view wx:else class="list-content">
<view class="com-box">
<view class="line"></view>
<view class="com-month">当日</view>
<view class="line"></view>
</view>
<view class="flex
-between
">
<view wx:for="{{sceneFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="cur-block">
<view class="flex">
<view wx:for="{{sceneFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="cur-block
{{sceneObj.name}}
">
<view class="label">{{subItem.label}}</view>
<view class="num">
<text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text>
{{filter.money_three_for_two_thousands(item.cur
Month
TotalData[subItem.name] || 0)}}
{{filter.money_three_for_two_thousands(item.cur
Day
TotalData[subItem.name] || 0)}}
<text wx:if="{{subItem.suffix}}">{{subItem.suffix}}</text>
</view>
</view>
...
...
@@ -56,11 +69,11 @@
<view class="com-month">本月</view>
<view class="line"></view>
</view>
<view class="flex
-between
">
<view wx:for="{{sceneFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="cur-block">
<view class="flex">
<view wx:for="{{sceneFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="cur-block
{{sceneObj.name}}
">
<view class="num">
<text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text>
{{filter.money_three_for_two_thousands(item.curMonthTotalData[subItem.name] || 0)}}
{{filter.money_three_for_two_thousands(item.curMonthTotalData[
0][
subItem.name] || 0)}}
<text wx:if="{{subItem.suffix}}">{{subItem.suffix}}</text>
</view>
</view>
...
...
pages/tab/outputValue/components/merchantCom/constant.js
View file @
20be577
...
...
@@ -9,9 +9,25 @@ const sceneFormList = [{
name
:
'scene0Total'
}]
const
sceneToInfo
=
[{
type
:
1
,
label
:
'太阳膜'
,
name
:
'membranes'
},
{
type
:
0
,
label
:
'会员权益/升级'
,
name
:
'member'
},
{
type
:
3
,
label
:
'售后众筹'
,
name
:
'crowdfund'
}]
// 太阳膜
const
membranesTopList
=
[{
label
:
'订单量'
,
name
:
'orderTotal'
name
:
'orderTotal'
,
suffix
:
'单'
},
{
label
:
'转化率'
,
name
:
'upgradeRate'
,
...
...
@@ -42,8 +58,54 @@ const membranesFormList = [{
suffix
:
'%'
}]
// 会员权益/升级
const
memberTopList
=
[{
label
:
'权益客单价'
,
name
:
'custUnitPrice'
,
prefix
:
'¥'
},
{
label
:
'成交客户量'
,
name
:
'totalCustomer'
,
suffix
:
'单'
}]
const
memberFormList
=
[{
label
:
'营业额'
,
name
:
'bizTotal'
,
prefix
:
'¥'
},
{
label
:
'成交客户量'
,
name
:
'totalCustomer'
},
{
label
:
'权益客单价'
,
name
:
'custUnitPrice'
,
prefix
:
'¥'
},
{
label
:
'转化率'
,
name
:
'upgradeRate'
,
suffix
:
'%'
}]
// 售后众筹
const
crowdfundTopList
=
[{
label
:
'活动场次'
,
name
:
'activityTotal'
,
suffix
:
'场'
},
{
label
:
'订单量'
,
name
:
'orderTotal'
,
suffix
:
'单'
}]
const
crowdfundFormList
=
[]
export
default
{
sceneFormList
,
sceneToInfo
,
membranesTopList
,
membranesFormList
membranesFormList
,
memberTopList
,
memberFormList
,
crowdfundTopList
,
crowdfundFormList
}
\ No newline at end of file
pages/tab/outputValue/outputValue.wxml
View file @
20be577
...
...
@@ -16,7 +16,7 @@
<view class="layout" style="padding-top:calc({{tabBarStyle}}px + 88rpx);">
<!-- 我的门店 -->
<view class="comCom" hidden="{{tabIndx != 0}}">
<merchant id="merchant" />
<merchant id="merchant"
searchForm="{{screenFormData}}"
/>
</view>
<!-- 我的员工 -->
<view class="comCom" hidden="{{tabIndx != 1}}">
...
...
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