Commit 36b81c9b by 杨明

UI改版

1 parent 6b7c51f6
Showing 90 changed files with 4798 additions and 27 deletions
import api from "~/utils/request/request";
const path = "scrm.api.stoassistant";
class ActivityApi {
// 获取活动列表数据
// getActivityList(data) {
// return api.post({
// // method: `scrm.api.assistant.activity.page`,
// method: `scrm.api.assistant.activity.staff.page`,
// ...data,
// },
// false
// );
// }
// 获取活动中任务内容
getActiveTaskList(data, params) {
return api.post({
method: `stoassistant.api.mission.findStaffMissionList`,
...data,
},
false,
);
}
// 获取单个任务详情内容
getActiveTaskDetail(data) {
return api.post({
method: "stoassistant.api.mission.getMissionById",
...data,
});
}
// 获取被分享者打开分享内容数据
getTaskShareDetail(data) {
return api.post({
method: "stoassistant.api.mission.getMissionByIdAndNoSession",
...data,
});
}
// 获取申请活动已开通场景
getOpenSceneList(data) {
return api.post({
method: "scrm.api.busassistant.activity.SceneOpenStatus.stoAss",
...data,
}, true);
}
// 获取申请活动可开通的产品
getNotOpenProductsList(data) {
return api.post({
method: "scrm.api.busassistant.activity.productOpenStatus.stoAss",
...data,
});
}
// 获取我的订单数据
getActivityOrderList(data) {
return api.post({
method: `${path}.user.activity.order.list`,
...data,
});
}
// 获取活动诊断待预约安装订单数据
getActivityEndInstallOrderList(data, params) {
return api.post({
method: `${path}.user.activity.to.be.installed.list`,
...data,
},
false
);
}
// 获取我的访客数据
getActivityVisitorList(data) {
return api.post({
method: `${path}.user.activity.visitor.list`,
...data,
});
}
// 救援码扫码信息分页查询
rescuePage(data) {
return api.post({
method: `entmicro.api.drac.rescue.card.scan.record.page`,
projectName: "entmicro",
...data,
});
}
// 获取当前活动的海报
getActivityPosters(data) {
return api.post({
method: `scrm.api.assistant.crowdFunding.poster`,
...data,
});
}
// 获取活动短链接
getActivityUrl(data) {
return api.post({
method: `scrm.api.assistant.activity.poster`,
...data,
});
}
// 任务分享埋点
taskShareReport(data) {
return api.post({
method: "entmicro.api.customercollect.reportCustomerList",
...data,
});
}
/** 线索埋点数据上报
* operationType 操作类型(0:分享 1:浏览 2:申请活动)
*/
reportData(data = {}, operationType = 0) {
return api.post({
method: "scrm.api.busassistant.clue.report",
...data,
operationType,
operationDate: new Date().format("yyyy-MM-dd hh:mm:ss"),
});
}
// 确认安装
comfirmInstall(data) {
return api.post({
method: `scrm.api.stoassistant.user.activity.confirm.install`,
...data,
});
}
// 获取膨胀金活动
getPengZApi(data) {
return api.post({
method: `scrm.api.assistant.bulge.staff.page`,
...data,
});
}
// 获取订阅配置
getSubscribeConfigApi(data) {
return api.post({
method: `entmicro.api.system.subscribe.findActivityIdList`,
...data
})
}
// 获取定保/救援车活动列表
getSubscribeListByIdsApi(data) {
return api.post({
method: `scrm.api.assistant.activity.bulge.staff.page.byIds`,
...data
})
}
// 查询福利官
getWelfareInfo(data) {
return api.post({
method: `entmicro.api.system.subscribe.findMerchantWelfareInfo`,
...data
})
}
// 查询订阅服务
checkSubcribe(data) {
return api.post({
method: `entmicro.api.system.subscribe.getOpenedMerchant`,
...data
})
}
// 私域客户看板
praviteBoradData(data) {
return api.post({
method: `scrm.api.stoassistant.wechat.cloud.welfare.statics`,
...data
})
}
// 私域客户群里列表
praviteGroups(data) {
return api.post({
method: `scrm.api.stoassistant.wechat.cloud.welfare.group`,
...data
})
}
// 私域访客列表
praviteVistitor(data) {
return api.post({
method: `scrm.api.stoassistant.wechat.cloud.welfare.customerVisit`,
...data
})
}
/**
* 活动中-订单列表-上传支付凭证
*/
uploadPaymentVoucher(data) {
return api.post({
method: 'scrm.api.stoassistant.user.activity.uploadPaymentVoucher',
...data
}, true)
}
/**
* 根据活动id查询任务详情 */
getFindMissionByActiviyId(activityId) {
const {
merchantId
} = wx.$storage.get('userInfo')
return api.post({
method: 'stoassistant.api.mission.findMissionByActiviyId',
bussinessType: 3,
merchantNo: merchantId,
activityId
})
}
/** 根据订阅类型查询膨胀金活动列表(包含当前员工统计数据*/
getActivityPageBySubscribe(data) {
return api.post({
method: `scrm.api.assistant.activity.bulge.staff.page.bySubscribe`,
...data
})
}
/**获取跟进分页列表 */
getFollowData(data) {
return api.post({
method: `stoassistant.api.follow.page`,
...data
})
}
/**完成跟进 */
finishFollow(data) {
return api.post({
method: `stoassistant.api.follow.finish`,
...data
})
}
/**创建广汇续保权益登记订单 */
sendEquity(data) {
return api.post({
method: `scrm.api.stoassistant.gh.expanded.gold.activity.order.create`,
...data
})
}
/**看产值-车损权益升级-产值总览 */
merchantsOutput(data) {
return api.post({
method: `scrm.api.boutiquecoupon.store.assistant.merchants.total.output.value.statistics`,
...data
})
}
/**看产值-车损权益升级-产值总览当日 */
merchantsOutputToday(data) {
return api.post({
method: `scrm.api.boutiquecoupon.store.assistant.merchants.total.output.value.statistics.today`,
...data
})
}
/**看产值-车损权益升级-产值报表 */
merchantsOutputReport(data) {
return api.post({
method: `scrm.api.boutiquecoupon.store.assistant.merchants.total.output.value.report.forms`,
...data
})
}
/**看产值-车损权益升级-柱状图 */
merchantsHistogram(data) {
return api.post({
method: `scrm.api.boutiquecoupon.store.assistant.merchants.total.output.value.histogram.chart`,
...data
})
}
/**看产值-车损权益升级-趋势图 */
merchantsTrend(data) {
return api.post({
method: `scrm.api.boutiquecoupon.store.assistant.merchants.total.output.value.trend.chart`,
...data
})
}
/**看产值-车损权益升级-员工排行分页列表 */
merchantsStaffOutput(data) {
return api.post({
method: `scrm.api.boutiquecoupon.store.assistant.merchants.total.staff.output.value.statistics.page`,
...data
})
}
/**查询4s店商户产值总览、当日新增产值 --精品升级 */
boutiquecouponOutputValue(data) {
return api.post({
method: `scrm.api.boutiquecoupon.outputValue.overview.forStoreManager`,
...data
})
}
/**查询4s店商户查询员工产值排行信息--精品升级 */
boutiquecouponQueryEmployeeRankList(data) {
return api.post({
method: `scrm.api.boutiquecoupon.outputValue.queryEmployeeRankList.forStoreManager`,
...data
})
}
/**查询4s店商户查询发券量营业额统计数据--精品升级 */
boutiquecouponQueryCouponCountAndOrderMoney(data) {
return api.post({
method: `scrm.api.boutiquecoupon.outputValue.queryCouponCountAndOrderMoney.forStoreManager`,
...data
})
}
/**查询4s店商户查询营业额到店量统计数据--精品升级 */
boutiquecouponQueryOrderMoneyTotalAndToShopCount(data) {
return api.post({
method: `scrm.api.boutiquecoupon.outputValue.queryOrderMoneyTotalAndToShopCount.forStoreManager`,
...data
})
}
/**查询4s店商户日报表--精品升级 */
boutiquecouponQueryByDayReport(data) {
return api.post({
method: `scrm.api.boutiquecoupon.outputValue.queryByDayReport.forStoreManager`,
...data
})
}
/**查询4s店商户月报表--精品升级 */
boutiquecouponQueryByMonthReport(data) {
return api.post({
method: `scrm.api.boutiquecoupon.outputValue.queryByMonthReport.forStoreManager`,
...data
})
}
activityStaffRank(data) {
return api.post({
method: `scrm.api.assistant.activity.staff.rank`,
...data
})
}
/*门店助手-店总版售后众筹活动相关统计*/
getActivityList(data) {
return api.post({
method: `scrm.api.assistant.activity.statics`,
...data
})
}
}
export default ActivityApi;
\ No newline at end of file \ No newline at end of file
import ActivityApi from './ActivityApi.js'
export default new ActivityApi()
\ No newline at end of file \ No newline at end of file
...@@ -68,7 +68,12 @@ ...@@ -68,7 +68,12 @@
"pages/openBusiness", "pages/openBusiness",
"pages/summary", "pages/summary",
"pages/newSummary/newSummary", "pages/newSummary/newSummary",
"pages/businessAnalysis/businessAnalysis" "pages/businessAnalysis/businessAnalysis",
"pages/shareWebview/shareWebview",
"pages/warReport/warReport",
"pages/visitor/visitor",
"pages/monthReport/monthReport",
"pages/crowdDetail/crowdDetail"
] ]
}, },
{ {
......
const handlerMiss = (data, query, callBack) => {
if (!data) return
if (!query) return
let { pageNum, orginList, serviceType, listName } = query
data.data && data.data.forEach((val, index) => {
val.tabType = serviceType
val.isCollapse = true
val.startTime = val.startTime.split(' ')[0]
val.endTime = val.endTime.split(' ')[0]
})
const RESULT = {
[listName]: pageNum == 1 ? data.data : [...orginList, ...data.data],
activeTrigger: false,
total: data.count,
noResult: pageNum == 1 ? (data.data.length ? false : true) : false
}
callBack && callBack(RESULT)
}
module.exports = {
handlerMiss
}
\ No newline at end of file \ No newline at end of file
// packageOutput/pages/boutique/components/OutputBar/OutputBar.js
Component({
/**
* 组件的属性列表
*/
properties: {
opts: {
type: Object,
value: {}
},
chartData:{
type: Object,
value: {}
}
},
/**
* 组件的初始数据
*/
data: {
dataType: 3,
},
/**
* 组件的方法列表
*/
methods: {
selectCondition(e) {
let {
condition,
type
} = e.currentTarget.dataset
this.setData({
[condition]: type
})
this.triggerEvent('selectEvent')
},
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"bar-echart": "../bar/bar"
}
}
\ No newline at end of file \ No newline at end of file
.bar-wrap {
padding: 34rpx 30rpx 30rpx 40rpx;
box-sizing: border-box;
.searchList {
display: flex;
align-items: center;
position: relative;
z-index: 9999;
margin-bottom: 20rpx;
.search-text {
font-weight: 400;
font-size: 28rpx;
color: #A6A6A6;
line-height: 48rpx;
}
.search-text+.search-text {
margin-left: 40rpx;
}
.search-unit {
margin-left: auto;
font-size: 24rpx;
color: #8A8C90;
}
.active {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
}
}
.container {
height: 400rpx;
}
}
\ No newline at end of file \ No newline at end of file
<view class="bar-wrap">
<view class="searchList">
<block wx:for="{{opts.barList}}" wx:for-item="item" wx:key="index">
<view class="search-text {{dataType==item.type?'active':''}}" data-condition="dataType" data-type="{{item.type}}" bindtap="selectCondition">{{item.title}}</view>
</block>
<view class="search-unit">单位:{{(dataType == 3&&opts.barList.length == 3) || (opts.barList.length == 2&&dataType==1) ?'元':'张'}}</view>
</view>
<view class="container">
<bar-echart class="f2-chart" keys="{{opts.keys}}" chartData="{{chartData}}" color="{{opts.color}}" tickCount="{{opts.tickCount}}" />
</view>
</view>
\ No newline at end of file \ No newline at end of file
// packageOutput/pages/boutique/components/OutputLine/OutputLine.js
Component({
/**
* 组件的属性列表
*/
properties: {
opts: {
type: Object,
value: {}
},
chartData:{
type: Object,
value: {}
}
},
/**
* 组件的初始数据
*/
data: {
dataType: 1,
isShow: false,
startTime: '',
endTime: '',
dimension: [{
text: '周',
type: 1
}, {
text: '月',
type: 2
}, {
text: '年',
type: 3
}, ],
timePeriod: 1
},
/**
* 组件的方法列表
*/
methods: {
selectCondition(e) {
let {
condition,
type
} = e.currentTarget.dataset
this.setData({
[condition]: type,
startTime: '',
endTime:''
})
if(condition == 'dataType') this.setData({timePeriod:1})
this.triggerEvent('selectEvent')
},
selectTime() {
this.triggerEvent('selectTime')
},
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"line-echart": "../line/line"
}
}
\ No newline at end of file \ No newline at end of file
.bar-wrap {
padding: 34rpx 30rpx 30rpx 40rpx;
box-sizing: border-box;
.searchList {
display: flex;
align-items: center;
.search-text {
font-weight: 400;
font-size: 28rpx;
color: #A6A6A6;
line-height: 48rpx;
}
.search-text+.search-text {
margin-left: 40rpx;
}
.search-unit {
margin-left: auto;
font-size: 24rpx;
color: #8A8C90;
}
.active {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
}
}
.searchTime {
margin-top: 24rpx;
display: flex;
align-items: center;
z-index: 9999;
margin-bottom: 20rpx;
position: relative;
.time {
padding: 6rpx 30rpx;
// border: 2rpx solid #EBEBEB;
// border-radius: 32rpx;
background: #FFFFFF;
border: 1rpx solid #C3C3C3;
border-radius: 6rpx;
font-weight: 400;
font-size: 20rpx;
color: #5A6066;
// color: #A6A6A6;
}
.active {
// background: #4466f01a;
border-color: #fff;
// color: #4466F0;
color: #fff;
background: #3582EE;
border: 1prx solid #3582EE;
}
.time+.time {
margin-left: 8rpx;
}
.flex {
display: flex;
align-items: center;
position: absolute;
right: 30rpx;
.time-icon {
width: 26rpx;
height: 26rpx;
}
.temporal {
font-size: 22rpx;
color: #A6A6A6;
margin: 0 8rpx;
}
.arrows {
width: 20rpx;
height: 12rpx;
}
}
}
.remind {
color: #D3D3D3;
font-size: 20rpx;
text-align: center;
padding: 24rpx;
}
.container {
height: 370rpx;
}
}
\ No newline at end of file \ No newline at end of file
<view class="bar-wrap">
<view class="searchList">
<block wx:for="{{opts.lineList}}" wx:for-item="item" wx:key="index">
<view class="search-text {{dataType==item.type?'active':''}}" data-condition="dataType" data-type="{{item.type}}" bindtap="selectCondition">{{item.title}}</view></block>
<view class="search-unit">单位:{{(opts.lineList.length == 2 && dataType==1)||opts.lineList.length == 3 && dataType==3?'元':'单'}}</view>
</view>
<view class="searchTime">
<block wx:for="{{dimension}}" wx:for-item="item" wx:key="index">
<view class="time {{timePeriod==item.type?'active':''}}" data-condition="timePeriod" data-type="{{item.type}}" bindtap="selectCondition">{{item.text}}</view>
</block>
<view class="flex" bindtap="selectTime">
<glsx-image class="time-icon" src="output/output-time.png"></glsx-image>
<view class="temporal" >{{startTime?startTime+'-'+endTime:'自定义'}}</view>
<glsx-image class="arrows" src="output/arrow.png"></glsx-image>
</view>
</view>
<view class="container">
<line-echart class="f2-chart" period="{{timePeriod}}" chartData="{{chartData}}" color="{{opts.lineColr}}" tickCount="{{opts.tickCount}}" keys="{{opts.keys}}"/>
</view>
<view class="remind">请左右滑动查阅更多信息</view>
</view>
\ No newline at end of file \ No newline at end of file
import ActivityApi from '~/api/activityApi/index'
import { handlerMiss } from '../../common/common'
let thisPage;
Component({
/**
* 组件的属性列表
*/
properties: {
isHaveSubcribe: Boolean,
ids: Array,
entranceType: {
type: Number,
observer: function (val) {
if (val > -1 && this.control) {
this.initLocal(val)
}
}
},
fresh: {
type: Boolean,
observer: function (val) {
if (val) {
this.setData({
pageNum: 1
}, () => {
this.initLocal(this.data.entranceType)
})
}
}
}
},
/**
* 组件的初始数据
*/
data: {
tabList: [
{ label: '全部', status: '' },
{ label: '进行中', status: 2 },
{ label: '待开始', status: 1 },
{ label: '已结束', status: 3 }
],
listData: [],
activeTrigger: false,
activePageNum: 1,
activeTotal: 0,
pageNum: 1,
total: 0,
pageSize: 10,
noResult: false
},
/**
* 组件的方法列表
*/
methods: {
// 初始化
initLocal(val) {
this.setData({
listData: [],
activeTrigger: false,
activePageNum: 1,
activeTotal: 0,
pageNum: 1,
total: 0,
pageSize: 10,
noResult: false
}, () => {
thisPage = wx.$router.getPageInstance()
this.getActivity(val)
})
},
// 获取数据
getActivity(type) {
wx.showLoading()
const activityItem = this.selectComponent('.activityItem')
const {status} = activityItem.data
let { pageSize, pageNum, listData, activityName } = this.data
let para = { pageNum, pageSize,merchantIds: [thisPage.data.merchantInfo.merchantId],activityName,activityStatus:status}
ActivityApi.getActivityList(para).then(res => {
if (res) {
handlerMiss(res, { serviceType: type, pageNum, listName: 'listData', orginList: listData }, (result) => {
this.setData(result)
})
}
// thisPage.setData({loading:false})
wx.hideLoading()
})
},
handleBlur(e) {
const activityName = e.detail.value;
this.setData({activityName})
this.activityTab()
},
toFresh(e) {
if (e.detail) {
this.setData({
listData: e.detail
})
}
},
activityTab() {
this.setData({
pageNum: 1
}, () => {
this.getActivity(this.data.entranceType)
})
},
// 下拉刷新
activityRefresh(e) {
this.setData({
pageNum: 1
}, () => {
this.getActivity(this.data.entranceType)
// 刷新获取订阅配置
if (!this.data.isHaveSubcribe) {
wx.$eventbus.emit("RESFRESH_SUBCRIBE", { type: this.data.entranceType, fresh: true })
}
})
},
// 上拉触底加载
scrollonReachBottom(e) {
let { pageNum, total, pageSize } = this.data
console.log(pageNum, total, pageSize)
// 判断当前页是否是末页
if (Math.floor(total / pageSize) == pageNum - 1) return
this.setData({
pageNum: pageNum + 1
}, () => {
this.getActivity(this.data.entranceType)
})
},
// 滚动中
scrollIng(e) { },
},
lifetimes: {
attached() {
if (this.control) return
this.control = true
this.initLocal(this.data.entranceType)
}
},
})
{
"component": true,
"usingComponents": {
"nothing-data":"../nothingData/nothingData",
"activity-ing":"../activitying/index",
"activity-tab":"../activityTab/activityTab"
}
}
\ No newline at end of file \ No newline at end of file
.box {
height: 100%;
z-index: 10;
}
.searchInput {
width: 100%;
background: #fff;
padding: 18rpx 0;
}
.input-box {
width: 686rpx;
height: 64rpx;
// background: #fff;
// background: #ffffff7d;
background: #F8F9FC;
// border: 2rpx solid #EEEEEE;
// border-radius: 12rpx;
border-radius: 36rpx;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding: 0rpx 24rpx 0rpx 40rpx;
input {
height: 64rpx;
line-height: 64rpx;
flex: 1;
}
}
.icon-small{
margin-right: 10rpx;
}
.main-box {
border-radius: 32rpx;
width: 100%;
background: #FFFFFF;
height: calc(100% - 64rpx);
}
.content-box {
padding: 0 16rpx 80rpx 16rpx;
}
\ No newline at end of file \ No newline at end of file
<view class="box">
<view class="searchInput">
<view class="input-box">
<icon class="icon-small" type="search" size="14"></icon>
<input value="{{activityName}}" type="text" placeholder="活动名称" bind:blur="handleBlur" />
</view>
</view>
<view class="main-box">
<activity-tab class="activityItem" bind:activityTab="activityTab" tabList="{{tabList}}"></activity-tab>
<scroll-view scroll-y class="content" class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" bindscroll="scrollIng" refresher-triggered="{{activeTrigger}}" style="{{!listData.length ? 'padding-top: 16rpx;' : ''}}{{'height: calc(100% - 120rpx);'}}">
<block wx:if="{{!noResult}}">
<view class="content-box">
<block wx:for="{{listData}}" wx:key="index">
<block>
<activity-ing bind:refreshList="toFresh" index="{{index}}" activeList="{{listData}}" item="{{item}}" activeDateIndex="{{activeDateIndex}}"></activity-ing>
</block>
</block>
</view>
</block>
<block wx:else>
<nothing-data description="请前往嘀加企微管家后台创建"></nothing-data>
</block>
</scroll-view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
import { imgUrlMixin } from '~/mixins/index'
Component({
/**
* 组件的属性列表
*/
behaviors: [imgUrlMixin],
properties: {
data: {
type: Object,
value: {},
observer(v) {
if (v) {
// 活动概览数据处理
let s = v
v.overviewData = { // 活动中
browseData: {
all: { title: '总浏览(次)', num: s.browsCount }
},
visitorData: {
all: { title: '总访客(人)', num: s.visitCount },
},
shareData: {
all: { title: '总产值(元)', num: this.priceFormat(s.realAmount || 0), unit: '¥' }
},
}
console.log(v)
this.setData({ data: v })
}
}
},
activityOverviewList: {
type: Array,
value: []
},
backStyle: {
type: Array,
value: []
},
textType: {
type: Number,
value: 0
}
},
/**
* 组件的初始数据
*/
data: {
textTypeList: ['', '当前排名:', '最终排名:']
},
/**
* 组件的方法列表
*/
methods: {
// 实时战报
jumpReport(e) {
let { item } = e.currentTarget.dataset
if (item.activityStatus == 1) return wx.$api.showToast('当前活动尚未开始')
// if(item.activityStatus == 2)
// 不区分活动是否在进行中 有返回值就跳转
item.reportUrl && wx.navigateTo({
url: `/packagesList/packageOutput/pages/shareWebview/shareWebview?url=${encodeURIComponent(item.reportUrl)}`,
});
// else
// wx.$router.go('/packagesList/packageOutput/pages/warReport/warReport', item)
},
// 跳转
jump(e) {
let { item } = e.currentTarget.dataset
wx.$router.go("/packagesList/packageOutput/pages/visitor/visitor", { ...item })
},
jumpOutput(e) {
let { item } = e.currentTarget.dataset
wx.$router.go("/packagesList/packageOutput/pages/crowdDetail/crowdDetail", { ...item })
},
// 价格格式化
priceFormat(num, point = 2) {
let numStr = (num / 100).toString()
return numStr;
},
// priceFormat(num, point = 2) {
// let numStr = (num/100).toString().split('.')[0]
// if (numStr.length < 6) { // 判断数字有多长,如果小于6,,表示10万以内的数字,让其直接显示
// return numStr;
// } else if (numStr.length >= 6 && numStr.length <= 8) { // 如果数字大于6位,小于8位,让其数字后面加单位万
// let decimal = numStr.substring(numStr.length - 4, numStr.length - 4 + point)
// console.log(decimal);
// // 由千位,百位组成的一个数字
// return parseFloat(parseInt(numStr / 10000) + '.' + decimal) + '万'
// } else if (numStr.length > 8) { // 如果数字大于8位,让其数字后面加单位亿
// let decimal = numStr.substring(numStr.length - 8, numStr.length - 8 + point);
// return parseFloat(parseInt(numStr / 100000000) + '.' + decimal) + '亿'
// }
// }
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/index/components/activityOverview/activityOverview.wxss */
.active-overview{
.wrapper{
display: grid;
position: relative;
grid-template-columns: repeat(3,33.33%);
&.overview-wrapper {
// background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
background: #f8fafb;
border-radius: 20rpx;
padding: 24rpx 0rpx 26rpx 0rpx;
margin: 24rpx 0rpx;
}
.left_line {
position: absolute;
top: 50%;
// transition: ;
transform: translateY(-50%);
left: 35%;
width: 2rpx;
height: 40rpx;
background: #eee;
}
.right_line {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 65%;
width: 2rpx;
height: 40rpx;
background: #eee;
}
}
.overview-item-box{
width: 100%;
height: 100%;
.all{
text-align: center;
.title{
color: #6E6E7A;
font-size: 24rpx;
margin-top: 10rpx;
}
.primary-title{
color: #4466F0;
display: flex;
align-items: center;
}
.number{
color: #2D2D33;
font-size: 36rpx;
font-weight: 600;
text {
font-size: 28rpx;
}
}
.sort{
font-size: 20rpx;
color: #2D2D33;
line-height: 28rpx;
.up{
color: #EB4E4E;
}
.down{
color: #2FB87A;
}
}
}
}
.btn-box{
padding: 32rpx 60rpx 0 60rpx;
display: flex;
justify-content: space-between;
}
.checkDetail{
width: 160rpx;
height: 48rpx;
// background: rgba(255,255,255,0.20);
// border: 1rpx solid #4466F0;
// border-radius: 36rpx;
font-weight: 400;
font-size: 26rpx;
color: #3582EE;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
margin: 0 auto;
}
// .center {
// border-left:2rpx solid #eeeeee;
// border-right:2rpx solid #eeeeee;
// }
.godetail{
width: 236rpx;
margin: 0;
}
.flex_sac{
display: flex;
justify-content: space-around;
}
}
\ No newline at end of file \ No newline at end of file
<!-- pages/tab/index/components/activityOverview/activityOverview.wxml -->
<view>
<wxs src="../index.wxs" module="fn"></wxs>
<!-- 活动中 -->
<view wx:if="{{textType == 1}}" class="active-overview">
<block>
<view class="wrapper overview-wrapper">
<view class="overview-item-box" wx:for="{{activityOverviewList}}" wx:for-item="i" wx:for-index="ind" wx:key="ind">
<view class="all">
<view class="number"><text>{{data.overviewData[i].all.unit}}</text>{{data.overviewData[i].all.num || 0}}</view>
<view class="title">{{data.overviewData[i].all.title}}</view>
</view>
</view>
</view>
<view class="wrapper">
<view bind:tap="jumpOutput" data-item="{{data}}" class="checkDetail">产值详情</view>
<view class="left_line"></view>
<view bind:tap="jump" data-item="{{data}}" class="checkDetail center">访客详情</view>
<view class="right_line"></view>
<view bind:tap="jumpReport" data-item="{{data}}" class="checkDetail">活动战报</view>
</view>
</block>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// packagesList/outDetail/components/activityTab/activityTab.js
Component({
/**
* 组件的属性列表
*/
properties: {
tabList: {
type: Array,
observer(val) {
console.log(val)
}
}
},
/**
* 组件的初始数据
*/
data: {
status: ''
},
/**
* 组件的方法列表
*/
methods: {
handleTab(e) {
const {status} = e.target.dataset
this.setData({status})
this.triggerEvent('activityTab')
},
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packagesList/outDetail/components/activityTab/activityTab.wxss */
.tab {
display: flex;
align-items: center;
// height: 78rpx;
// line-height: 78rpx;
justify-content: space-around;
padding-bottom: 12rpx;
.tab-item {
color: #666666;
padding: 12rpx 40rpx;
background: #F8F9FC;
border-radius: 32rpx;
&.checked {
color: #6d8cd1;
background: #e9f0fe;
}
}
}
\ No newline at end of file \ No newline at end of file
<!--packagesList/outDetail/components/activityTab/activityTab.wxml-->
<view class="tab">
<view class="tab-item {{status == item.status?'checked': ''}}" wx:key="index" data-status="{{item.status}}" wx:for="{{tabList}}" catchtap="handleTab">{{item.label}}</view>
</view>
\ No newline at end of file \ No newline at end of file
// pages/tab/index/components/activityTop/activityTop.js
import index_const from "./index_const"
Component({
/**
* 组件的属性列表
*/
properties: {
data: {
type: Object,
value: {}
},
widthStyle: {
type: String
},
tabType:Number
},
/**
* 组件的初始数据
*/
data: {
activityTypList: index_const.data.activityTypList,
activityTypeStyle: 'margin-top: 8rpx;height: 44rpx;line-height: 44rpx;',
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/index/components/activityTop/activityTop.wxss */
.active-top {
display: flex;
.active-img {
flex-shrink: 0;
position: relative;
width: 160rpx;
height: 160rpx;
margin-right: 24rpx;
.thum-icon {
width: 100%;
height: 100%;
position: absolute;
border-radius: 16rpx;
overflow: hidden;
top: 0;
left: 0;
image {
height: 100%;
}
}
.active-type {
position: absolute;
top: 0;
left: 0;
width: 72rpx;
height: 40rpx;
background-image: linear-gradient(90deg, #FFF3A2 7%, #FFDA85 95%);
border-radius: 16rpx 0 24rpx 0;
color: #673F00;
font-size: 24rpx;
text-align: center;
}
}
.active-title {
flex: 1;
display: flex;
flex-flow: column;
justify-content: space-between;
padding: 8rpx 0;
.name {
// display: flex;
// align-items: center;
.name-left {
font-weight: 600;
font-size: 28rpx;
color: #1B233D;
line-height: 48rpx;
word-break: break-all;
.activity-type {
float: right;
line-height: 44rpx;
font-size: 28rpx;
font-weight: 400;
color: #FE5662;
margin-top: 4rpx;
image {
margin-top: 4rpx;
width: 32rpx;
height: 32rpx;
}
}
}
.right {
display: flex;
flex-flow: 1;
font-size: 28rpx;
align-items: center;
image {
width: 32rpx;
height: 32rpx;
}
}
}
.time {
color: #7A8299;
font-size: 24rpx;
text {
color: #1B233D;
}
}
}
}
\ No newline at end of file \ No newline at end of file
<!--pages/tab/index/components/activityTop/activityTop.wxml-->
<view>
<view class="active-top">
<view class="active-img">
<view class="thum-icon">
<image webp src="{{!tabType?data.activityImg:data.activityBigImg}}"></image>
</view>
</view>
<view class="active-title">
<view class="name">
<!-- <view class="left" style="{{widthStyle}}">{{data.activityName}}</view> -->
<view class="name-left" style="{{activityNameStyle}}">{{data.activityName}}<view wx:if="{{data.titleIsWarp}}" class="activity-type"><slot></slot></view></view>
<view wx:if="{{!data.titleIsWarp}}" class="right" style="{{activityTypeStyle}}">
<slot></slot>
</view>
</view>
<view class="time">
<text>{{data.startTime}}</text> 至 <text>{{data.endTime}}</text>
</view>
</view>
</view>
</view>
export default {
data: {
activityTypList: ['众筹']
}
}
\ No newline at end of file \ No newline at end of file
import ActivityApi from '~/api/activityApi/index'
// import intentionApi from '~/api/intentionApi/index'
Component({
/**
* 组件的属性列表
*/
properties: {
item: {
type:Object,
observer:function(newVal,oldVal){
// if(!newVal.isCollapse){
// if(this.control)return
// this.control = true
// this.getList(newVal)
// }
}
},
activeList:Array,
index:Number,
activeDateIndex: {
type: Number
},
tabType:Number,// 0众筹 1膨胀金
},
/**
* 组件的初始数据
*/
data: {
activityOverviewList: ['browseData', 'visitorData','shareData'],
backStyle: ['background-image: linear-gradient(179deg, #FFFFFF 76%, #FFF8E6 100%);margin: 0 16rpx 16rpx 0;', 'background-image: linear-gradient(180deg, #FFFFFF 72%, #F4EDFF 100%);margin: 0 0 16rpx 0;', 'background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);margin: 0 16rpx 0 0;height: 252rpx;', 'background-image: linear-gradient(180deg, #FFFFFF 72%, #EBFEFF 100%);height: 252rpx;'],
shadow:['boxshowdown1','','boxshowdown2','boxshowdown2'],
totalNum:0
},
/**
* 组件的方法列表
*/
methods: {
// 获取意向人数
// getList(activity) {
// if (activity && [0,2,5,6].includes(this.data.tabType)) {
// return new Promise(resolve => {
// intentionApi.getNotPayUser({
// orderByType: '',
// activityId: activity.id,
// pageNum: 1,
// pageSize: 10,
// }).then(res => {
// this.setData({
// totalNum: res.total
// })
// })
// })
// }
// },
// 分享活动
copyActivityUrl(e) {
let { item } = e.currentTarget.dataset
this.jumpZC(item.id,0)
},
toPengzhangjinPage(e){
let { item } = e.currentTarget.dataset
this.jumpZC(item.id,1)
},
jumpZC(activityId,type) {
const userStorage = wx.$storage.get('userInfo')
let query = {
id: activityId,
exclusiveUuid: userStorage.uuid,
merchantId: userStorage.merchantId,
isExclusive: 1,
shareStaffUuid: userStorage.uuid,
form: 'task',
shareStaffType: 3
}
if(type==0){
wx.$router.go('/pages/crowdfunding/index/index', query)
}else{
query.notIntercept = true
wx.$router.go('/packageShopmall/packageExpandedGold/pages/activity/index/index', query)
}
},
/**点击展开收起 */
collapseClick(e) {
let { key, flag } = e.currentTarget.dataset
let { activeList,tabType } = this.data
this.setData({
activeDateIndex: 0
})
activeList.forEach((val, idx) => {
if (key == idx) {
if (flag && !val.missionList) {
val.isloading = true
let para = {
activityId: val.id
}
if(tabType){
para.bussinessScene = 2
}else{
para.bussinessScene = 3
}
ActivityApi.getActiveTaskList(para)
.then(res => {
val.isloading = false
res.forEach(a => {
a.platformMerchantMissionResponseList &&
a.platformMerchantMissionResponseList.forEach(k => {
k.detailInfo = { activityId: val.id, imgUrlList: [] }
k.platformMerchantMissionMaterialResponseList &&
k.platformMerchantMissionMaterialResponseList.forEach(i => {
// materialType 素材类型1文案 2图片 3视频 4专属链接
if (i.materialType == 1) {
// 文案
k.detailInfo.textContent = i.materialContent
}
if (i.materialType == 2 || i.materialType == 3) {
// 图片视频
k.detailInfo.imgUrlList.push({
url: i.materialContent,
type: i.materialType == 2 ? 'image' : 'video'
})
}
if (i.materialType == 4) {
// 链接
k.detailInfo.linkUrl = val.activityUrl
}
})
})
})
val.missionList = res
val.newtaskCalenderList = this.calenderFilter(JSON.parse(JSON.stringify(val.missionList)) || [], 7)
let d = new Date()
let nowDate = (d.getMonth() + 1).toString().padStart(2, '0') + '月' + d.getDate().toString().padStart(2, '0') + '日'
let ind = 0 // 下标值
val.calenderActiveIndex = 0
val.newtaskCalenderList.forEach((v, index) => {
v.forEach(k => {
k.time = (new Date(k.activityTime).getMonth() + 1).toString().padStart(2, '0') + '月' + new Date(k.activityTime).getDate().toString().padStart(2, '0') + '日'
k.ind = ind
let completeStatusNum = 0
k.platformMerchantMissionResponseList.forEach(val => {
if (val.completeStatus == 2) completeStatusNum++
})
if (d.getTime() > new Date(`${k.activityTime.replace(/-/g, '/')} 23:59:59`).getTime()) k.status = 2
if (nowDate == k.time) {
val.calenderActiveIndex = index
this.setData({ activeDateIndex: ind })
}
// status 1过去日期任务全部完成 2过去日期任务有未完成的 3当前日期或未来日期
if (completeStatusNum == v.length && d.getTime() > new Date(`${k.activityTime.replace(/-/g, '/')} 23:59:59`).getTime()) {
k.status = 1
} else if (d.getTime() > new Date(`${k.activityTime.replace(/-/g, '/')} 23:59:59`).getTime()) {
k.status = 2
} else {
k.status = 3
}
ind++
})
})
val.isCollapse = false
this.setData({
item: val
})
})
.catch(err => {
val.isloading = false
this.setData({
item: val
})
})
} else if (flag && val.missionList) {
// 已请求数据 展开默认选中当天
val.newtaskCalenderList = this.calenderFilter(JSON.parse(JSON.stringify(val.missionList)) || [], 7)
let d = new Date()
let nowDate = (d.getMonth() + 1).toString().padStart(2, '0') + '月' + d.getDate().toString().padStart(2, '0') + '日'
let ind = 0 // 下标值
val.calenderActiveIndex = 0
val.newtaskCalenderList.forEach((v, index) => {
v.forEach(k => {
k.time = (new Date(k.activityTime).getMonth() + 1).toString().padStart(2, '0') + '月' + new Date(k.activityTime).getDate().toString().padStart(2, '0') + '日'
k.ind = ind
let completeStatusNum = 0
k.platformMerchantMissionResponseList.forEach(i => {
if (i.completeStatus == 2) completeStatusNum++
})
if (d.getTime() > new Date(`${k.activityTime.replace(/-/g, '/')} 23:59:59`).getTime()) k.status = 2
if (nowDate == k.time) {
val.calenderActiveIndex = index
this.setData({ activeDateIndex: ind })
}
// status 1过去日期任务全部完成 2过去日期任务有未完成的 3当前日期或未来日期
if (completeStatusNum == v.length && d.getTime() > new Date(`${k.activityTime.replace(/-/g, '/')} 23:59:59`).getTime()) {
k.status = 1
} else if (d.getTime() > new Date(`${k.activityTime.replace(/-/g, '/')} 23:59:59`).getTime()) {
k.status = 2
} else {
k.status = 3
}
ind++
})
})
val.isCollapse = false
} else {
val.isCollapse = !flag
}
} else {
val.isCollapse = true
val.isloading = false
}
})
this.triggerEvent('refreshList',activeList)
this.setData({
activeList,
item:activeList[key]
},()=>{
// 展开获取意向人数
// this.getList(this.data.item)
})
},
// 任务日历数据处理
calenderFilter(arr, length) {
var _arr = []
while (arr.length) {
_arr.push(arr.splice(0, length))
}
return _arr
},
}
})
{
"component": true,
"usingComponents": {
"activity-top": "../activityTop/activityTop",
"activity-overview": "../activityOverview/activityOverview"
}
}
\ No newline at end of file \ No newline at end of file
.content-item {
font-size: 28rpx;
width: 100%;
box-sizing: border-box;
position: relative;
display: inline-block;
margin: 32rpx 0 8rpx 0;
overflow: hidden;
box-shadow: 0 10rpx 20rpx 0 rgba(129, 146, 214, 0.24), inset 0 -2rpx 6rpx 0 rgba(255, 255, 255, 0.40);
// box-shadow: 0 10rpx 20rpx 0 rgba(204, 133, 122, 0.16);
border-radius: 32rpx;
.item-bg {
width: 100%;
height: 100%;
position: absolute;
// box-shadow: 0 10rpx 20rpx 0 rgba(204, 133, 122, 0.16);
z-index: -1;
left: 0;
top: 0;
right: 0;
image {
object-fit: cover;
background-size: 100% 100%;
}
}
.item-box {
box-sizing: border-box;
padding: 24rpx;
width: 100%;
height: 100%;
position: relative;
z-index:99;
.hot {
color: #FE5662;
}
.end{
color: #6E6E7A;
margin-left: 8rpx;
}
.un-start-class {
width: 32rpx;
height: 32rpx;
}
.active-btn {
display: flex;
margin: 24rpx 0 32rpx 0;
justify-content: center;
position: relative;
.btn {
color: #EB4E4E;
flex: 1;
height: 64rpx;
text-align: center;
line-height: 64rpx;
border-radius: 14rpx;
background: rgba(255, 255, 255, 0.16);
border: 2rpx solid #EB4E4E;
margin-right: 16rpx;
}
.btn:last-child {
margin-right: 0;
background-image: linear-gradient(270deg, #FF3E7F 0%, #FE624B 100%);
color: #FFFFFF;
}
.primary {
color: #ffffff;
height: 68rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%) !important;
line-height: 68rpx;
border: none;
margin-right: 0;
}
.max{
flex: 0.75;
}
.tips{
font-weight: 400;
font-size: 20rpx;
color: #6E6E7A;
position: absolute;
left: 50%;
bottom: -44rpx;
transform: translate(-50%,0);
padding: 8rpx 0;
}
}
.task-box {
margin-top: 24rpx;
padding: 32rpx 24rpx;
border-radius: 24rpx;
background: #ffffff;
// transition: all 0.1s linear;
will-change: height;
}
.box-content {
display: block;
padding-bottom: 40rpx;
}
.hidden {
height: 64rpx;
padding: 0;
background: transparent;
margin-top: 0;
transition: height .3;
.box-content {
display: none;
}
}
.collapse {
text-align: center;
color: #4466F0;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
.btn {
display: flex;
flex-flow: row;
}
.gg-chevron-down {
box-sizing: border-box;
position: relative;
display: block;
transform: scale(var(--ggs, 1));
width: 24rpx;
height: 24rpx;
border: 2rpx solid transparent;
border-radius: 100rpx
}
.gg-chevron-down::after {
content: "";
display: block;
box-sizing: border-box;
position: absolute;
width: 12rpx;
height: 12rpx;
border-bottom: 2rpx solid;
border-right: 2rpx solid;
transform: rotate(45deg);
left: 8rpx;
top: 0;
}
.gg-chevron-up {
box-sizing: border-box;
position: relative;
display: block;
transform: scale(var(--ggs, 1));
width: 24rpx;
height: 24rpx;
border: 2rpx solid transparent;
border-radius: 100rpx
}
.gg-chevron-up::after {
content: "";
display: block;
box-sizing: border-box;
position: absolute;
width: 12rpx;
height: 12rpx;
border-top: 2rpx solid;
border-right: 2rpx solid;
transform: rotate(-45deg);
left: 8rpx;
bottom: 0
}
}
}
}
.content-item:first-child {
margin: 16rpx 0 8rpx 0;
}
.boxshowdown1{
box-shadow: 0 10rpx 20rpx 0 rgba(204, 133, 122, 0.16);
}
.boxshowdown2{
box-shadow: 0 10rpx 20rpx 0 rgba(116, 132, 194, 0.16), inset 0 -2rpx 6rpx 0 rgba(255, 255, 255, 0.40);
}
\ No newline at end of file \ No newline at end of file
<view class="content-item">
<view class="item-bg">
<!-- <glsx-image webp src="acvitity/activity-bg.png"></glsx-image> -->
</view>
<view class="item-box">
<!-- 活动top信息 -->
<activity-top tabType="{{tabType}}" data="{{item}}" widthStyle="flex: 0 0 62%;">
<block wx:if="{{item.activityStatus==2}}">
<glsx-image class="un-start-class" webp src="store-assistant/hot-icon.png"></glsx-image>
<text class="hot">火热进行中</text>
</block>
<block wx:if="{{item.activityStatus==1}}">
<glsx-image class="un-start-class" webp src="acvitity/un-start-icon.png"></glsx-image>
<text class="end">待开始</text>
</block>
<block wx:if="{{item.activityStatus==3}}">
<glsx-image class="un-start-class" webp src="acvitity/end-icon.png"></glsx-image>
<text class="end">已结束</text>
</block>
</activity-top>
<!-- 活动概览 -->
<activity-overview data="{{item}}" activityOverviewList="{{activityOverviewList}}" backStyle="{{backStyle}}" textType="{{1}}"></activity-overview>
</view>
</view>
\ No newline at end of file \ No newline at end of file
import * as echarts from '../ec-canvas/echarts';
Component({
/**
* 组件的属性列表
*/
properties: {
chartData: {
type: Array,
value: () => []
},
keys: {
type: Array,
value: ['year', 'sales']
},
tickCount: {
type: Number,
value: 4
},
color: {
type: String,
value: '#3975C6'
}
},
observers: {
'chartData': function (data) {
console.log(data, '----------------')
this.initData(data)
},
},
/**
* 组件的初始数据
*/
data: {
ec: {
lazyLoad: true
}
},
/**
* 组件的方法列表
*/
methods: {
onInitChart(xData, yData) {
this.ecComponent && this.ecComponent.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr,
});
this.setOption(chart, xData, yData);
return chart;
})
},
setOption(chart, xData, yData) {
var option = {
grid: {
left: 8,
right: 10,
top: 30,
bottom: 0,
containLabel: true
},
// tooltip: {
// trigger: 'axis',
// triggerOn: "mousemove",
// axisPointer: {
// type: "none",
// lineStyle: {
// type: 'solid'
// }
// },
// padding: [0, 12],
// borderWidth: 2,
// borderColor: this.data.color,
// borderRadius: 10,
// textStyle: {
// color: this.data.color,
// fontSize: 10
// },
// position: function(pt) {
// console.log(pt)
// return [pt[0], pt[1]];
// },
// formatter: function (item) {
// return `${item[0].value}`
// }
// },
xAxis: {
type: 'category',
axisLabel: {
fontSize: 11,
color: '#A6A6A6'
},
axisLine: {
show: false //坐标轴线线
},
axisTick: {
show: false //坐标轴刻度
},
data: xData
},
yAxis: {
x: 'center',
type: 'value',
axisLabel: {
fontSize: 11,
color: '#A6A6A6'
},
axisLine: {
show: false //坐标轴线线
},
axisTick: {
show: false //坐标轴刻度
},
splitLine: {
lineStyle: {
type: 'dashed'
}
}
},
series: [{
data: yData,
type: 'bar',
label: {
show: true,
position: 'top',
color: '#3582EE',
},
color: '#3582EE',
itemStyle: {
// borderRadius: [50, 50, 0, 0],
padding: [50, 50, 0, 0]
},
barWidth: 24
}]
};
chart.setOption(option)
},
//初始化数据
initData(data) {
const xData = [],
yData = [];
const [x, y] = this.data.keys
data.forEach(item => {
xData.push(item[x])
yData.push(item[y])
})
this.setData({
xData,
yData
})
this.onInitChart(xData, yData)
},
},
ready() {
// 获取组件
this.ecComponent = this.selectComponent('#mychart-dom-bar');
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"ec-canvas": "../ec-canvas/ec-canvas"
}
}
/* packageOutput/components/echart/echart.wxss */
.f2-chart {
width: 100%;
height: 500rpx;
}
\ No newline at end of file \ No newline at end of file
<ec-canvas id="mychart-dom-bar" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>
{
"component": true,
"usingComponents": {
"staff": "../staff/staff",
"output-bar": "../OutputBar/OutputBar",
"output-line": "../OutputLine/OutputLine",
"van-calendar": "@vant/weapp/calendar/index"
}
}
\ No newline at end of file \ No newline at end of file
.output-box {
padding: 20rpx 24rpx 24rpx;
// margin: 0rpx 16rpx;
margin-top: 16rpx;
background: #FFFFFF;
// border-radius: 32rpx;
// background: #F4F8FE;
.output-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
// margin: 20rpx 0rpx;
margin-bottom: 20rpx;
}
}
.totalCon {
display: flex;
margin-bottom: 20rpx;
.item {
width: 60%;
display: flex;
flex-direction: column;
justify-content: space-between;
font-weight: 700;
.unit {
font-size: 30rpx;
}
.label {
font-family: PingFangSC-SNaNrpxibold;
font-weight: 600;
font-size: 24rpx;
color: #323436;
line-height: 36rpx;
margin-bottom: 12rpx;
}
.number {
font-family: numberBold;
// font-weight: 600;
font-size: 36rpx;
color: #2D2D33;
}
}
.otherItem{
width: 32%;
}
.otherItem:last-child{
width: 36%;
}
}
.output-value {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
// display: grid;
// grid-template-columns: repeat(3, 33.33%);
// row-gap: 24rpx;
// padding: 32rpx;
// background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
// border-radius: 16rpx;
// &.today {
// background-image: linear-gradient(180deg, #FFFFFF 64%, #FFF8E6 100%);
// border-radius: 16rpx;
// }
.output-item {
box-sizing: border-box;
width: 32%;
height: 136rpx;
// text-align: center;
background-image: linear-gradient(90deg, #F3FCFC 0%, #F9FEFF 49%, #EFF7FF 100%);
border-radius: 12rpx;
padding: 24rpx 12rpx 24rpx 16rpx;
&:nth-child(n+4){
margin-top: 16rpx;
}
.output-num {
font-weight: 700;
font-size: 32rpx;
color: #2D2D33;
text-align-last: left;
._unit {
font-size: 28rpx;
}
}
.output-label {
box-sizing: border-box;
display: flex;
justify-content: space-between;
// align-items: center;
font-size: 24rpx;
color: #6E6E7A;
// line-height: 36rpx;
// margin-top: 12rpx;
.label {
margin-top: 5rpx;
}
.icon {
width: 56rpx;
height: 56rpx;
// margin-left: 6rpx;
}
}
}
}
.line-box {
width: 750rpx;
height: 604rpx;
background: #FFFFFF;
border-radius: 20rpx;
margin: 24rpx auto 0rpx;
}
.bar-box {
width: 750rpx;
height: 536rpx;
background: #FFFFFF;
border-radius: 20rpx;
margin: 24rpx auto 0rpx;
}
.staf-box {
width: 710rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx;
margin: 24rpx auto 0rpx;
height: 300rpx;
}
.table-box {
display: flex;
justify-content: center;
margin-top: 48rpx;
padding-bottom: 50rpx;
.btn-box {
width: 316rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 32rpx;
border-radius: 12rpx;
background: #FFFFFF;
// color: #1B233D;
color: #3582EE;
border: 2rpx solid #0075F9;
&.month-btn {
// background-image: linear-gradient(-81deg, #556AF5 0%, #7197FF 100%);
background: #3582EE;
margin-left: 22rpx;
color: #FFFFFF;
}
}
}
.van-calendar {
z-index: 9999;
}
\ No newline at end of file \ No newline at end of file
<wxs src="./index.wxs" module="fn" />
<scroll-view scroll-y class="content" refresher-triggered="{{triggered}}" refresher-enabled
bindrefresherrefresh="activityRefresh" style="{{'height: calc(100% - 62rpx);'}}">
<view class="output-box">
<view class="output-title">产值总览</view>
<view class="totalCon" wx:if="{{entranceType == 1}}">
<view class="item">
<view class="label">总营业额(元)</view>
<veiw class="number">
<text class="unit">¥ </text>{{fn.accMul(outputData['orderMoneyTotal'],1)||0}}
</veiw>
</view>
<view class="item">
<view class="label">转化率</view>
<veiw class="number">
{{fn.accMul(outputData['upgradeRatio'], 1)||0}}<text class="unit">%</text>
</veiw>
</view>
</view>
<view class="totalCon" wx:else>
<view class="item otherItem ">
<view class="label">总报价量(单)</view>
<veiw class="number">{{fn.accMul(outputData['totalQuotationCount'],1)||0}}
</veiw>
</view>
<view class="item otherItem">
<view class="label">总成交(单)</view>
<veiw class="number">
{{fn.accMul(outputData['totalSuccessCount'], 1)||0}}
</veiw>
</view>
<view class="item otherItem">
<view class="label">总产值(元)</view>
<veiw class="number">
<text class="unit">¥</text>{{fn.accMul(outputData['totalOutputValue'], 1)||0}}
</veiw>
</view>
</view>
<view class="output-value">
<view class="output-item" wx:key="index"
wx:for="{{outputView[entranceType == 2?'outputValue':'boutiqueOutputValue']}}">
<view class="output-label">
<view class="label">{{item.label}}</view>
<glsx-image src="{{item.iconUrl}}" class="icon" />
</view>
<view class="output-num"><text
class="_unit">{{item._unit}}</text>{{fn.accMul(outputData[item.name], (item.multiple || 1))||0}}<text
class="unit_">{{item.unit_}}</text>
</view>
</view>
</view>
</view>
<view class="output-box">
<view class="output-title">当日新增</view>
<view class="output-value today">
<view class="output-item" wx:key="index"
wx:for="{{outputView[entranceType ==2 ?'todayOutputValue':'todayOutiqueOutputValue']}}">
<view class="output-label">
<view class="label">{{item.label}}</view>
<glsx-image src="{{item.iconUrl}}" class="icon" />
</view>
<view class="output-num"><text class="_unit">{{item.unit}}</text>{{outputData[item.name]|| 0}} </view>
</view>
</view>
</view>
<view class="line-box">
<output-line id="line" opts="{{opts}}" chartData="{{lineData}}" bind:selectTime="selectTime"
bind:selectEvent="selectEvent" />
</view>
<view class="bar-box">
<output-bar opts="{{opts}}" chartData="{{chartData}}" id="bar" bind:selectEvent="selectBarEvent" />
</view>
<staff sfaffList="{{sfaffList}}" tabelTh="{{tabelTh}}" downType="{{type ==2?'equity':'boutique'}}" />
<view class="table-box">
<view class="btn-box day-btn" bindtap="jumpReport" data-time="day">查看日报表</view>
<view class="btn-box month-btn" bindtap="jumpReport" data-time="month">查看月报表</view>
</view>
</scroll-view>
<view wx:if="{{calendarLoading}}">
<van-calendar max-range="{{ 30 }}" min-date="{{ minDate }}" max-date="{{ maxDate }}" show="{{ isShow }}"
type="range" color="#4466F0" bind:confirm="onConfirm" bind:close="onClose" />
</view>
\ No newline at end of file \ No newline at end of file
var arrInclues = function (num, arr) {
var flag = false
for (var i = 0; i < arr.length; i++) {
if (num == arr[i]) {
flag = true
}
}
return flag
}
var accMul = function (arg1, arg2) {
if (isNaN(arg1)) {
arg1 = 0;
}
if (isNaN(arg2)) {
arg2 = 0;
}
var m = 0, s1 = arg1 + '',
s2 = arg2 + '';
m += (s1.split(".")[1] && s1.split(".")[1].length) || 0;
m += (s2.split(".")[1] && s2.split(".")[1].length) || 0;
var s = s1.replace(".", "") * s2.replace(".", ""),
p = Math.pow(10, m)
return s / p
};
module.exports = {
arrInclues: arrInclues,
accMul: accMul
}
\ No newline at end of file \ No newline at end of file
Component({
properties: {
data: {
type: Object,
value: {},
observer(v) {
if(!v)return
let s = v.statics
if (s) {
v.numList = [
{title: '浏览量', num: s.browseCount},
{title: '访客量', num: s.fansCount},
{title: '订单量', num: s.orderCount}
]
v.sortList = [
{title: '访客率', sort: s.fansRate},
{title: '转化率', sort: s.conversionRate}
]
}
this.setData({data: v})
}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/index/components/invertAnalyse/invertAnalyse.wxss */
.title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
}
.funnel-box {
padding: 32rpx 0;
position: relative;
.funnel-bg {
position: absolute;
top: 40rpx;
left: 50%;
transform: translate(-50%);
// width: 458.18rpx;
// height: 298rpx;
width: 686rpx;
height: 408rpx;
image {
width: 686rpx;
height: 408rpx;
// width: 458.18rpx;
// height: 298rpx;
}
}
.funnel-content {
display: flex;
justify-content: center;
height: 408rpx;
width: 100%;
padding-top: 40rpx;
.left,
.right {
display: flex;
}
.left {
flex: 0 0 406rpx;
flex-flow: column;
justify-content: space-around;
align-items: flex-end;
// align-items: center;
z-index: 1;
font-size: 22rpx;
color: #2D2D33;
box-sizing: border-box;
padding-right: 20rpx;
view {
display: flex;
align-items: center;
margin-right: 28rpx;
text {
font-size: 28rpx;
font-weight: bold;
margin-left: 4rpx;
}
}
}
.right {
flex: 1;
flex-flow: column;
align-items: flex-start;
margin-left: 130rpx;
color: #4466F0;
padding-top: 20rpx;
font-size: 24rpx;
position: relative;
.sort-box:last-child {
position: absolute;
left: -46rpx;
top: 50%;
}
.sort {
font-size: 40rpx;
font-weight: bold;
margin-top: 4rpx;
}
}
}
}
\ No newline at end of file \ No newline at end of file
<view class="funnel-box">
<view class="funnel-bg">
<glsx-image webp src="activity/activity_funnel.webp"></glsx-image>
</view>
<view class="funnel-content">
<view class="left">
<view wx:for="{{data.numList}}" wx:key="index">{{item.title}}<text>{{item.num}}</text></view>
</view>
<view class="right">
<view class="sort-box" wx:for="{{data.sortList}}" wx:key="index">
<view>{{item.title}}</view>
<view class="sort">{{item.sort}}%</view>
</view>
</view>
</view>
</view>
import * as echarts from '../ec-canvas/echarts';
Component({
/**
* 组件的属性列表
*/
properties: {
chartData: {
type: Array,
value: () => []
},
keys: {
type: Array,
value: ['year', 'sales']
},
tickCount: {
type: Number,
value: 5
},
color: {
type: String,
value: '#3975C6'
}
},
observers: {
'chartData': function (data) {
this.initData(data)
},
},
/**
* 组件的初始数据
*/
data: {
ec: {
lazyLoad: true
}
},
/**
* 组件的方法列表
*/
methods: {
onInitChart(xData, yData) {
this.ecComponent && this.ecComponent.init((canvas, width, height, dpr) => {
const chart = echarts.init(canvas, null, {
width: width,
height: height,
devicePixelRatio: dpr // new
});
this.setOption(chart, xData, yData);
return chart;
})
},
setOption(chart, xData, yData) {
let maxSpan = xData.length < 10 ? 80 : 20
// let start= xData.length < 10 ? 50 : 80
var option = {
grid: {
left: 8,
right: 30,
top: 30,
bottom: 0,
containLabel: true
},
tooltip: {
trigger: 'axis',
triggerOn: "mousemove",
axisPointer: {
type: "shadow",
shadowStyle: {
shadowColor: 'rgba(53, 195, 118, .1)',
color: 'rgba(53, 195, 118, .1)',
},
lineStyle: {
color: '#35C376',
type: 'shadow'
}
},
position: 'top',
padding: [0, 12],
borderWidth: 2,
borderColor: '#6ED0BE',
borderRadius: 10,
textStyle: {
color: '#6ED0BE',
fontSize: 10
},
position: function (point, params, dom, rect, size) {
// 固定在顶部
return [point[0]-20, '10%'];
},
formatter: function (item) {
return `${item[0].value}`
}
},
xAxis: {
type: 'category',
boundaryGap: false,
// min:1,
// max: 5,
axisLabel: {
fontSize: 11,
color: '#A6A6A6'
},
axisLine: {
show: false //坐标轴线线
},
axisTick: {
show: false //坐标轴刻度
},
data: xData
},
yAxis: {
x: 'center',
type: 'value',
axisLabel: {
fontSize: 11,
color: '#A6A6A6'
},
axisLine: {
show: false //坐标轴线线
},
axisTick: {
show: false //坐标轴刻度
},
splitLine: {
lineStyle: {
type: 'dashed'
}
}
},
dataZoom: {
type: "inside",
maxSpan: maxSpan,
// end: 100,
// // start: start,
},
series: [{
data: yData,
type: 'line',
// smooth: true,
color: this.data.color
}]
}
chart.setOption(option)
},
//初始化数据
initData(data) {
const xData = [],
yData = [];
const [x, y] = this.data.keys
data.forEach(item => {
xData.push(item[x])
yData.push(item[y])
})
this.setData({
xData,
yData
})
this.onInitChart(xData, yData)
},
},
ready() {
// 获取组件
this.ecComponent = this.selectComponent('#mychart-dom-line');
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
"ec-canvas": "../ec-canvas/ec-canvas"
}
}
ec-canvas {
width: 100%;
height: 100%;
}
\ No newline at end of file \ No newline at end of file
<!--packageOutput/components/line/line.wxml-->
<ec-canvas id="mychart-dom-line" canvas-id="mychart-line" ec="{{ ec }}"></ec-canvas>
// pages/tab/index/components/nothingData/nothingData.js
import {imgUrlMixin} from '~/mixins/index'
Component({
/**
* 组件的属性列表
*/
behaviors: [imgUrlMixin],
properties: {
description:String
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/index/components/nothingData/nothingData.wxss */
.nothing-box{
width: calc(100% - 48rpx);
height: calc(100% - 16rpx);
margin: 0 24rpx;
background: #FFFFFF;
border-radius: 32rpx;
display: flex;
align-items: center;
flex-flow: column;
image{
margin-top: 192rpx;
width: 400rpx;
height: 400rpx;
}
.tips{
text-align: center;
font-size: 28rpx;
color: #7A8299;
line-height: 44rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!--pages/tab/index/components/nothingData/nothingData.wxml-->
<view class="nothing-box">
<glsx-image webp src="store-assistant/activity_list_nothing.webp"></glsx-image>
<view class="tips">暂无活动</view>
<view wx:if="{{description}}" class="tips desc">{{description}}</view>
</view>
// packageOutput/components/staff/staff.js
import Util from '~/utils/util'
import {
accMul
} from '~/utils/format'
Component({
/**
* 组件的属性列表
*/
properties: {
sfaffList: {
type: Object,
observer(val) {
this.getDetail(val)
this.filterStaff = val
this.setData({
selectValue: 1,
show:true
})
}
},
tabelTh: {
type: Object,
value: []
},
downType: {
type: String,
value: 'boutique'
}
},
/**
* 组件的初始数据
*/
data: {
option1: [
{ text: '全部商品', value: 0 },
{ text: '新款商品', value: 1 },
{ text: '活动商品', value: 2 },
],
option2: [
{ text: '默认排序', value: 'a' },
{ text: '好评排序', value: 'b' },
{ text: '销量排序', value: 'c' },
],
value1: 0,
value2: 'a',
dataType: {
crowType: [{
label: '产值',
value: 1
}, {
label: '转发次数',
value: 2
}, {
label: '访客总数',
value: 3
}, {
label: '浏览总数',
value: 4
}, {
label: '成交单量',
value: 5
}, {
label: '转化率',
value: 6
}],
boutique: [{
label: '产值',
value: 1
}, {
label: '单量',
value: 2
}, {
label: '客单价',
value: 3
}, {
label: '转化率',
value: 4
}],
equity: [{
label: '产值',
value: 1
}, {
label: '成交量',
value: 2
}, {
label: '报价量',
value: 3
}, {
label: '转化率',
value: 4
}]
},
empName: '',
show: true,
selectTxt: '单量',
selectValue: 1,
},
lifetimes: {
attached() {
wx.$eventbus.on('hideEmpSelect', res => {
this.hideSelect()
})
}
},
/**
* 组件的方法列表
*/
methods: {
showUp() {
this.setData({
show: false
})
},
//选择排序
selectType(e) {
const {
value,
label
} = e.target.dataset
this.setData({
selectValue: value,
show: true,
selectTxt: label
})
this.getDetail(this.filterStaff)
},
hideSelect() {
this.setData({
show: true,
})
},
hanldBlur(e) {
const empName = e.detail.value;
const sfaffList = this.data.sfaffList.filter(item => {
const employeeName = item.transferName || item.employeeName || item.shareName
return employeeName ? employeeName.includes(empName) : item
})
this.filterStaff = sfaffList
this.getDetail(sfaffList)
},
//格式化数组
formatArr(arr, fn) {
let res = {}
for (let v of arr) {
const val = Object.keys(v)
for (let i of val) {
if (res[i]) {
res[i].push(v[i])
continue
}
res[i] = [v[i]]
}
}
return fn(res)
},
// 生成对应的表格数据
getDetail(val) {
let {
tabelTh,
dataType,
selectValue,
downType
} = this.data, sortKey
for (let i in tabelTh) {
if (tabelTh[i] == dataType[downType][selectValue - 1].label) {
sortKey = i
}
}
const tableData = Util.deepClone(val).sort((a, b) => {
return (b[sortKey] || 0) - (a[sortKey] || 0)
})
const sfaffList = this.formatArr(tableData, (item) => {
const result = []
const obj_keys = Object.keys(tabelTh);
const handleParams = (k) => {
let obj = {
[k]: (item, k) => {
return item[k]
},
transferName: (item) => {
let arr = []
item.avatar && item.avatar.forEach((val, index) => {
arr.push({
avatarUrl: val,
transferName: item.transferName[index]
})
})
return arr
},
employeeName: (item) => {
let arr = []
item.avatarUrl && item.avatarUrl.forEach((val, index) => {
arr.push({
avatarUrl: val,
transferName: item.employeeName[index]
})
})
return arr
},
shareName: (item) => {
let arr = []
item.shareImageUrl && item.shareImageUrl.forEach((val, index) => {
arr.push({
avatarUrl: val,
transferName: item.shareName[index]
})
})
return arr
},
conversionRate: (item, k) => {
const arr = this.data.downType == 'equity' ? item[k] && item[k].map(item => accMul(item, 100)) : item[k]
return arr
},
totalOrderAmount:(item, k) => {
const arr = this.data.downType == 'crowType' ? item[k] && item[k].map(item => accMul(item, 0.01)) : item[k]
return arr
},
}
return obj
}
for (let k of obj_keys) {
result.push({
name: tabelTh[k],
val: k,
list: handleParams(k)[k](item, k)
})
}
return result
})
console.log(sfaffList,'sfaffList')
this.setData({
sfaff: sfaffList
})
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {
}
}
\ No newline at end of file \ No newline at end of file
.box {
margin: 20rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx;
padding: 32rpx 40rpx;
.box-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
display: flex;
justify-content: space-between;
.select-up {
font-weight: 400;
font-size: 24rpx;
color: #666666;
position: relative;
text-align: center;
.staff-type {
width: 160rpx;
text {
display: inline-block;
width: 120rpx;
text-align: right;
}
.up-icon {
width: 32rpx;
height: 32rpx;
vertical-align: middle;
}
}
.up-box {
position: absolute;
width: 128rpx;
left: 20rpx;
background: #FFFFFF;
box-shadow: 0 0 18rpx 0 #3a596a1c;
border-radius: 8rpx;
z-index: 10;
.up-item {
flex: auto;
font-weight: 400;
font-size: 22rpx;
color: #666666;
line-height: 53rpx;
&.checked {
color: #708CFF;
}
}
}
}
}
.staff-input {
// width: 638rpx;
// height: 64rpx;
// background: #ffffff7d;
// border: 2rpx solid #EEEEEE;
// border-radius: 12rpx;
// margin: 40rpx auto 20rpx;
// display: flex;
// justify-content: space-between;
// align-items: center;
// padding: 0rpx 20rpx;
box-sizing: border-box;
// width: 686rpx;
width: 100%;
height: 64rpx;
// margin-top: 28rpx;
// background: #ffffff7d;
// border-radius: 12rpx;
background: #F8F9FC;
border: 2rpx solid #EEEEEE;
border-radius: 32rpx;
margin: 28rpx auto 24rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0rpx 24rpx 0rpx 24rpx;
input {
// height: 64rpx;
// line-height: 64rpx;
// color: #999999;
// flex: 1;
flex: 1;
height: 64rpx;
line-height: 64rpx;
margin-left: 15rpx;
&::placeholder {
color: red;
}
}
}
}
.table {
display: flex;
}
.table_left_column {
min-width: 190rpx;
height: auto;
display: flex;
flex-direction: column;
}
.left_col_item {
height: 72rpx;
font-size: 20rpx;
display: flex;
align-items: center;
color: #1B233D;
// background: #F9F9F9;
background: #F5F9FE;
padding-left: 18rpx;
&:first-child {
font-weight: 600;
font-size: 24rpx;
color: #1B233D;
}
&:not(:first-child) {
// border-right: 2rpx solid #F3F3F3;
}
&:nth-child(2n) {
background: #ffffff;
}
.left_item_avatar {
flex: 1;
margin-left: 20rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: #666666;
image {
width: 36rpx;
height: 36rpx;
border-radius: 36rpx;
margin-right: 10rpx;
}
}
}
.table_right_scroll_box {
display: flex;
white-space: nowrap;
overflow-x: scroll;
}
.flex_direction_column_item {
min-width: 150rpx;
display: inline-block;
/* border: 1px solid #000; */
}
.item_name {
min-width: 120rpx;
height: 72rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 20rpx;
color: #1B233D;
// background: #F9F9F9;
background: #F5F9FE;
white-space: normal;
image {
width: 36rpx;
height: 36rpx;
border-radius: 36rpx;
margin-right: 10rpx;
}
&:first-child {
font-weight: 600;
font-size: 24rpx;
color: #1B233D;
}
&:nth-child(2n) {
background: #ffffff;
}
}
.empty {
margin: 20rpx auto 0;
text-align: center;
.empty-icon {
width: 400rpx;
height: 400rpx;
display: inline-block;
}
.empty-text {
font-weight: 400;
font-size: 28rpx;
color: #7A8299;
text-align: center;
margin: 32rpx 106rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!--packageOutput/components/staff/staff.wxml-->
<wxs src="staff.wxs" module="filter" />
<view class="box staff-box">
<view class="box-title">
<text>员工排行榜</text>
<view class="select-up">
<view catchtap="showUp" class="staff-type">
<text>{{dataType[downType][selectValue-1].label}}</text>
<glsx-image webp custom-class="up-icon" src="output/down.png"></glsx-image>
</view>
<view class="up-box" hidden="{{show}}">
<view class="up-item {{selectValue == item.value? 'checked':''}}" wx:for="{{dataType[downType]}}" wx:key="index" data-label="{{item.label}}" data-value="{{item.value}}" catchtap="selectType">
{{item.label}}
</view>
</view>
</view>
</view>
<view class="staff-input">
<icon class="icon-small" type="search" size="14"></icon>
<input placeholder="输入员工名称" placeholder-style="color:#cdcdd1" value="{{empName}}" bind:blur="hanldBlur"/>
</view>
<blokc wx:if="{{sfaff[0].list.length}}">
<view class='table'>
<!-- 左侧固定 -->
<view class='table_left_column'>
<view class='left_col_item'>排名</view>
<view class='left_col_item' wx:for="{{sfaff[0].list}}" wx:for-index="index" wx:key="index">
<text>{{index+1}}</text>
<view class="left_item_avatar">
<image wx:if="{{item.avatarUrl}}" src="{{ item.avatarUrl}}" mode="scaleToFill"></image>
<text>{{item.transferName?item.transferName:'--'}}</text>
</view>
</view>
</view>
<!-- 右侧表格滚动 -->
<view class="table_right_scroll_box">
<view class="flex_direction_column_item" wx:for="{{filter.sliceArr(sfaff,1)}}" wx:for-index="index" wx:key="index">
<view class='item_name'>{{item.name}}</view>
<view wx:for="{{item.list}}" wx:for-item="litem" wx:for-index="lindex" wx:key="lindex" class='item_name item_desc'>
<!-- <image wx:if="{{item.name == '员工'&& litem.avatarUrl}}" src="{{ litem.avatarUrl? litem.avatarUrl:''}}" mode="scaleToFill"></image> -->
<text>
<block wx:if="{{item.name == '转化率'}}">{{litem?litem+'%': '--'}}</block>
<!-- <block wx:elif="{{item.name == '员工'}}">{{litem.transferName?litem.transferName:'--'}}</block> -->
<block wx:else>{{filter.thousand(litem)||'--'}}</block>
</text>
</view>
</view>
</view>
</view>
</blokc>
<view wx:else class="empty">
<glsx-image webp custom-class="empty-icon" src="output/empty.png"></glsx-image>
<view class="empty-text">暂无排行榜数据</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
function thousand(n) {
if(!n || isNaN(n)) return n
var r = getRegExp('\B(?=(\d{3})+(?!\d))', 'g')
var p = (n+'').replace(r, ',')
return p
}
function sliceArr(arr,n) {
return arr.slice(n)
}
module.exports = {thousand:thousand,sliceArr:sliceArr}
\ No newline at end of file \ No newline at end of file
// packageOutput/pages/crowdDetail/crowdDetail.js
import ActivityApi from '~/api/activityApi/index'
Page({
/**
* 页面的初始数据
*/
data: {
navStyle: 'background-color: rgba(0,0,0,0);',
analyseValue: {
statics: {
browseCount: 1,
}
},
outputValue: [
// {
// label: '今日产值/元',
// name: 'realAmountToday',
// unit: '¥',
// multiple: 0.01,
// }, {
// label: '今日订单/单',
// name: 'orderCountToday',
// unit: ''
// }, {
// label: '今日访客/个',
// name: 'visitCountToday',
// unit: ''
// },
{
label: '累计产值/元',
name: 'realAmount',
unit: '¥',
multiple: 0.01,
iconUrl:'output/icon05.png'
}, {
label: '累计订单/单',
name: 'orderCount',
unit: '',
iconUrl:'output/icon07.png'
}, {
label: '累计访客/个',
name: 'visitCount',
unit: '',
iconUrl:'output/icon03.png'
}],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
onRoute(options) {
const { activityId } = options
this.setData({ outputData: options })
this.getDetail(activityId)
},
getDetail(activityId) {
let tabelTh = {
shareName: '员工',
totalOrderAmount: '产值',
totalShareCount: '转发次数',
totalVisitorRank: '访客总数',
totalBrowseCount: '浏览总数',
totalOrderCount: '成交单量',
conversionRate: '转化率',
}
ActivityApi.activityStaffRank({ activityId }).then(res => {
const sfaffList = res || []
this.setData({
sfaffList,
triggered: false,
tabelTh
})
console.log(this.data)
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"staff": "../../components/staff/staff",
"invert-analyse": "../../components/invertAnalyse/invertAnalyse"
},
"navigationStyle": "custom"
}
\ No newline at end of file \ No newline at end of file
.container {
height: 100vh;
overflow: hidden;
}
.layout {
// position: relative;
box-sizing: border-box;
position: relative;
padding-top: 400rpx;
&::after {
content: '';
width: 100%;
// height: 486rpx;
// height: 350rpx;
height: 275rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/bg.png') no-repeat;
background-size: 100% 264rpx;
background-color: #fff;
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
// .bg-box {
// width: 100%;
// overflow: hidden;
// position: absolute;
// left: 0;
// z-index: -1;
// .bg {
// width: 100%;
// height: 100%;
// position: absolute;
// z-index: -1;
// top: 0;
// left: 0;
// }
// }
}
.output-box {
padding: 20rpx 24rpx 24rpx;
// margin: 0rpx 16rpx;
margin-top: 16rpx;
background: #FFFFFF;
// border-radius: 32rpx;
// background: #F4F8FE;
.output-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
// margin: 20rpx 0rpx;
margin-bottom: 20rpx;
}
}
.output-value {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
// display: grid;
// grid-template-columns: repeat(3, 33.33%);
// row-gap: 24rpx;
// padding: 32rpx;
// background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
// border-radius: 16rpx;
// &.today {
// background-image: linear-gradient(180deg, #FFFFFF 64%, #FFF8E6 100%);
// border-radius: 16rpx;
// }
.output-item {
box-sizing: border-box;
width: 32%;
height: 136rpx;
// text-align: center;
background-image: linear-gradient(90deg, #F3FCFC 0%, #F9FEFF 49%, #EFF7FF 100%);
border-radius: 12rpx;
padding: 24rpx 12rpx 24rpx 16rpx;
&:nth-child(n+4){
margin-top: 16rpx;
}
.output-num {
font-weight: 700;
font-size: 36rpx;
color: #2D2D33;
text-align-last: left;
._unit {
font-size: 28rpx;
}
}
.output-label {
box-sizing: border-box;
display: flex;
justify-content: space-between;
// align-items: center;
font-size: 24rpx;
color: #6E6E7A;
// line-height: 36rpx;
// margin-top: 12rpx;
.label {
margin-top: 5rpx;
}
.icon {
width: 56rpx;
height: 48rpx;
// margin-left: 6rpx;
}
}
}
}
.totalCon {
display: flex;
margin-bottom: 20rpx;
.item {
width: 60%;
display: flex;
flex-direction: column;
justify-content: space-between;
font-weight: 700;
.unit {
font-size: 30rpx;
}
.label {
font-family: PingFangSC-SNaNrpxibold;
font-weight: 600;
font-size: 24rpx;
color: #323436;
line-height: 36rpx;
margin-bottom: 12rpx;
}
.number {
font-family: numberBold;
// font-weight: 600;
font-size: 48rpx;
color: #2D2D33;
}
}
.item+.item {
width: 40%;
}
.otherItem{
width: 40%;
}
.otherItem+ .otherItem{
width: 30%;
}
}
// .output-box {
// // background: #F4F8FE;
// background: #FFFFFF;
// // border-radius: 32rpx;
// // margin: 0 16rpx;
// padding: 24rpx;
// .output-title {
// font-weight: 600;
// font-size: 32rpx;
// color: #1B233D;
// line-height: 48rpx;
// margin-bottom: 22rpx;
// display: flex;
// }
// .output-value {
// display: grid;
// grid-template-columns: repeat(3, 33.33%);
// row-gap: 24rpx;
// padding: 32rpx;
// background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
// border-radius: 16rpx;
// .output-item {
// text-align: center;
// .output-num {
// font-weight: 600;
// font-size: 44rpx;
// color: #1B233D;
// line-height: 64rpx;
// text {
// font-size: 28rpx;
// }
// }
// .output-label {
// font-size: 24rpx;
// color: #6E6E7A;
// line-height: 36rpx;
// margin-top: 12rpx;
// }
// }
// }
// }
.box {
margin: 20rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx;
padding: 32rpx 40rpx;
.box-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
display: flex;
justify-content: space-between;
.select-up {
font-weight: 400;
font-size: 24rpx;
color: #666666;
position: relative;
.up-box {
position: absolute;
width: 108rpx;
height: 160rpx;
background: #FFFFFF;
box-shadow: 0 0 18rpx 0 #3a596a1c;
border-radius: 8rpx;
.up-item {
flex: auto;
font-weight: 400;
font-size: 20rpx;
color: #666666;
text-align: center;
line-height: 53rpx;
}
}
}
}
.staff-input {
width: 638rpx;
height: 64rpx;
background: #ffffff7d;
border: 2rpx solid #EEEEEE;
border-radius: 12rpx;
margin: 40rpx auto 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0rpx 20rpx;
box-sizing: border-box;
input {
height: 64rpx;
line-height: 64rpx;
color: #999999;
flex: 1;
}
}
}
\ No newline at end of file \ No newline at end of file
<!--packageOutput/pages/crowdDetail/crowdDetail.wxml-->
<view class="container">
<navigation-bar showBack="{{true}}" navStyle="{{navStyle}}" bindnavbarReady="navbarReady">产值详情</navigation-bar>
<view class="layout" id="layout" style="padding-top:{{navHeight}}px; height: calc(100vh)">
<!-- 背景图 -->
<!-- <view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px">
<view class="bg">
<glsx-image webp src="store-assistant/index_bg.webp"></glsx-image>
</view>
</view> -->
<scroll-view scroll-y class="content" class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" style="{{'height: calc(100% - 50rpx);'}}">
<view class="output-box">
<view class="output-title">
产值总览
</view>
<view class="totalCon" >
<view class="item otherItem ">
<view class="label">今日产值(元)</view>
<veiw class="number">
<text class="unit">¥ </text>{{outputData['realAmountToday']*(0.01) || 0}}
</veiw>
</view>
<view class="item otherItem">
<view class="label">今日订单(单)</view>
<veiw class="number">
{{outputData['orderCountToday'] || 0}}
</veiw>
</view>
<view class="item otherItem">
<view class="label">今日访客(员)</view>
<veiw class="number">
{{outputData['visitCountToday'] || 0}}
</veiw>
</view>
</view>
<view class="output-value">
<view class="output-item" wx:for="{{outputValue}}" wx:key="index">
<view class="output-label">
<view class="label">{{item.label}}</view>
<glsx-image src="{{item.iconUrl}}" class="icon" />
</view>
<view class="output-num"><text class="_unit">{{item.unit}}</text>{{outputData[item.name]*(item.multiple || 1) || 0}}</view>
</view>
</view>
</view>
<view class="box measure-box">
<view class="box-title">转化漏斗</view>
<invert-analyse data="{{outputData}}"></invert-analyse>
</view>
<staff sfaffList="{{sfaffList}}" tabelTh="{{tabelTh}}" downType="crowType"/>
</scroll-view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// packageOutput/pages/monthReport/monthReport.js
import ActivityApi from '~/api/activityApi/index'
Page({
/**
* 页面的初始数据
*/
data: {
show: false,
date: '2023年4月10日',
maxDate: new Date().getTime(),
navStyle: 'background-color: rgba(0,0,0,0);',
currentDate: new Date().getTime(),
timeValue: new Date().format('yyyy-MM-dd'),
outputView: {
outputValue: [{
label: '报价量(单)',
name: 'quotationCount',
unit: '',
iconUrl:'output/icon02.png'
}, {
label: '成交量(单)',
name: 'successCount',
unit: '',
iconUrl:'output/icon07.png'
}, {
label: '产值(元)',
name: 'outputValue',
_unit: '¥',
iconUrl:'output/icon05.png'
}],
outputValueBoutique: [
// {
// label: '发券量(总)/张',
// name: 'sendCouponTotal',
// unit: ''
// },
// {
// label: '营业额(总)/元',
// name: 'orderMoneyTotal',
// _unit: '¥'
// },
{
label: '升级订单(单)',
name: 'upgradeCountTotal',
unit: '',
iconUrl:'output/icon02.png'
},
{
label: '转化率',
name: 'upgradeRatio',
unit_: '%',
iconUrl:'output/icon07.png'
},
{
label: '客单价(元)',
name: 'averagePrice',
_unit: '¥',
iconUrl:'output/icon05.png'
},
],
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const { time, type, merchantId,merchantName } = options
this.setData({ timeType: time, type, merchantId,merchantName })
this.getReport()
},
onDisplay() {
this.setData({ show: true });
},
onClose() {
this.setData({ show: false });
},
//查看报表
getReport() {
const { type, timeType, merchantId,timeValue } = this.data
let apiName,params
const dataT = {
1: {
day: () => {
apiName = 'boutiquecouponQueryByDayReport',
params = {
merchantId,
reportDate: timeValue
}
},
month: () => {
apiName = 'boutiquecouponQueryByMonthReport',
params = {
merchantId,
reportMonth: timeValue.substring(0,7)
}
}
},
2: {
day: () => {
apiName = 'merchantsOutputReport',
params = {
merchantIds: [merchantId],
startTime: timeValue + ' 00:00:00',
endTime: timeValue + ' 23:59:59',
}
},
month: () => {
apiName = 'merchantsOutputReport',
params = {
merchantIds: [merchantId],
startTime: new Date(timeValue).format('yyyy-MM')+'-01' + ' 00:00:00',
endTime: new Date(this.getNextMonth(timeValue)).format('yyyy-MM')+'-01' + ' 00:00:00',
}
}
}
}
dataT[type][timeType]()
ActivityApi[apiName](params).then(res => {
const list = res.employeeOutputList || res.staffList
const arr = []
const staffList = list.length?Object.assign(arr,list.splice(0,3)):arr
const billboard = staffList.map((item,idx)=>{
return {
sort: idx+1,
value:item.outputValue || item.orderMoneyTotal || 0,
name: item.transferName||item.employeeName
}
})
this.setData({
outputData: res||{},
triggered:false,
billboard
})
})
},
//获取下个月时间
getNextMonth(time) {
const arr = time.split('-')
let year = arr[0]; //获取当前日期的年份
let month = +arr[1] + 1; //获取当前日期的月份
let day = arr[2]; //获取当前日期的日
if (month == 13) {
year = parseInt(year) + 1;
month = 1;
}
if (month < 10) {
month = "0" + month;
}
const nextMonth = year + "-" + month +"-" + day;
return nextMonth;
},
formatDate(date) {
date = new Date(date);
return `${date.getFullYear()}年${date.getMonth() + 1}}月`;
},
onInput(event) {
this.setData({
currentDate: event.detail,
});
},
confirm() {
const { currentDate } = this.data
this.setData({
show: false,
timeValue: new Date(currentDate).format('yyyy-MM-dd')
});
this.getReport()
},
cancel() {
this.setData({ show: false });
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"van-datetime-picker": "@vant/weapp/datetime-picker/index"
},
"navigationStyle": "custom"
}
\ No newline at end of file \ No newline at end of file
/* packageOutput/pages/monthReport/monthReport.wxss */
.layout {
// position: relative;
box-sizing: border-box;
position: relative;
padding-top: 400rpx;
&::after {
content: '';
width: 100%;
height: 380rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/bg.png') no-repeat;
background-size: 100% 264rpx;
background-color: #fff;
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
// .bg-box {
// width: 100%;
// overflow: hidden;
// position: absolute;
// left: 0;
// z-index: -1;
// .bg {
// width: 100%;
// height: 100%;
// position: absolute;
// z-index: -1;
// top: 0;
// left: 0;
// }
// }
.store-box {
margin: 32rpx;
.store-item {
display: flex;
.store-logo {
// width: 32rpx;
// height: 32rpx;
width: 64rpx;
height: 64rpx;
}
.store-content {
margin-left: 12rpx;
margin-bottom: 24rpx;
.store-name {
font-weight: 600;
font-size: 28rpx;
color: #1B233D;
line-height: 32rpx;
}
.store-desc {
margin-top: 6rpx;
font-size: 24rpx;
color: #1b233da8;
line-height: 32rpx;
}
}
}
.date-input {
width: 686rpx;
height: 64rpx;
// background: #ffffff7d;
// border: 2rpx solid #EEEEEE;
// border-radius: 12rpx;
background: #F8F9FC;
border-radius: 36rpx;
display: flex;
align-items: center;
padding: 0rpx 24rpx;
box-sizing: border-box;
justify-content: space-between;
.date-value {
font-size: 26rpx;
// color: #666666;
color: #5A6066;
}
.date-icon {
width: 32rpx;
height: 31rpx;
}
}
}
.output-box {
// background: #F4F8FE;
// border-radius: 32rpx;
// margin: 0 16rpx;
box-sizing: border-box;
padding: 24rpx;
margin: 16rpx 0;
background: #FFFFFF;
.output-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
margin-bottom: 22rpx;
}
.output-value {
// display: grid;
// grid-template-columns: repeat(3, 33.33%);
// row-gap: 24rpx;
// padding: 32rpx;
// background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
// border-radius: 16rpx;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.output-item {
box-sizing: border-box;
width: 32%;
height: 136rpx;
background-image: linear-gradient(90deg, #F3FCFC 0%, #F9FEFF 49%, #EFF7FF 100%);
border-radius: 12rpx;
padding: 24rpx 12rpx 24rpx 16rpx;
&:nth-child(n+4) {
margin-top: 16rpx;
}
// .output-num {
// font-weight: 600;
// font-size: 30rpx;
// color: #1B233D;
// line-height: 64rpx;
// ._unit {
// font-size: 28rpx;
// }
// }
.output-num {
font-weight: 700;
font-size: 36rpx;
color: #2D2D33;
text-align-last: left;
._unit {
font-size: 28rpx;
}
}
// .output-label {
// font-size: 24rpx;
// color: #6E6E7A;
// line-height: 36rpx;
// margin-top: 12rpx;
// }
.output-label {
box-sizing: border-box;
display: flex;
justify-content: space-between;
// align-items: center;
font-size: 22rpx;
color: #6E6E7A;
// line-height: 36rpx;
// margin-top: 12rpx;
.label {
margin-top: 5rpx;
}
.icon {
width: 56rpx;
height: 56rpx;
// margin-left: 6rpx;
}
}
}
}
}
.totalCon {
display: flex;
margin-bottom: 20rpx;
.item {
width: 60%;
display: flex;
flex-direction: column;
justify-content: space-between;
font-weight: 700;
.unit {
font-size: 30rpx;
}
.label {
font-family: PingFangSC-SNaNrpxibold;
font-weight: 600;
font-size: 24rpx;
color: #323436;
line-height: 36rpx;
margin-bottom: 12rpx;
}
.number {
font-family: numberBold;
// font-weight: 600;
font-size: 48rpx;
color: #2D2D33;
}
}
.item+.item {
width: 40%;
}
.otherItem {
width: 40%;
}
.otherItem+.otherItem {
width: 30%;
}
}
.billboard-box {
// background: #F4F8FE;
// border-radius: 32rpx;
background: #FFFFFF;
margin-top: 16rpx;
padding: 24rpx;
min-height: calc(100% - 500rpx);
.billboard-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
margin-bottom: 22rpx;
display: flex;
.unit {
margin-left: auto;
font-size: 22rpx;
color: #5A6066;
}
}
}
.billboard-border {
width: 670rpx;
height: 512rpx;
// background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
// border-radius: 16rpx;
position: relative;
.billboard-item {
width: 216rpx;
height: 368rpx;
position: absolute;
&:first-child {
top: 25rpx;
left: 228rpx;
z-index: 10;
.bill-bg {
width: 216rpx;
height: 368rpx;
}
.bill-num,
.bill-name {
width: 233.52rpx !important;
}
}
&:nth-child(2) {
left: 0rpx;
top: 65rpx;
width: 216rpx;
height: 336rpx;
image {
width: 216rpx;
height: 336rpx;
}
}
&:nth-child(3) {
z-index: 20;
top: 80rpx;
right: 0rpx;
width: 216rpx;
height: 304rpx;
image {
width: 216rpx;
height: 304rpx;
}
}
.billboard-item-bar {
position: relative;
.bill-bg {
position: absolute;
top: 0;
left: 0;
}
.bill-num {
position: absolute;
z-index: 100;
top: 180rpx;
width: 100%;
text-align: center;
font-weight: 600;
font-size: 36rpx;
color: #FE5662;
.unit {
font-size: 24rpx;
}
}
.bill-name {
position: absolute;
top: 130rpx;
width: 100%;
text-align: center;
z-index: 100;
font-weight: 500;
font-size: 28rpx;
// color: #1B233D;
color: #323436;
}
}
}
}
}
.van-picker__toolbar {
display: none !important;
}
.empty {
margin: 20rpx auto 0;
text-align: center;
.empty-icon {
width: 400rpx;
height: 400rpx;
display: inline-block;
}
.empty-text {
font-weight: 400;
font-size: 28rpx;
color: #7A8299;
text-align: center;
margin: 32rpx 106rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!--packageOutput/pages/monthReport/monthReport.wxml-->
<wxs src="time.wxs" module="formatTime" />
<view class="container">
<navigation-bar showBack="{{true}}" navStyle="{{navStyle}}" bindnavbarReady="navbarReady">产值{{timeType=='day'?'日':'月'}}报表</navigation-bar>
<view class="layout" id="layout" style="padding-top:{{navHeight}}px; height: calc(100vh)">
<!-- 背景图 -->
<!-- <view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px">
<view class="bg">
<glsx-image webp src="store-assistant/index_bg.webp"></glsx-image>
</view>
</view> -->
<scroll-view scroll-y class="content" class="content" refresher-triggered="{{triggered}}" refresher-enabled bindrefresherrefresh="getReport" bindscroll="scrollIng" style="{{'height: 100%'}}">
<view class="store-box">
<view class="store-item">
<view class="store-logo">
<glsx-image class="store-logo" webp src="output/merchantIcon.png"></glsx-image>
</view>
<view class="store-content">
<view class="store-name">{{merchantName}}</view>
<view class="store-desc">欢迎查看{{timeType=='day'?'日':'月'}}报表数据</view>
</view>
</view>
<view class="date-input" bindtap="onDisplay">
<view class="date-value">{{formatTime.formatTime(timeValue,timeType=='day'?11:8)}}</view>
<view class="date-icon">
<glsx-image class="date-icon" webp src="output/clander.png"></glsx-image>
</view>
</view>
</view>
<view class="output-box">
<view class="output-title">
当{{timeType=='day'?'日':'月'}}产值
</view>
<view class="totalCon" wx:if="{{type != 2}}">
<view class="item">
<view class="label">总营业额(元)</view>
<veiw class="number">
<text class="unit">¥ </text>{{outputData['orderMoneyTotal'] ||0}}
</veiw>
</view>
<view class="item">
<view class="label">发券量(张)</view>
<veiw class="number">
{{outputData['sendCouponTotal'] ||0}}
</veiw>
</view>
</view>
<view class="output-value">
<view class="output-item" wx:for="{{outputView[type == 2?'outputValue':'outputValueBoutique']}}" wx:key="index">
<view class="output-label">
<view class="label">{{item.label}}</view>
<glsx-image src="{{item.iconUrl}}" class="icon" />
</view>
<view class="output-num"><text class="_unit">{{item._unit}}</text> {{outputData[item.name] ||0}}<text class="unit_">{{item.unit_}}</text></view>
</view>
</view>
</view>
<view class="billboard-box">
<view class="billboard-title">
<text>当{{timeType=='day'?'日':'月'}}员工龙虎榜</text>
<text class="unit">累计产值(元)</text>
</view>
<view class="billboard-border">
<block wx:if="{{billboard.length}}">
<view class="billboard-item" wx:for="{{billboard}}" wx:key="index">
<view class="billboard-item-bar">
<view class="bill-border">
<view class="bill-name">{{item.name}}</view>
<view class="bill-num" wx:if="{{item.name}}"><text class="unit">¥</text>{{item.value}}</view>
</view>
<glsx-image webp custom-class="bill-bg" src="output/bill0{{item.sort}}.png"></glsx-image>
</view>
</view>
</block>
<view wx:if="{{billboard.length==0}}" class="empty">
<glsx-image webp custom-class="empty-icon" src="output/empty.png"></glsx-image>
<view class="empty-text">暂无排行榜数据</view>
</view>
</view>
</view>
</scroll-view>
</view>
<popup bind:hidePopup="cancel" bind:confirm="confirm" show="{{show}}" height="50vh">
<van-datetime-picker max-date="{{ maxDate }}" value="{{ currentDate }}" type="{{timeType=='day'?'date':'year-month'}}" bind:input="onInput" />
</popup>
</view>
\ No newline at end of file \ No newline at end of file
var formatTime = function(time,num = 8){
time = (time+'-').replace('-','年').replace('-','月').replace('-','日')
return time.substring(0,num)
}
module.exports = {
formatTime:formatTime
}
\ No newline at end of file \ No newline at end of file
...@@ -133,7 +133,7 @@ Page({ ...@@ -133,7 +133,7 @@ Page({
let { let {
tabIndx tabIndx
} = this.data } = this.data
tabIndx == 1 ? this.crowdfunding() : this.getAnalysisTendency(tabIndx) if(tabIndx == 0)this.getAnalysisTendency(tabIndx)
console.log(tabIndx, 'tabIndx') console.log(tabIndx, 'tabIndx')
}, },
changeStatus() { changeStatus() {
......
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
"tab": "../../components/Tab/Tab", "tab": "../../components/Tab/Tab",
"output-echart": "../../components/outputEchart/outputEchart", "output-echart": "../../components/outputEchart/outputEchart",
"output-crowdfund": "../../components/outputCrowdfund/outputCrowdfund", "output-crowdfund": "../../components/outputCrowdfund/outputCrowdfund",
"CalendarMonth": "/components/CalendarMonth/CalendarMonth" "CalendarMonth": "/components/CalendarMonth/CalendarMonth",
"equity-value": "../../components/equity-value/index",
"WorktableEntrance":"../../components/WorktableEntrance/index"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
...@@ -14,13 +14,16 @@ ...@@ -14,13 +14,16 @@
</view> --> </view> -->
<tab tab="{{ tabList }}" itemWidth="{{ '30%' }}" index="{{ tabIndx }}" bindclick="changeTabIndx" class="tabContainer" /> <tab tab="{{ tabList }}" itemWidth="{{ '30%' }}" index="{{ tabIndx }}" bindclick="changeTabIndx" class="tabContainer" />
<view class="searchBar"> <block wx:if="{{ tabIndx==0 }}">
<view class="checkCon" wx:if="{{ tabIndx == 0 }}">
<view class="searchBar">
<view class="checkCon" >
<view class="checkoutBox checkBox" bind:tap="changeStatus" wx:if="{{ !allType }}"></view> <view class="checkoutBox checkBox" bind:tap="changeStatus" wx:if="{{ !allType }}"></view>
<image class="checkBox" bind:tap="changeStatus" wx:if="{{ allType }}" src="../../images/checkoutIcon.png"></image> <image class="checkBox" bind:tap="changeStatus" wx:if="{{ allType }}" src="../../images/checkoutIcon.png"></image>
查看全品类 查看全品类
</view> </view>
<view class="calendarMonthCon" wx:if="{{ tabIndx != 1 }}"> <view class="calendarMonthCon">
<view class="monthNow {{ dateObj.nowMonth ? 'active' : '' }}" bind:tap="handleMonthNow">本月</view> <view class="monthNow {{ dateObj.nowMonth ? 'active' : '' }}" bind:tap="handleMonthNow">本月</view>
<CalendarMonth <CalendarMonth
allowSameDay allowSameDay
...@@ -48,25 +51,6 @@ ...@@ -48,25 +51,6 @@
</view> </view>
</CalendarMonth> </CalendarMonth>
</view> </view>
<!-- 众筹 -->
<scroll-view
wx:if="{{ tabIndx == 1 }}"
scroll-x="{{ true }}"
enable-flex
class="activity-box"
scroll-with-animation
scroll-left="{{ scrollLeft }}"
>
<view class="flex">
<view
class="activity-item {{ activityActive == index ? 'active' : ''}} {{item.openFlag == 1 ? 'open' : 'no-open' }}"
wx:for="{{ scenceList[0].productList }}"
wx:key="index"
bindtap="handleActChange"
data-idx="{{ index }}"
>{{item.productName}}</view>
</view>
</scroll-view>
</view> </view>
<view class="conCom"> <view class="conCom">
<view wx:if="{{ tabIndx == 1 }}" class="activity-content container"> <view wx:if="{{ tabIndx == 1 }}" class="activity-content container">
...@@ -91,7 +75,7 @@ ...@@ -91,7 +75,7 @@
</view> </view>
</view> </view>
<output-echart <output-echart
wx:else wx:elif="{{ tabIndx == 0 }}"
class="container" class="container"
revenueData="{{ revenueData }}" revenueData="{{ revenueData }}"
chartData="{{ lineChart }}" chartData="{{ lineChart }}"
...@@ -99,7 +83,18 @@ ...@@ -99,7 +83,18 @@
tabIndex="{{ tabIndx }}" tabIndex="{{ tabIndx }}"
customerList="{{ customerList }}" customerList="{{ customerList }}"
></output-echart> ></output-echart>
</view> </view>
</block>
<block wx:elif="{{tabIndx == 1}}">
<view style="height: calc(100%);">
<WorktableEntrance></WorktableEntrance>
</view>
</block>
<block wx:else>
<view style="height: calc(100%);">
<equity-value entranceType="2"></equity-value>
</view>
</block>
<!-- <output-echart></output-echart> <!-- <output-echart></output-echart>
<output-crowdfund></output-crowdfund> --> <output-crowdfund></output-crowdfund> -->
</view> </view>
......
// packagesList/packageOutput/pages/shareWebview/shareWebview.js
Page({
/**
* 页面的初始数据
*/
data: {
flag: true
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.$api.showLoading('加载中...')
let decodeUrl = decodeURIComponent(options.url)
let param = this.getParams(decodeUrl)
if (param.urlParam) {
let query = JSON.parse(param.urlParam)
this.data.refresh = query.refresh
}
this.setData({
url: decodeUrl
})
wx.hideLoading()
},
getParams(str) {
let params = str.split('?')
if (params.length < 2) return {}
let param = params[1].split('&')
let obj = {}
for (let i = 0; i < param.length; i++) {
let paramsA = param[i].split('=')
let key = paramsA[0]
let value = paramsA[1]
obj[key] = value
}
return obj
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
if (this.data.refresh) {
this.setData(
{
flag: true
},
() => {
this.setData({
url: this.data.url
})
}
)
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
let { url } = this.data
return {
title: '实时战报',
path: `/packagesList/packageOutput/pages/shareWebview/shareWebview?url=${encodeURIComponent(url)}`,
success: (res) => {
console.log("转发成功", e);
}
}
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packagesList/packageOutput/pages/shareWebview/shareWebview.wxss */
\ No newline at end of file \ No newline at end of file
<!--packagesList/packageOutput/pages/shareWebview/shareWebview.wxml-->
<block wx:if="{{flag}}">
<web-view src="{{url}}"></web-view>
</block>
import { IMG_URL_STORE } from "~/utils/constantData";
import ActivityApi from '~/api/activityApi/index'
import { commentTime } from '~/utils/format'
Page({
/**
* 页面的初始数据
*/
data: {
list: [],
allNum: 0,
todayNum: 0,
IMG_URL: IMG_URL_STORE,
isPravite: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
onRoute(options) {
wx.showLoading()
let activityId = options.activityId
ActivityApi.getActivityVisitorList({
activityId,
staffFlag: true
}).then(res => {
res.visitorList && res.visitorList.forEach(val => {
val.lastVisitFormatTime = commentTime(val.lastVisitDate)
if (!val.customerPhone && val.guestId) {
val.gId = (val.guestId.split('_')).pop() || ''
}
})
this.setData({
allNum: res.visitorTotal,
todayNum: res.todayTotal,
list: res.visitorList
})
wx.hideLoading()
})
},
toCopyName(e) {
const { name } = e.currentTarget.dataset
if (name) {
wx.setClipboardData({
data: name
})
}
},
// 打电话
callPhone(e) {
let { mobile } = e.currentTarget.dataset
wx.makePhoneCall({
phoneNumber: mobile.toString()
})
},
// 复制微信号
copyWechart(e) {
let { wechartno } = e.currentTarget.dataset
wx.setClipboardData({
data: wechartno.toString(),
success(res) {
wx.showToast({
title: '微信号已复制',
icon: "none"
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"glsx-privacy": "glsx-applet-component/GlsxPrivacy/index"
},
"navigationBarTitleText": "我的访客"
}
\ No newline at end of file \ No newline at end of file
/* packageActivity/pages/visitor/visitor.wxss */
.visitor-box{
min-height: 100vh;
// background-image: linear-gradient(180deg, #F0F5FF 0%, #EDF3FF 100%);
overflow: hidden;
.img-bg{
width: 100%;
height: 400rpx;
float: left;
}
.content{
width: 100%;
float: left;
margin-top: -400rpx;
.title{
padding: 32rpx 34rpx 0 34rpx;
font-size: 36rpx;
font-weight: 600;
color: #1B233D;
display: flex;
.num{
color: #3666FE;
}
view:last-child{
margin-left: 48rpx;
}
text{
font-size: 28rpx;
font-weight: 400;
}
}
.list-box{
margin: 32rpx 24rpx;
right: 0;
left: 0;
.item_box{
position: relative;
background: #FFFFFF;
box-shadow: 0 10rpx 20rpx 0 rgba(129,146,214,0.24), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40);
// position: relative;
overflow: hidden;
margin-bottom: 24rpx;
border-radius: 24rpx;
}
.list-item{
padding: 24rpx 40rpx 0;
.top{
display: flex;
justify-content: space-between;
align-items: center;
.top-left{
display: flex;
image{
width: 80rpx;
height: 80rpx;
margin-right: 24rpx;
border-radius: 50%;
}
.name{
font-size: 30rpx;
color: #1B233D;
display: flex;
align-items: center;
max-width: 400rpx;
.copy{
width: 28rpx;
height: 28rpx;
margin-left: 8rpx;
}
}
.mobile{
margin-top: 10rpx;
font-size: 26rpx;
color: #7A8299;
.order-statue{
margin-left: 16rpx;
font-size: 24rpx;
color: #EB9109;
}
.green{
color: #3FCF77;
}
}
}
.top-right{
.btn_icon{
width: 56rpx;
height: 56rpx;
margin-left: 32rpx;
}
}
}
.bottom{
margin-top: 24rpx;
border-radius: 8px;
padding: 24rpx 0;
border-top: 2rpx dashed #EEEEEE;
.activity{
// font-size: 30rpx;
font-size: 24rpx;
// font-weight: 600;
line-height: 48rpx;
// color: #1B233D;
color: #393B3E;
text{
display: inline-block;
padding: 2rpx 16rpx;
height: 40rpx;
border-radius: 22rpx;
font-weight: 400;
font-size: 24rpx;
color: #673F00;
text-align: center;
line-height: 40rpx;
margin-left: 16rpx;
background-image: linear-gradient(90deg, #FFF3A2 7%, #FFDA85 95%);
}
}
.pravite-text{
font-weight: 500;
font-size: 30rpx;
color: #6E6E7A;
line-height: 44rpx;
text{
margin-left: 0;
}
}
}
.status{
position: absolute;
right: 0;
top: 0;
width: 172rpx;
height: 52rpx;
display: flex;
align-items: center;
justify-content: center;
font-weight: 400;
font-size: 26rpx;
color: #EB9109;
}
.status-2{
color: #3FCF77;
}
}
.orderde{
background-image: linear-gradient(90deg, #F2F6FF 9%, #FCFDFF 100%);
box-shadow: 0 10rpx 20rpx 0 rgba(129,146,214,0.24), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40);
}
}
.no-data{
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
margin-top: 240rpx;
.no_data_image{
width: 400rpx;
height: 400rpx;
}
.text{
margin-top: 32rpx;
font-size: 28rpx;
color: #7A8299;
}
}
}
}
.footprint{
height: 64rpx;
line-height: 64rpx;
padding: 0 32rpx;
display: flex;
justify-content: space-between;
color: #7A8299;
font-size: 26rpx;
// margin-top: 16rpx;
background: #FFF9F2;
}
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!