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 e3f24408
authored
Oct 19, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
合并代码
1 parent
4871f402
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
650 additions
and
405 deletions
api/mineApi/mine.js
api/usersApi/UsersApi.js
components/SceneBox/SceneBox.wxss
login/index/index.js
pages/mineDetail/customerManagement/customerManagement.js
pages/mineDetail/customerManagement/customerManagement.scss
pages/mineDetail/customerManagement/customerManagement.wxml
pages/mineDetail/messageBox/messageBox.js
pages/mineDetail/messageBox/messageBox.wxml
pages/tab/output/components/merchant/mrechant.js
pages/tab/output/components/merchant/mrechant.json
pages/tab/output/components/merchant/mrechant.scss
pages/tab/output/components/merchant/mrechant.wxml
pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.js
pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.scss
pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.wxml
pages/tab/output/components/nothingTipsCon/nothingTipsCon.js
pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.json → pages/tab/output/components/nothingTipsCon/nothingTipsCon.json
pages/tab/output/components/nothingTipsCon/nothingTipsCon.scss
pages/tab/output/components/nothingTipsCon/nothingTipsCon.wxml
pages/tab/output/output.js
pages/tab/output/output.scss
pages/tab/output/output.wxml
utils/format.js
api/mineApi/mine.js
View file @
e3f2440
...
...
@@ -15,5 +15,26 @@ class mineApi {
// true
)
}
/** 保存客户信息 */
saveMerchantCustomInfo
(
data
)
{
return
api
.
post
(
{
method
:
'scrm.api.boutiquecoupon.merchantCustomInfo.save'
,
...
data
}
// true
)
}
/** 消息盒子列表 */
messageBoxPage
(
data
)
{
return
api
.
post
(
{
method
:
'scrm.api.busassistant.messageBox.page'
,
...
data
}
// true
)
}
}
export
default
mineApi
api/usersApi/UsersApi.js
View file @
e3f2440
...
...
@@ -140,5 +140,13 @@ class UsersApi {
...
data
})
}
/** 退出登录 */
logout
(
data
)
{
return
api
.
post
({
method
:
'scrm.api.sso.wechat.applets.logout'
,
...
CODE
,
...
data
})
}
}
export
default
UsersApi
components/SceneBox/SceneBox.wxss
View file @
e3f2440
...
...
@@ -12,6 +12,7 @@
box-sizing: border-box;
position: relative;
width: 25%;
/* flex: 1; */
background: #F7F8FC;
margin-right: 4rpx;
font-size: 18rpx;
...
...
login/index/index.js
View file @
e3f2440
import
WxValidate
from
'
../../utils/W
xValidate'
import
WxValidate
from
'
~/utils/w
xValidate'
Page
({
/**
* 页面的初始数据
...
...
@@ -75,19 +75,16 @@ Page({
})
},
checkLoginBtn
(
disabled
=
false
)
{
const
{
loginType
}
=
this
.
data
,
{
data
:
{
formData
},
loginToken
}
=
this
.
selectComponent
(
'#box'
)
const
{
loginType
}
=
this
.
data
,
{
data
:
{
formData
},
loginToken
}
=
this
.
selectComponent
(
'#box'
)
if
(
loginType
==
0
)
{
disabled
=
loginToken
}
else
disabled
=
loginType
==
1
?
formData
.
phone
&&
this
.
validate
.
methods
.
tel
(
formData
.
phone
)
&&
(
formData
.
code
&&
formData
.
code
.
length
==
4
)
:
formData
.
account
&&
formData
.
password
}
else
disabled
=
loginType
==
1
?
formData
.
phone
&&
this
.
validate
.
methods
.
tel
(
formData
.
phone
)
&&
formData
.
code
&&
formData
.
code
.
length
==
4
:
formData
.
account
&&
formData
.
password
this
.
setData
({
disabled
:
!
disabled
})
}
})
\ No newline at end of file
})
pages/mineDetail/customerManagement/customerManagement.js
View file @
e3f2440
...
...
@@ -127,7 +127,10 @@ Component({
],
listObj
},
attached
()
{
// this.initTime()
this
.
getMerchantCustomInfoList
()
},
/**
* 组件的方法列表
*/
...
...
@@ -162,18 +165,42 @@ Component({
.
merchantCustomInfo
(
params
)
.
then
(
result
=>
{
console
.
log
(
result
)
let
{
pages
,
list
,
total
}
=
result
this
.
setData
({
customerList
:
pageNum
==
1
?
list
:
[...
customerList
,
...
list
],
triggered
:
false
,
pages
})
})
.
catch
(
err
=>
{})
.
finally
(()
=>
{
wx
.
$api
.
hideLoading
()
})
},
submit
(
data
)
{
mineApi
.
saveMerchantCustomInfo
(
data
)
.
then
(
result
=>
{
console
.
log
(
result
)
this
.
setData
({
pageNum
:
1
})
this
.
getMerchantCustomInfoList
()
})
.
catch
(
err
=>
{})
},
changeStatus
(
e
)
{
//
console.log(e)
console
.
log
(
e
)
let
{
customerList
}
=
this
.
data
let
{
index
,
i
sEdit
}
=
e
.
currentTarget
.
dataset
let
{
index
,
i
tem
}
=
e
.
currentTarget
.
dataset
// let
let
status
=
customerList
[
index
].
isEdit
if
(
isEdit
)
{
// console.log(isEdit)
if
(
item
.
isEdit
)
{
// 提交客户信息更新
this
.
checkout
(
customerList
[
index
])
// this.checkout(customerList[index])
// console.log('customerList[index]', customerList[index])
this
.
submit
(
customerList
[
index
])
}
else
{
customerList
[
index
][
'isEdit'
]
=
true
this
.
setData
({
...
...
pages/mineDetail/customerManagement/customerManagement.scss
View file @
e3f2440
...
...
@@ -14,9 +14,7 @@ page {
}
.placeholder-class
{
color
:
#C3C3C3
;
}
.customerBox
{
box-sizing
:
border-box
;
...
...
@@ -55,6 +53,6 @@ page {
}
.placeholder-class
{
color
:
#
666
;
font-size
:
20rpx
;
color
:
#
C3C3C3
;
//
font-size: 20rpx;
}
\ No newline at end of file
pages/mineDetail/customerManagement/customerManagement.wxml
View file @
e3f2440
...
...
@@ -13,11 +13,11 @@
refresher-triggered="{{triggered}}">
<view class="customerBox" wx:for="{{customerList}}" wx:key="index">
<view class="titleCon">
<view class="name">
嘀加鹏辉奥迪4S店
</view>
<view class="name">
{{item.actualMerchantName}}
</view>
<view
class="statusBtn"
data-index="{{index}}"
data-i
sEdit="{{item.isEdit
}}"
data-i
tem="{{item
}}"
bind:tap="changeStatus">
{{item.isEdit?'完成':'编辑'}}
</view>
...
...
pages/mineDetail/messageBox/messageBox.js
View file @
e3f2440
// pages/mineDetail/messageBox/messageBox.js
import
mineApi
from
'~/api/mineApi/index'
Component
({
/**
* 组件的属性列表
...
...
@@ -13,9 +14,29 @@ Component({
loginType
:
0
,
agree
:
true
,
tabIndx
:
0
,
tabList
:
[
'战报'
,
'通知'
]
tabList
:
[
'战报'
,
'通知'
],
type
:
{
warReport
:
{
pageNum
:
1
,
pageSize
:
10
,
type
:
0
},
message
:
{
pageNum
:
1
,
pageSize
:
10
,
type
:
1
}
},
serviceMerchantId
:
''
},
attached
()
{
// this.initTime()
let
{
userInfo
}
=
wx
.
$storage
.
get
()
this
.
setData
({
serviceMerchantId
:
userInfo
.
subLoginUser
.
merchantId
})
this
.
getMessageList
(
'warReport'
)
},
/**
* 组件的方法列表
*/
...
...
@@ -27,6 +48,12 @@ Component({
tabBarStyle
:
height
/
2
+
statusBarHeight
})
},
refreshList
(
e
)
{
console
.
log
(
e
)
},
scrollonReachBottom
(
e
)
{
console
.
log
(
e
)
},
changeTabIndx
(
e
)
{
// console.log(e)
// let { tabIndx } = this.data
...
...
@@ -35,6 +62,23 @@ Component({
this
.
setData
({
tabIndx
:
detail
})
},
getMessageList
(
typeName
)
{
let
{
serviceMerchantId
,
type
}
=
this
.
data
let
params
=
{
serviceMerchantId
,
...
type
[
typeName
]
}
wx
.
$api
.
showLoading
(
'加载中...'
)
mineApi
.
messageBoxPage
(
params
)
.
then
(
result
=>
{
console
.
log
(
result
)
})
.
catch
(
err
=>
{})
.
finally
(()
=>
{
wx
.
$api
.
hideLoading
()
})
}
}
})
pages/mineDetail/messageBox/messageBox.wxml
View file @
e3f2440
...
...
@@ -20,6 +20,7 @@
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
bindscrolltolower="scrollonReachBottom"
refresher-threshold="104"
style="height:100%;"
scroll-top="{{scrollTop}}"
...
...
@@ -50,13 +51,14 @@
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
bindscrolltolower="scrollonReachBottom"
refresher-threshold="104"
style="height:100%;"
scroll-top="{{scrollTop}}"
class=" list"
data-type="message"
refresher-triggered="{{triggered}}">
<msg-box wx:for="messageList">
<msg-box wx:for="messageList"
wx:key='index'
>
<view class="cell">
<view class="label">活动名称:</view>
<view class="">xxxx</view>
...
...
pages/tab/output/components/merchant/mrechant.js
View file @
e3f2440
// pages/tab/output/components/merchant/mrechant.js
import
outPut
from
'~/api/outPut/index'
import
{
IMG_URL
}
from
'~/utils/constantData'
import
{
getNowMonth
}
from
'~/utils/format'
const
IMAGES
=
{
arrow
:
`
${
IMG_URL
}
/output/arrow.png`
,
funnel
:
`
${
IMG_URL
}
/output/funnel.png`
,
money
:
`
${
IMG_URL
}
/output/money.png`
,
paper
:
`
${
IMG_URL
}
/output/paper.png`
}
Component
({
/**
* 组件的属性列表
...
...
@@ -10,26 +18,182 @@ Component({
* 组件的初始数据
*/
data
:
{
tabIndx
:
4
,
noProduct
:
false
noProduct
:
false
,
IMAGES
,
sceneIndx
:
3
,
isAct
:
false
,
indicatorDots
:
true
,
vertical
:
false
,
autoplay
:
false
,
interval
:
2000
,
duration
:
500
,
// tabIndx: 4,
list
:
[],
nowList
:
[],
todayList
:
[],
monthList
:
[],
dataObj
:
{
todayTime
:
''
,
monthTime
:
''
},
list
:
[
{
id
:
1
,
merchantName
:
'广西弘泽汽车销售服务有限公司'
,
totalMoney
:
'14580.00'
,
sence1
:
false
,
sence2
:
true
,
sence3
:
false
,
sence4
:
true
,
newList
:
[
{
time
:
'09-28 11:19'
,
content
:
'今日升级2单,产值¥4480'
},
{
time
:
'09-28 11:19'
,
content
:
'今日升级2单,产值¥4480'
}
]
},
{
id
:
2
,
merchantName
:
'广西弘泽汽车销售服务有限公司7483493849389348938'
,
totalMoney
:
'14580.00'
,
sence1
:
false
,
sence2
:
false
,
sence3
:
false
,
sence4
:
false
,
newList
:
[]
},
{
id
:
3
,
merchantName
:
'广西弘泽汽车销售服务有限公司'
,
totalMoney
:
'14580.00'
,
sence1
:
false
,
sence2
:
true
,
sence3
:
false
,
sence4
:
true
,
newList
:
[
{
time
:
'09-28 11:19'
,
content
:
'今日升级2单,产值¥4480'
},
{
time
:
'09-28 11:19'
,
content
:
'今日升级2单,产值¥4480'
}
]
},
{
id
:
4
,
merchantName
:
'广西弘泽汽车销售服务有限公司7483493849389348938'
,
totalMoney
:
'14580.00'
,
sence1
:
false
,
sence2
:
false
,
sence3
:
false
,
sence4
:
false
,
newList
:
[]
}
],
funnelList
:
{
start
:
[
{
label
:
'到店量'
,
key
:
'toShopCount'
},
{
label
:
'核销数'
,
key
:
'couponUsedCount'
},
{
label
:
'体验数'
,
key
:
'experienceCount'
},
{
label
:
'订单成交'
,
key
:
'upgradeCount'
}
],
end
:
[
{
label
:
'转发量'
,
key
:
'shareCount'
},
{
label
:
'访客数'
,
key
:
'visitCount'
},
{
label
:
'成交数'
,
key
:
'dealCount'
},
{
label
:
'产值'
,
key
:
'totalMoney'
}
]
}
// showNothingSceneCon: false
},
attached
()
{
this
.
initTime
()
this
.
getTotalMerchantCount
()
},
/**
* 组件的方法列表
*/
methods
:
{
initTime
()
{
let
date
=
new
Date
()
let
today
=
date
.
getDate
()
let
month
=
getNowMonth
()
const
todayTime
=
{
startTime
:
`
${
month
}
-
${
today
}
`
,
endTime
:
`
${
month
}
-
${
today
}
`
}
const
monthTime
=
{
startTime
:
`
${
month
}
-01`
,
endTime
:
`
${
month
}
-
${
today
}
`
}
this
.
setData
({
dataObj
:
{
todayTime
,
monthTime
}
})
},
swiperChange
(
e
)
{
console
.
log
(
e
)
},
getTotalMerchantCount
()
{
let
{
userInfo
}
=
wx
.
$storage
.
get
()
let
{
merchantId
}
=
userInfo
.
subLoginUser
console
.
log
(
'merchantId'
,
merchantId
)
// 默认返回2前两条的具体数据 剩下需要自己手动查询
outPut
.
partnerMerchantTotal
(
merchantId
)
.
partnerMerchantTotal
(
{
merchantId
}
)
.
then
(
result
=>
{
console
.
log
(
result
)
let
{
dataList
,
yqMerchantIds
}
=
result
const
list
=
yqMerchantIds
.
reduce
((
list
,
item
,
index
)
=>
{
let
obj
=
{}
obj
.
totalMoney
=
dataList
[
index
]?.
totalMoney
||
0
obj
.
totalOrder
=
dataList
[
index
]?.
totalOrder
||
0
obj
.
merchantId
=
item
obj
.
startInd
=
1
// dataList[index]?.sceneList.findIndex(item => {
// return item != null
// }) || 1
obj
.
showNothingSceneCon
=
item
.
startInd
==
-
1
obj
.
showList
=
dataList
[
index
]?.
sceneList
||
[]
list
.
push
(
obj
)
return
list
},
[])
console
.
log
(
'list'
,
list
)
this
.
setData
({
list
,
yqMerchantIds
})
})
.
catch
(
err
=>
{})
},
handleSceneChange
(
e
)
{
console
.
log
(
e
)
let
{
list
}
=
this
.
data
let
{
index
}
=
e
.
currentTarget
.
dataset
let
{
sceneIdx
}
=
e
.
detail
list
[
index
].
startInd
=
sceneIdx
-
1
this
.
setData
({
list
})
},
swiperChange
(
e
)
{
console
.
log
(
e
)
let
{
yqMerchantIds
}
=
this
.
data
let
{
current
}
=
e
.
detail
if
(
condition
)
{
}
this
.
triggerEvent
(
'swiperChange'
,
current
)
}
}
})
pages/tab/output/components/merchant/mrechant.json
View file @
e3f2440
{
"component"
:
true
,
"usingComponents"
:
{
"merchantDataStatistics"
:
"../merchantDataStatistics/merchantDataStatistics"
"scene-box"
:
"../../../../../components/SceneBox/SceneBox"
,
"nothingTipsCon"
:
"../nothingTipsCon/nothingTipsCon"
}
}
pages/tab/output/components/merchant/mrechant.scss
View file @
e3f2440
...
...
@@ -36,4 +36,192 @@
// flex-direction: column;
}
}
}
/* pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.wxss */
.merchantDataStatistics-con
{
margin-top
:
16rpx
;
border-radius
:
8rpx
;
background
:
#FFFFFF
;
.contitle
{
box-sizing
:
border-box
;
height
:
75rpx
;
// border-bottom: 1;
padding
:
16rpx
24rpx
;
border-bottom
:
2rpx
dashed
#CCCED1
;
display
:
flex
;
justify-content
:
space-between
;
.name
{
font-family
:
PingFangSC-Medium
;
font-weight
:
500
;
font-size
:
32rpx
;
color
:
#323436
;
}
.select
{
display
:
flex
;
align-items
:
center
;
font-family
:
PingFangSC-Regular
;
font-size
:
24rpx
;
color
:
#323436
;
.arrow
{
width
:
24rpx
;
height
:
24rpx
;
margin-left
:
10rpx
;
transition
:
all
.3
ease
;
}
.isAct
{
transform
:
rotate
(
180deg
);
}
}
}
.scene-box
{
box-sizing
:
border-box
;
// padding: 20rpx 10rpx;
margin
:
20rpx
10rpx
0
;
}
}
.outputValueCon
{
.title
{
box-sizing
:
border-box
;
font-weight
:
600
;
font-size
:
32rpx
;
color
:
#323436
;
border-bottom
:
2rpx
dashed
#CCCED1
;
padding
:
24rpx
;
}
.fluuelCon
{
box-sizing
:
border-box
;
// padding-top: 50rpx;
width
:
670rpx
;
height
:
550rpx
;
position
:
relative
;
display
:
flex
;
flex-direction
:
column
;
}
.bg-image
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
// width: 670rpx;
// height: 550rpx;
// z-index: -0;
// object-fit: cover;
}
.funneItem
{
display
:
flex
;
align-items
:
center
;
z-index
:
999
;
width
:
100%
;
height
:
400rpx
;
}
.diagnosisCon
{
box-sizing
:
border-box
;
width
:
100%
;
padding
:
20rpx
;
border
:
2rpx
dashed
#CCCED1
;
display
:
flex
;
.tipsIcon
{
box-sizing
:
border-box
;
width
:
56rpx
;
height
:
64rpx
;
padding
:
8rpx
;
background
:
rgba
(
62
,
113
,
254
,
0
.12
);
border-radius
:
4rpx
;
font-family
:
PingFangSC-Medium
;
font-weight
:
500
;
font-size
:
20rpx
;
color
:
#3E71FE
;
}
.tips
{
width
:
560rpx
;
margin-left
:
16rpx
;
font-size
:
20rpx
;
color
:
#5A6066
;
line-height
:
32rpx
;
}
}
}
.swiper-item
{
padding
:
32rpx
20rpx
24rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.merchantCount
{
box-sizing
:
border-box
;
display
:
flex
;
margin
:
32rpx
0
;
.turnover
,
.customerUnitPrice
{
box-sizing
:
border-box
;
position
:
relative
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
start
;
justify-content
:
center
;
width
:
328rpx
;
height
:
128rpx
;
padding-left
:
110rpx
;
background-image
:
linear-gradient
(
90deg
,
#FFFFFF
3%
,
#F7F8FC
100%
);
text-align-last
:
left
;
.img
{
position
:
absolute
;
top
:
24rpx
;
left
:
36rpx
;
width
:
60rpx
;
height
:
60rpx
;
}
.num
{
font-family
:
MiSans-S0rpxibold
;
font-weight
:
600
;
font-size
:
32rpx
;
color
:
#323436
;
margin-bottom
:
14rpx
;
}
.label
{
font-weight
:
400
;
font-size
:
24rpx
;
color
:
#323436
;
}
}
.customerUnitPrice
{
margin-left
:
6rpx
;
}
}
}
.full
{
height
:
1350rpx
!
important
;
}
.short
{
height
:
1050rpx
!
important
;
}
.funneItem
:nth-of-type
(
1
)
{
margin-top
:
25rpx
;
}
\ No newline at end of file
pages/tab/output/components/merchant/mrechant.wxml
View file @
e3f2440
<!-- pages/tab/output/components/merchant/mrechant.wxml -->
<!-- <text>pages/tab/output/components/merchant/mrechant.wxml</text> -->
<!-- hidden="{{true}}" -->
<view class="con">
<view class="statistics">
<view class="totalOutputValue box">
...
...
@@ -13,15 +14,86 @@
</view>
<!-- -->
<!-- 无门店 -->
<merchantDataStatistics/>
</view>
<view wx:if="{{noProduct}}">
<!-- <img src="" alt=""> -->
<view>
暂未开通,去
<text>了解产品</text>
开通门店
</view>
<!-- <view >查看订单明细</view> -->
<!-- <merchantDataStatistics bind:swiperChange="swiperChange" /> -->
<!-- sceneIndx==3? 'short': -->
<swiper
indicator-dots="{{indicatorDots}}"
class="full"
autoplay="{{autoplay}}"
bindchange="swiperChange"
interval="{{interval}}"
duration="{{duration}}">
<block wx:for="{{list}}" wx:key="*this">
<swiper-item>
<view class="merchantDataStatistics-con">
<view class="contitle">
<view class="name">广西宏泽汽车有限公司</view>
<view class="select">
<view>全部</view>
<image
class="arrow {{isAct?'isAct':''}}"
webp
src="{{IMAGES.arrow}}"
alt="" />
</view>
</view>
<!-- <scene-select/> -->
<view class="scene-box">
<!-- {{item.startInd + 1}} -->
<scene-box
formData="{{item}}"
data-index="{{index}}"
bind:handleSceneChange="handleSceneChange"
sceneActive="{{(item.startInd + 1)}}" />
</view>
<view class="outputValueCon" wx:if="{{!showNothingSceneCon}}">
<view class="title">产值图</view>
<view class="swiperCon">
<view class="swiper-item ">
<view class="fluuelCon">
<image class="bg-image" src="{{IMAGES.funnel}}" />
<block
wx:for="{{item.startInd!=3? funnelList['start']: funnelList['end']}}"
wx:key="*this"
wx:for-index="ind"
wx:for-item="funneItem">
<view class="funneItem">
<view class="label">{{funneItem['label']}}</view>
<view class="num">{{item['showList' ][funneItem['key']] }}</view>
</view>
</block>
</view>
<!-- <block wx:for="{{items}}"></block> hidden="{{item.startInd ==3}}" -->
<view hidden="{{item.startInd ==3}}">
<!-- 统计 -->
<view class="merchantCount">
<view class="turnover">
<image class="img " webp src="{{IMAGES.money}}" />
<view class="num">200</view>
<view class="label">营业额/¥</view>
</view>
<view class="customerUnitPrice">
<image class="img " webp src="{{IMAGES.paper}}" />
<view class="num">2000</view>
<view class="label">客单价/¥</view>
</view>
</view>
<!-- 指标诊断 -->
<view class="diagnosisCon">
<view class="tipsIcon">指标诊断</view>
<view class="tips">
日均升级客单价低于1000/低于上2个月平均日升级客单价的10%,建议梳理驻店销售的技能,以及加强与流量方的互动。
</view>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{showNothingSceneCon}}" />
</view>
</swiper-item>
</block>
</swiper>
</view>
<nothingTipsCon wx:if="{{noProduct}}" />
pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.js
deleted
100644 → 0
View file @
4871f40
// pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.js
import
{
IMG_URL
}
from
'~/utils/constantData'
// import { } from "module";
// ;('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/')
const
IMAGES
=
{
arrow
:
`
${
IMG_URL
}
/output/arrow.png`
,
funnel
:
`
${
IMG_URL
}
/output/funnel.png`
,
money
:
`
${
IMG_URL
}
/output/money.png`
,
paper
:
`
${
IMG_URL
}
/output/paper.png`
}
Component
({
// behaviors: [imgUrlMixin],
/**
* 组件的属性列表
*/
properties
:
{},
/**
* 组件的初始数据
*/
data
:
{
IMAGES
,
sceneIndx
:
3
,
isAct
:
true
,
indicatorDots
:
true
,
vertical
:
false
,
autoplay
:
false
,
interval
:
2000
,
duration
:
500
,
list
:
[
{
id
:
1
,
merchantName
:
'广西弘泽汽车销售服务有限公司'
,
totalMoney
:
'14580.00'
,
sence1
:
false
,
sence2
:
true
,
sence3
:
false
,
sence4
:
true
,
newList
:
[
{
time
:
'09-28 11:19'
,
content
:
'今日升级2单,产值¥4480'
},
{
time
:
'09-28 11:19'
,
content
:
'今日升级2单,产值¥4480'
}
]
},
{
id
:
2
,
merchantName
:
'广西弘泽汽车销售服务有限公司7483493849389348938'
,
totalMoney
:
'14580.00'
,
sence1
:
false
,
sence2
:
false
,
sence3
:
false
,
sence4
:
false
,
newList
:
[]
},
{
id
:
3
,
merchantName
:
'广西弘泽汽车销售服务有限公司'
,
totalMoney
:
'14580.00'
,
sence1
:
false
,
sence2
:
true
,
sence3
:
false
,
sence4
:
true
,
newList
:
[
{
time
:
'09-28 11:19'
,
content
:
'今日升级2单,产值¥4480'
},
{
time
:
'09-28 11:19'
,
content
:
'今日升级2单,产值¥4480'
}
]
},
{
id
:
4
,
merchantName
:
'广西弘泽汽车销售服务有限公司7483493849389348938'
,
totalMoney
:
'14580.00'
,
sence1
:
false
,
sence2
:
false
,
sence3
:
false
,
sence4
:
false
,
newList
:
[]
}
],
funnelList
:
{
3
:
[
{
label
:
'到店量'
,
key
:
'toShopCount'
},
{
label
:
'核销数'
,
key
:
'couponUsedCount'
},
{
label
:
'体验数'
,
key
:
'experienceCount'
},
{
label
:
'订单成交'
,
key
:
'upgradeCount'
}
],
other
:
[
{
label
:
'转发量'
,
key
:
'shareCount'
},
{
label
:
'访客数'
,
key
:
'visitCount'
},
{
label
:
'成交数'
,
key
:
'dealCount'
},
{
label
:
'产值'
,
key
:
'totalMoney'
}
]
}
},
/**
* 组件的方法列表
*/
methods
:
{
handleSenceChange
(
e
)
{
console
.
log
(
e
)
}
}
})
pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.scss
deleted
100644 → 0
View file @
4871f40
/* pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.wxss */
.merchantDataStatistics-con
{
margin-top
:
16rpx
;
border-radius
:
8rpx
;
background
:
#FFFFFF
;
.contitle
{
box-sizing
:
border-box
;
height
:
75rpx
;
// border-bottom: 1;
padding
:
16rpx
24rpx
;
border-bottom
:
2rpx
dashed
#CCCED1
;
display
:
flex
;
justify-content
:
space-between
;
.name
{
font-family
:
PingFangSC-Medium
;
font-weight
:
500
;
font-size
:
32rpx
;
color
:
#323436
;
}
.select
{
display
:
flex
;
align-items
:
center
;
font-family
:
PingFangSC-Regular
;
font-size
:
24rpx
;
color
:
#323436
;
.arrow
{
width
:
24rpx
;
height
:
24rpx
;
margin-left
:
10rpx
;
transition
:
all
.3
ease
;
}
.isAct
{
transform
:
rotate
(
180deg
);
}
}
}
}
.outputValueCon
{
.title
{
box-sizing
:
border-box
;
font-weight
:
600
;
font-size
:
32rpx
;
color
:
#323436
;
border-bottom
:
2rpx
dashed
#CCCED1
;
padding
:
12rpx
;
}
.fluuelCon
{
width
:
670rpx
;
height
:
550rpx
;
position
:
relative
;
}
.bg-image
{
width
:
100%
;
height
:
100%
;
position
:
absolute
;
// width: 670rpx;
// height: 550rpx;
// z-index: -1;
// object-fit: cover;
}
.diagnosisCon
{
box-sizing
:
border-box
;
width
:
100%
;
padding
:
20rpx
;
border
:
2rpx
dashed
#CCCED1
;
display
:
flex
;
.tipsIcon
{
box-sizing
:
border-box
;
width
:
56rpx
;
height
:
64rpx
;
padding
:
8rpx
;
background
:
rgba
(
62
,
113
,
254
,
0
.12
);
border-radius
:
4rpx
;
font-family
:
PingFangSC-Medium
;
font-weight
:
500
;
font-size
:
20rpx
;
color
:
#3E71FE
;
}
.tips
{
width
:
560rpx
;
margin-left
:
16rpx
;
font-size
:
20rpx
;
color
:
#5A6066
;
line-height
:
32rpx
;
}
}
}
.swiper-item
{
padding
:
32rpx
20rpx
24rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
.merchantCount
{
box-sizing
:
border-box
;
display
:
flex
;
margin
:
32rpx
0
;
.turnover
,
.customerUnitPrice
{
box-sizing
:
border-box
;
position
:
relative
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
start
;
justify-content
:
center
;
width
:
328rpx
;
height
:
128rpx
;
padding-left
:
110rpx
;
background-image
:
linear-gradient
(
90deg
,
#FFFFFF
3%
,
#F7F8FC
100%
);
text-align-last
:
left
;
.img
{
position
:
absolute
;
top
:
24rpx
;
left
:
36rpx
;
width
:
60rpx
;
height
:
60rpx
;
}
.num
{
font-family
:
MiSans-S0rpxibold
;
font-weight
:
600
;
font-size
:
32rpx
;
color
:
#323436
;
margin-bottom
:
14rpx
;
}
.label
{
font-weight
:
400
;
font-size
:
24rpx
;
color
:
#323436
;
}
}
.customerUnitPrice
{
margin-left
:
6rpx
;
}
}
}
.full
{
height
:
1350rpx
!
important
;
}
.short
{
height
:
1050rpx
!
important
;
}
\ No newline at end of file
pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.wxml
deleted
100644 → 0
View file @
4871f40
<!-- pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.wxml -->
<swiper
indicator-dots="{{indicatorDots}}"
class="{{sceneIndx==3? 'short':'full'}}"
autoplay="{{autoplay}}"
interval="{{interval}}"
duration="{{duration}}">
<block wx:for="{{list}}" wx:key="*this">
<swiper-item>
<view class="merchantDataStatistics-con">
<view class="contitle">
<view class="name">广西宏泽汽车有限公司</view>
<view class="select">
<view>全部</view>
<image
class="arrow {{isAct?'isAct':''}}"
webp
src="{{IMAGES.arrow}}"
alt="" />
</view>
</view>
<!-- <scene-select/> -->
<scene-box formData="{{item}}" bind:handleSenceChange="handleSenceChange" senceActive="{{(sceneIndx+1)}}" />
<view class="outputValueCon">
<view class="title">产值图</view>
<view class="swiperCon">
<view class="swiper-item ">
<view class="fluuelCon">
<image class="bg-image" src="{{IMAGES.funnel}}" />
</view>
<!-- <block wx:for="{{items}}"></block> -->
<view hidden="{{sceneIndx==3}}">
<!-- 统计 -->
<view class="merchantCount">
<view class="turnover">
<image class="img " webp src="{{IMAGES.money}}" />
<view class="num">200</view>
<view class="label">营业额/¥</view>
</view>
<view class="customerUnitPrice">
<image class="img " webp src="{{IMAGES.paper}}" />
<view class="num">2000</view>
<view class="label">客单价/¥</view>
</view>
</view>
<!-- 指标诊断 -->
<view class="diagnosisCon">
<view class="tipsIcon">指标诊断</view>
<view class="tips">
日均升级客单价低于1000/低于上2个月平均日升级客单价的10%,建议梳理驻店销售的技能,以及加强与流量方的互动。
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</swiper-item>
</block>
</swiper>
pages/tab/output/components/nothingTipsCon/nothingTipsCon.js
0 → 100644
View file @
e3f2440
// pages/tab/output/components/nothingTipsCon/nothingTipsCon.js
import
{
IMG_URL
}
from
'~/utils/constantData'
Component
({
/**
* 组件的属性列表
*/
properties
:
{},
/**
* 组件的初始数据
*/
data
:
{
nothingBg
:
`
${
IMG_URL
}
/output/empty.png`
},
/**
* 组件的方法列表
*/
methods
:
{}
})
pages/tab/output/components/
merchantDataStatistics/merchantDataStatistics
.json
→
pages/tab/output/components/
nothingTipsCon/nothingTipsCon
.json
View file @
e3f2440
{
"component"
:
true
,
"usingComponents"
:
{
"scene-box"
:
"../../../../../components/SceneBox/SceneBox"
}
}
"usingComponents"
:
{}
}
\ No newline at end of file
pages/tab/output/components/nothingTipsCon/nothingTipsCon.scss
0 → 100644
View file @
e3f2440
/* pages/tab/output/components/nothingTipsCon/nothingTipsCon.wxss */
.nothingCon
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
background-color
:
#fff
;
}
.img
{
width
:
512rpx
;
height
:
512rpx
;
object-fit
:
cover
;
}
\ No newline at end of file
pages/tab/output/components/nothingTipsCon/nothingTipsCon.wxml
0 → 100644
View file @
e3f2440
<!-- pages/tab/output/components/nothingTipsCon/nothingTipsCon.wxml -->
<!-- <text>pages/tab/output/components/nothingTipsCon/nothingTipsCon.wxml</text> -->
<view class="nothingCon">
<image
class="img"
webp
src="{{nothingBg}}"
alt="" />
暂未开通,去
<text>了解产品</text>
开通门店
</view>
pages/tab/output/output.js
View file @
e3f2440
...
...
@@ -28,10 +28,12 @@ Page({
},
// 切换园区
tapPicker
()
{
this
.
setData
({
moveArrow
:
!
this
.
data
.
moveArrow
,
popupShow
:
!
this
.
data
.
popupShow
})
let
{
isSuper
}
=
this
.
data
isSuper
&&
this
.
setData
({
moveArrow
:
!
this
.
data
.
moveArrow
,
popupShow
:
!
this
.
data
.
popupShow
})
},
navbarReady
(
e
)
{
let
{
height
,
statusBarHeight
}
=
e
.
detail
...
...
@@ -45,20 +47,21 @@ Page({
tabIndx
:
e
.
detail
})
},
init
()
{
let
{
userInfo
}
=
wx
.
$storage
.
get
()
this
.
setData
({
userInfo
,
isSuper
:
userInfo
.
subLoginUser
.
isSuper
})
this
.
getMerchantRange
()
},
getMerchantRange
(
e
)
{
// 重新刷新
// let { detail } = e
let
{
userInfo
}
=
wx
.
$storage
.
get
()
// 有问题 先取反调试
// userInfo = userInfo.isSuper ? userInfo : userInfo.loginUserInfoList[0]
// console.log(userInfo.subLoginUser.merchantId)
console
.
log
(
userInfo
)
// userInfo.isSuper &&
let
{
isSuper
,
userInfo
}
=
this
.
data
// 判断是超管才需要切换账号
if
(
userInfo
.
isSuper
)
{
if
(
isSuper
)
{
USERAPI
.
adminSelectLogin
()
.
then
(
result
=>
{
console
.
log
(
result
)
...
...
@@ -81,6 +84,7 @@ Page({
.
catch
(
err
=>
{})
}
else
{
let
merchantRange
=
[{
merchantId
:
userInfo
.
subLoginUser
.
merchantId
,
merchantName
:
userInfo
.
subLoginUser
.
merchantName
}]
console
.
log
(
'merchantRange'
,
merchantRange
)
this
.
setData
({
merchantRange
,
subIndex
:
0
...
...
@@ -91,15 +95,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
// setSessionId('xxx')
// console.log(getSessionId())
// 判断是不是管理员
// subLoginUser
// if (userInfo.duty == '管理员') {
this
.
getMerchantRange
()
// }
// console.log(userInfo)
this
.
init
()
},
/**
...
...
pages/tab/output/output.scss
View file @
e3f2440
...
...
@@ -10,11 +10,15 @@
}
.layout
{
box-sizing
:
border-box
;
position
:
relative
;
// padding: 400rpx 16rpx 0;
padding-top
:
400rpx
;
font-size
:
24rpx
;
color
:
#8A8C90
;
display
:
flex
;
flex-direction
:
column
;
height
:
100vh
;
&
:
:
after
{
content
:
''
;
...
...
@@ -33,6 +37,11 @@
}
.comCom
{
flex
:
1
;
// background-color: #fff;
}
}
.navigation-title
{
...
...
pages/tab/output/output.wxml
View file @
e3f2440
...
...
@@ -29,11 +29,11 @@
<client id="client" />
</view>
<!-- 我的门店 -->
<view hidden="{{tabIndx != 1}}">
<view
class="comCom"
hidden="{{tabIndx != 1}}">
<merchant id="merchant" />
</view>
<!-- 我的员工 -->
<view hidden="{{tabIndx != 2}}">
<view
class="comCom"
hidden="{{tabIndx != 2}}">
<staff id="staff" />
</view>
</view>
...
...
utils/format.js
View file @
e3f2440
...
...
@@ -124,6 +124,15 @@ export function getScopeTime(inputTime, curTime) {
return
obj
.
text
}
export
function
getNowMonth
()
{
var
date
=
new
Date
()
var
year
=
date
.
getFullYear
()
var
month
=
date
.
getMonth
()
+
1
month
=
month
>
9
?
month
:
'0'
+
month
var
nowMonth
=
year
+
'-'
+
month
return
nowMonth
}
/**num:要转换的数值,fixed:精确几位小数 */
export
function
decimal
(
num
,
fixed
=
2
)
{
const
pow
=
Math
.
pow
(
10
,
fixed
)
...
...
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