Commit fd45940e by chenwq

sort-tab,联调

1 parent d2d4c694
...@@ -16,8 +16,8 @@ Component({ ...@@ -16,8 +16,8 @@ Component({
*/ */
data: { data: {
busiOptSceneCode, busiOptSceneCode,
tabActive: 'store', // tabActive: 'store',
// tabActive: 'business', tabActive: 'business',
formData: { formData: {
// 0:全部-1;1:精品升级SC002;2:售后众筹SC004;3:会员权益/升级SC001 // 0:全部-1;1:精品升级SC002;2:售后众筹SC004;3:会员权益/升级SC001
busiIdx: 0, busiIdx: 0,
...@@ -231,10 +231,17 @@ Component({ ...@@ -231,10 +231,17 @@ Component({
}, },
dealSearchCrowd() { dealSearchCrowd() {
let params = {} let params = []
let { formData, baseData: { proList } } = this.data let { formData, baseData: { proList } } = this.data
if (formData.busiIdx == 2) { let attrToNum = {
params.categoryList = proList[formData?.proIdx || 0].productCode 'PC005': 1,
'PC006': 2,
'PC007': 3,
'PC008': 4,
'PC009': 5
}
if (formData.busiIdx == 2 && formData?.proIdx) {
params.categoryList = [attrToNum[proList[formData?.proIdx].productCode]]
params.activityStatusList = this.dealSearchStatus() params.activityStatusList = this.dealSearchStatus()
} }
console.log(params) console.log(params)
......
...@@ -27,7 +27,8 @@ Component({ ...@@ -27,7 +27,8 @@ Component({
}, },
totalPages: -1, totalPages: -1,
list: [], list: [],
tabActive: 'store', tabActive: 'business',
// 业务经营汇总
merchantList: [], merchantList: [],
formData: { formData: {
// 0:全部-1;1:精品升级SC002;2:售后众筹SC004;3:会员权益/升级SC001 // 0:全部-1;1:精品升级SC002;2:售后众筹SC004;3:会员权益/升级SC001
...@@ -39,6 +40,9 @@ Component({ ...@@ -39,6 +40,9 @@ Component({
proIdx: 0, proIdx: 0,
statusIdx: 0 statusIdx: 0
}, },
busiObj: {},
busiTotalList: [],
crowdOrderObj: {}
}, },
lifetimes: { lifetimes: {
attached() { attached() {
...@@ -84,21 +88,62 @@ Component({ ...@@ -84,21 +88,62 @@ Component({
this.getBusiStatistics(true) this.getBusiStatistics(true)
}, },
resetBusiData() {
this.setData({
busiObj: {},
busiTotalList: [],
crowdOrderObj: {}
})
},
// 众筹数据处理
dealCrowdObj(data) {
let _obj = {
totalNum: data.activityTotal,
totalOrderCount: data.orderTotal,
totalAmount: data.totalAmount,
activityList: []
}
console.log(data, 'data----')
data?.merchantList.forEach(item => {
let _list = item?.merchantActivityRevenueDTO?.statistics || []
_list.forEach(k => {
let _activityList = k?.activityList || []
_obj.activityList = _obj.activityList.concat(_activityList)
})
})
this.setData({
crowdOrderObj: _obj
})
console.log(this.data.crowdOrderObj, 'crowdOrderObj-')
},
getBusiStatistics(isReset = false) { getBusiStatistics(isReset = false) {
let totalTabModule = this.selectComponent('#totalTab') let totalTabModule = this.selectComponent('#totalTab')
let busiSearchData = totalTabModule.dealParams() let busiSearchData = totalTabModule.dealParams()
let { merchantList } = this.data
let params = {
...busiSearchData,
merchantIds: merchantList.map(item => item.merchantId)
// merchantIds: ['44211227', '44211547', '10011000', '44184606', '44209535']
}
this.setData({ this.setData({
formData: JSON.parse(JSON.stringify(totalTabModule.data.formData)) formData: JSON.parse(JSON.stringify(totalTabModule.data.formData))
}) })
console.log(params, 'params--') let { merchantList, formData } = this.data
let params = {
asc: 1,
orderBy: 1,
...busiSearchData,
// merchantIds: merchantList.map(item => item.merchantId)
merchantIds: ['44211227', '44211547', '10011000', '44184606', '44209535']
}
// console.log(params, 'params--')
outputApi.getBusiStatistics(params).then(res => { outputApi.getBusiStatistics(params).then(res => {
console.log(res, '汇总----') this.resetBusiData()
// console.log(res, '汇总----')
if (formData.sceneCode == 'SC004') {
this.dealCrowdObj(res)
} else {
this.setData({
busiObj: res,
busiTotalList: res.merchantList || []
})
}
}) })
}, },
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
"usingComponents": { "usingComponents": {
"scene-box": "../../../../../components/SceneBox/SceneBox", "scene-box": "../../../../../components/SceneBox/SceneBox",
"total-tab": "../TotalTab/TotalTab", "total-tab": "../TotalTab/TotalTab",
"busi-card": "../BusiCard/BusiCard" "busi-card": "../BusiCard/BusiCard",
"output-crowdfund": "../outputCrowdfund/outputCrowdfund",
"sort-tab": "../sortTab/sortTab"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -53,12 +53,24 @@ ...@@ -53,12 +53,24 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<scroll-view wx:if="{{tabActive == 'business'}}" class="client" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindrefresherrefresh="onBindRefresh" lower-threshold='50' scroll-top="{{scrollTop}}"> <scroll-view wx:if="{{tabActive == 'business'}}" class="client" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindrefresherrefresh="onBindRefresh" lower-threshold='50' scroll-top="{{busiScrollTop}}">
<!-- 售后众筹 --> <view class="client-box">
<view wx:if="{{formData.sceneCode == 'SC004'}}">售后众筹</view> <!-- 总收益 -->
<!-- 0:全部;1:精品升级;3:会员权益/升级 --> <view wx:if="{{formData.sceneCode != 'SC004'}}">
<view wx:else> <view class="profit-box flex-between">
<busi-card></busi-card> <text>总收益</text>
<text class="price-txt">¥{{filter.money_three_for_two_thousands(busiObj.totalAmount || 0.00)}}</text>
</view>
<sort-tab></sort-tab>
</view>
<!-- 售后众筹 -->
<view wx:if="{{formData.sceneCode == 'SC004'}}">
<output-crowdfund wx:if="{{formData.sceneCode == 'SC004'}}" orderObj="{{crowdOrderObj}}"></output-crowdfund>
</view>
<!-- 0:全部;1:精品升级;3:会员权益/升级 -->
<view wx:else>
<busi-card></busi-card>
</view>
</view> </view>
</scroll-view> </scroll-view>
<crowdfund-poster item="{{posterItem}}" id="poster" scrollImg="{{false}}" bindlongtouch="longtouch" /> <crowdfund-poster item="{{posterItem}}" id="poster" scrollImg="{{false}}" bindlongtouch="longtouch" />
\ No newline at end of file \ No newline at end of file
/**设置千分位 */
var setPrice = function (n = 0.0) {
if ((typeof n == 'string' || typeof n == 'number') && !isNaN(n)) {
n = parseFloat(n).toFixed(2)
var r = getRegExp('(d{1,3})(?=(d{3})+(?:.))', 'g')
var p = n.replace(r, ',')
return p
// var r = getRegExp('/./', 'g')
// var p = n.replace(r, 'test')
// return n
} else {
console.log(n, '不是一个数字', !isNaN(n))
}
}
var threeNumForTwo = {
money_three_for_two_thousands: function (num) {
//num = parseInt(num);
// return num
var num = num + ''
var d = ''
if (num.slice(0, 1) == '-') {
d = num.slice(0, 1)
num = num.slice(1)
}
var len = num.length
var index = num.indexOf('.')
if (index == -1) {
num = num + '.00'
} else if (index + 2 == len) {
num = num + '0'
}
var index = num.indexOf('.') // 字符出现的位置
var num2 = num.slice(-3)
num = num.slice(0, index)
var result = ''
while (num.length > 3) {
result = ',' + num.slice(-3) + result
num = num.slice(0, num.length - 3)
}
if (num) {
result = num + result
}
// return result
return d + (result + num2)
}
}
/*
* 导出
*/
module.exports = {
setPrice: setPrice,
money_three_for_two_thousands: threeNumForTwo.money_three_for_two_thousands //暴露接口调用
}
// packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
// import wxqrcode from '~/utils/lib/wxqrcode'
import { IMG_URL } from '~/utils/constantData'
// import { deleteSecond } from '~/utils/format'
// import outputApi from '~/api/outputApi/index'
const IMAGES = Object.freeze({
download: `${IMG_URL}/output/download.webp`
})
Component({
/**
* 组件的属性列表
*/
properties: {
orderObj: {
type: Object,
value: () => { },
observer(n) {
// n && this.dealStaffList()
}
},
hasReport: {
type: Boolean,
value: true
}
},
options: {
styleIsolation: 'shared'
},
/**
* 组件的初始数据
*/
data: {
IMGURL: IMG_URL,
IMAGES,
isShowTip: true,
isShowPoster: false,
orderFormList: [
{
label: '总场次',
name: 'totalNum'
},
{
label: '总订单',
name: 'totalOrderCount'
},
{
label: '成交金额',
name: 'totalAmount',
prefix: '¥'
}
],
merchantFormList: [
{
label: '预计活动时间',
name: 'time'
},
{
label: '实际活动时间',
name: 'realTime'
},
{
label: '订单数',
name: 'orderCount',
className: 'font-number'
},
{
label: '产值',
name: 'realAmount',
className: 'red font-number',
prefix: '¥',
isNumber: true
},
{
label: '预估产值',
name: 'predictAmount',
className: 'font-number',
prefix: '¥',
isNumber: true
}
],
tableHeadList: [
{
label: 'rankIdx',
width: '40rpx'
},
{
label: '业务员',
name: 'shareName'
},
{
label: '转发',
name: 'shareCount'
},
{
label: '浏览',
name: 'browseCount'
},
{
label: '成交',
name: 'dealCount',
width: '92rpx'
},
{
label: '产值',
name: 'totalAmount',
prefix: '¥'
}
]
},
/**
* 组件的方法列表
*/
methods: {
// dealStaffList() {
// var list = this.data.orderObj
// list &&
// list.activityList?.forEach(item => {
// // 1-未开始;2-活动中;3-已结束
// let sliceNum = item.activityStatus == 3 ? 3 : 10
// item.showStaffList = item.staffList.length > sliceNum ? item.staffList.slice(0, sliceNum) : item.staffList
// item.staffList = item.staffList.length > sliceNum ? item.staffList.slice(sliceNum) : []
// })
// this.setData({
// orderObj: list
// })
// },
// handleMore(e) {
// var { idx } = e.currentTarget.dataset
// var list = this.data.orderObj
// var item = list.activityList[idx]
// list.activityList[idx].showStaffList = list.activityList[idx].showStaffList.concat(item.staffList.length > 10 ? item.staffList.slice(0, 10) : item.staffList)
// list.activityList[idx].staffList = item.staffList.length > 10 ? item.staffList.slice(10) : []
// this.setData({
// orderObj: list
// })
// },
// handleCopy(e) {
// var { idx } = e.currentTarget.dataset
// var currentItem = this.data.orderObj.activityList[idx]
// var qr = wxqrcode.createQrCodeImg(currentItem.activityUrl)
// const base64src = function (base64data) {
// return new Promise((resolve, reject) => {
// const [a, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(base64data) || []
// if (!format) reject(new Error('ERROR_BASE64SRC_PARSE'))
// const filePath = `${wx.env.USER_DATA_PATH}/tmp_base64src.${format}`
// const buffer = wx.base64ToArrayBuffer(bodyData)
// wx.getFileSystemManager().writeFile({
// filePath,
// data: buffer,
// encoding: 'binary',
// success() {
// resolve(filePath)
// },
// fail() {
// reject(new Error('ERROR_BASE64SRC_WRITE'))
// }
// })
// })
// }
// base64src(qr).then(res => {
// wx.getImageInfo({
// src: res,
// success(obj) {
// wx.showShareImageMenu({
// path: obj.path
// })
// },
// fail() { }
// })
// })
// },
// handleJumpH5(e) {
// const { item } = e.currentTarget.dataset
// wx.$router.jumpH5(item.activityUrl)
// },
// async download(e) {
// const { item } = e.currentTarget.dataset
// if (item.mockPoster) {
// item.posterUrl = item.mockPoster
// this.setData({
// crowdPosterItem: item,
// isShowTip: false
// })
// return
// }
// wx.$api.showLoading('加载中...')
// outputApi
// .getPosterUrl({
// id: item.activityId
// })
// .then(res => {
// item.posterUrl = res
// this.setData({
// crowdPosterItem: item,
// isShowTip: false
// })
// })
// .catch(() => {
// wx.$api.showToast('下载海报失败')
// })
// // }
// },
/**长按海报 */
// async longtouch(e) {
// console.log('长按海报', e)
// let { activityId } = e.detail
// const res = await outputApi.reportPosterTrack({
// activityId
// })
// this.triggerEvent('posterTrack')
// },
/**长按战报/喜报 */
// async handlePosterTouch(e) { },
/**战报 */
// handleReport(e) {
// const { item, idx } = e.currentTarget.dataset
// wx.$api.showLoading('战报生成中')
// outputApi
// .getNewReportUrl({ activityId: item.activityId })
// .then(res => {
// // console.log(res)
// if (!res.url) {
// wx.$api.showToast('战报生成失败')
// return true
// }
// var posterItem = {
// ...item,
// posterUrl: res.url,
// updatedTime: deleteSecond(res.updatedDate),
// type: 'warReport'
// }
// this.setData({
// crowdPosterItem: posterItem,
// isShowTip: false
// })
// wx.$api.hideLoading()
// this.triggerEvent('handleZhanReport', { item: item, idx: idx, posterItem: posterItem })
// })
// .catch(() => {
// wx.$api.showToast('下载战报失败')
// })
// .finally(() => {
// wx.$api.hideLoading()
// })
// },
/**喜报 */
// handleXiReport(e) {
// const { item } = e.currentTarget.dataset
// wx.$api.showLoading('喜报生成中')
// outputApi
// .getNewGoodUrl({ activityId: item.activityId })
// .then(res => {
// if (!res.goodUrl) {
// wx.$api.showToast('暂无喜报')
// return true
// }
// var posterItem = {
// ...item,
// posterUrl: res.goodUrl,
// updatedTime: res.goodReportDate ? deleteSecond(res.goodReportDate) : '',
// type: 'warReport'
// }
// this.setData({
// crowdPosterItem: posterItem
// })
// wx.$api.hideLoading()
// })
// .catch(() => {
// wx.$api.showToast('下载喜报失败')
// })
// .finally(() => {
// // wx.$api.hideLoading()
// })
// // var posterItem = {
// // ...item,
// // posterUrl: item.goodUrl,
// // // date: item.goodReportDate,
// // updatedTime: deleteSecond(item.goodReportDate),
// // type: 'warReport'
// // }
// // this.setData({
// // // posterItem: posterItem,
// // // isShowPoster: true,
// // crowdPosterItem: posterItem,
// // isShowTip: false
// // })
// }
}
})
{
"component": true,
"usingComponents": {}
}
/* packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxss */
.crowdfund-layout {
margin: 20rpx 20rpx;
padding-bottom: 136rpx;
.crowdfund-box {
background: #FFFFFF;
border-radius: 8rpx;
margin-bottom: 20rpx;
padding: 0;
}
.flex {
display: flex;
}
.order {
background: #FFFAFA;
display: flex;
justify-content: space-between;
align-items: center;
&-block {
width: 33.3%;
text-align: center;
font-weight: 500;
font-size: 28rpx;
color: #393B3E;
padding: 20rpx 0;
}
&-txt {
height: 40rpx;
line-height: 40rpx;
margin-bottom: 14rpx;
font-weight: 700;
// font-family: 'number';
}
&-label {
font-size: 20rpx;
color: #8A8C90;
}
}
.merchant {
padding: 0 32rpx 32rpx;
.head {
box-sizing: border-box;
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
// height: 70rpx;
// line-height: 70rpx;
padding: 16rpx 0;
line-height: 40rpx;
font-size: 28rpx;
font-weight: 600;
border-bottom: 1rpx dashed #CCCED1;
margin-bottom: 16rpx;
&-title {
width: 70%;
}
&-link {
font-size: 24rpx;
color: #3666FE;
line-height: 37rpx;
}
.icon-download {
width: 36rpx;
height: 36rpx;
vertical-align: middle;
}
.down-tips {
position: absolute;
right: -40rpx;
top: -50rpx;
height: 52rpx;
line-height: 52rpx;
font-size: 20rpx;
color: #FFFFFF;
background: rgba(0, 0, 0, 0.60);
padding: 0 16rpx;
border-radius: 12rpx;
font-weight: 500;
&::after {
display: inline-block;
content: '';
position: absolute;
bottom: -28rpx;
right: 40rpx;
width: 0;
height: 0;
border: 18rpx solid;
border-color: #686868 transparent transparent;
}
}
}
.content {
// 表单
&-row {
display: flex;
height: 40rpx;
line-height: 40rpx;
font-size: 26rpx;
color: #8A8C90;
margin-bottom: 16rpx;
}
&-label {
width: 156rpx;
flex-shrink: 0;
margin-right: 16rpx;
}
&-txt {
color: #323436;
}
&-txt.red {
color: #F35251;
}
// 排名
&-rank {
background: #F7F8FC;
border-radius: 20rpx;
margin-top: 16rpx;
padding: 0 12rpx;
.rank-title {
position: relative;
height: 72rpx;
line-height: 72rpx;
text-align: center;
font-size: 26rpx;
color: #5A6066;
font-weight: 600;
border-bottom: 1rpx solid rgba(204, 206, 209, 0.50);
// .activity-status {
// position: absolute;
// top: 0;
// right: 22rpx;
// font-size: 24rpx;
// }
}
.rank-table {
color: #5A6066;
font-size: 20rpx;
.rank {
display: flex;
justify-content: space-between;
height: 64rpx;
padding: 20rpx 16rpx;
border-bottom: 1rpx dotted rgba(204, 206, 209, 0.50);
.rank-left {
display: flex;
}
&-num {
width: 40rpx;
line-height: 64rpx;
text-align: center;
}
.rank-head {
position: relative;
width: 64rpx;
height: 64rpx;
margin-right: 12rpx;
.icon-wechat {
position: absolute;
bottom: -4rpx;
right: -4rpx;
width: 40rpx;
height: 40rpx;
}
image {
width: 100%;
height: 100%;
border-radius: 50%;
}
}
.rank-content {
font-size: 20rpx;
.rank-row {
position: relative;
display: flex;
height: 32rpx;
line-height: 32rpx;
margin-bottom: 8rpx;
.down-tips {
position: absolute;
left: -116rpx;
top: -60rpx;
height: 52rpx;
line-height: 52rpx;
font-size: 20rpx;
color: #FFFFFF;
background: rgba(0, 0, 0, 0.60);
padding: 0 16rpx;
border-radius: 12rpx;
font-weight: 500;
&::after {
display: inline-block;
content: '';
position: absolute;
bottom: -27rpx;
right: 67rpx;
width: 0;
height: 0;
border: 18rpx solid;
border-color: #686868 transparent transparent;
}
}
.rank-row-name {
max-width: 200rpx;
font-size: 24rpx;
color: #3666FE;
margin-right: 12rpx;
}
.name-disabled {
max-width: 200rpx;
font-size: 24rpx;
color: #5A6066;
margin-right: 12rpx;
}
&-dept {
color: #8A8C90;
}
&-txt {
color: rgba(90, 96, 102, 1);
padding: 0 10rpx 0 0;
}
&-txt::after {
display: inline-block;
content: '';
background-color: #CCCED1;
width: 1.2rpx;
height: 54%;
margin-left: 10rpx;
}
&-txt:last-child::after {
background-color: transparent;
}
}
.rank-row:last-child {
margin-bottom: 0;
}
}
.rank-price {
text-align: right;
font-size: 26rpx;
color: #8A8C90;
height: 64rpx;
line-height: 64rpx;
}
.txt-red {
color: #F35251;
}
// .th,
// .td {
// width: calc((100% - 116rpx) / 4);
// .icon-rank {
// width: 24rpx;
// height: 24rpx;
// vertical-align: middle;
// padding-right: 4rpx;
// }
// }
}
.rank:last-child {
border: none;
}
.tr-no-data {
text-align: center;
height: 32rpx;
line-height: 32rpx;
padding-bottom: 16rpx;
}
.btn-more {
height: 56rpx;
line-height: 56rpx;
// color: #5A6066;
// border: 2rpx solid #EEEEEE;
// border-radius: 28rpx;
text-align: center;
margin: 0 20rpx;
.icon-more {
width: 92rpx;
height: 36rpx;
}
}
}
}
// 建议
&-suggest {
margin-top: 32rpx;
.suggest-title {
width: 116rpx;
height: 36rpx;
line-height: 36rpx;
font-weight: 600;
font-size: 20rpx;
color: #3E71FE;
background: rgba(62, 113, 254, 0.12);
border-radius: 4rpx;
}
.suggest-txt {
font-size: 24rpx;
color: #323436;
line-height: 40rpx;
margin: 12rpx 0 16rpx;
}
.suggest-block {
line-height: 40rpx;
background: #FFF9F2;
border-radius: 20rpx;
padding: 16rpx;
.suggest-step {
display: flex;
.step-label {
width: 54rpx;
font-size: 20rpx;
color: #323436;
margin-right: 18rpx;
}
.step-txt {
width: calc(100% - 72rpx);
font-size: 22rpx;
color: #8A8C90;
}
}
}
}
// 战报
.new-report {
display: flex;
margin-top: 20rpx;
height: 52rpx;
line-height: 52rpx;
font-size: 20rpx;
color: #5A6066;
.report-left {
box-sizing: border-box;
display: flex;
font-size: 20rpx;
color: #3666FE;
padding: 0 20rpx;
height: 100%;
background: rgba(54, 102, 254, 0.06);
border: 2rpx solid rgba(62, 113, 254, 0.70);
border-radius: 30rpx;
margin-right: 4rpx;
.icon-report {
width: 32rpx;
height: 32rpx;
vertical-align: middle;
margin-top: -2rpx;
}
}
}
}
}
}
.downloadIcon {
width: 40rpx;
height: 40rpx;
}
// .totalAmount{
// font-family: 'number';
// }
\ No newline at end of file \ No newline at end of file
<!-- packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxml -->
<wxs src="./index.wxs" module="filter" />
<view class="crowdfund-layout">
<view class="crowdfund-box order">
<view class="order-block" wx:for="{{orderFormList}}" wx:key="index">
<view class="order-txt font-number">
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>
<text wx:if="{{item.name == 'totalAmount'}}">{{filter.money_three_for_two_thousands(orderObj[item.name] || 0.00)}}</text>
<text wx:else>{{orderObj[item.name]}}</text>
</view>
<view class="order-label">{{item.label}}</view>
</view>
</view>
<view class="crowdfund-box merchant" wx:for="{{orderObj.activityList}}" wx:key="index">
<view class="head">
<!-- text-hide -->
<view class=" head-title" bindtap="handleJumpH5" data-item="{{item}}">
{{item.activityName}}
</view>
<!-- <view class="head-link" bindtap="download" data-item="{{item}}">
<image src="{{IMAGES.download}}" class="downloadIcon" webp></image>
母链海报
</view> -->
<!-- <view class="down-tips" wx:if="{{index == 0 && isShowTip}}">下载活动海报分享给门店开展活动</view> -->
</view>
<view class="content">
<view class="content-row" wx:for="{{merchantFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="content-label">{{subItem.label}}</view>
<view class="content-txt {{subItem.className}}">
<text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text>
{{subItem.isNumber ? filter.money_three_for_two_thousands(item[subItem.name]) : item[subItem.name]}}
</view>
</view>
<!-- 排名 -->
<!-- <view class="content-rank" wx:if="{{item.showStaffList.length}}">
<view class="rank-title">员工任务排名</view>
<view class="rank-table">
<view wx:for="{{item.showStaffList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="rank">
<view class="rank-left">
<view class="rank-num">{{idx + 1}}</view>
<view class="rank-head">
<glsx-image wx:if="{{subItem.shareType == 1}}" class="icon-wechat" src="output/icon-wechat.webp" />
<image wx:if="{{subItem.imageUrl}}" src="{{subItem.imageUrl}}" />
<glsx-image wx:else src="output/icon-head.webp" />
</view>
<view class="rank-content">
<view class="rank-row">
<text wx:if="{{subItem.goodUrl}}" class="rank-row-name text-hide">{{subItem.shareName}}</text>
<text wx:else class="name-disabled text-hide">{{subItem.shareName}}</text>
<text class="rank-row-dept">{{subItem.departmentName || ''}}</text>
</view>
<view class="rank-row">
<text class="rank-row-txt">访客<text class="font-number">{{subItem.browseCount || 0}}</text>人</text>
<text class="rank-row-txt">成交<text class="font-number">{{subItem.dealCount || 0}}</text>单</text>
</view>
</view>
</view>
<view wx:if="{{subItem.totalAmount}}" class="rank-price txt-red font-number">
¥ {{filter.money_three_for_two_thousands(subItem.totalAmount || 0.00)}}
</view>
<view wx:else class="rank-price">暂无业绩</view>
</view>
</view>
<view wx:if="{{item.staffList.length}}" class="btn-more" bindtap="handleMore" data-idx="{{index}}">
<glsx-image class="icon-more" src="output/icon-more.webp" />
</view>
</view>
</view> -->
<!-- 诊断 -->
<!-- <view class="content-suggest" wx:if="{{item.activityStatus == 2 && item.suggestTxtList.length}}">
<view class="suggest-title"># 活动诊断</view>
<view class="suggest-txt">{{item.suggestTxt}}推荐以下建议:</view>
<view class="suggest-block">
<view class="suggest-step" wx:for="{{item.suggestList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="step-label">建议{{idx + 1}}</view>
<view class="step-txt">{{subItem}}</view>
</view>
</view>
</view> -->
<!-- 战报 -->
<!-- <view class="new-report" wx:if="{{item.activityStatus != 1 && hasReport}}">
<view class="report-left" bindtap="handleReport" data-item="{{item}}" data-idx="{{index}}">生成最新战报</view>
<view class="report-left" bindtap="handleXiReport" data-item="{{item}}" data-idx="{{index}}">生成最新喜报</view>
</view> -->
</view>
</view>
</view>
<!-- <crowdfund-poster item="{{crowdPosterItem}}" id="crowdPoster" scrollImg="{{false}}" bindlongtouch="longtouch" /> -->
\ No newline at end of file \ No newline at end of file
// pages/tab/output/components/sortTab/sortTab.js
Component({
/**
* 组件的属性列表
*/
properties: {
title: {
type: String,
value: '合作门店'
},
sceneCode: {
type: String,
value: '-1'
}
},
/**
* 组件的初始数据
*/
data: {
// 全部-1;精品升级SC002;会员权益/升级SC001
// asc:1-升序,2-降序
obj: {
'-1': [{
label: '精品升级',
asc: '',
value: 1
}, {
label: '售后众筹',
asc: '',
value: 2
}, {
label: '车损权益升级',
asc: '',
value: 3
}],
'SC002': [{
label: '营业额',
asc: '',
value: 4
}, {
label: '升级客单价',
asc: '',
value: 5
}, {
label: '到店贴膜量',
asc: '',
value: 6
}, {
label: '升级订单',
asc: '',
value: 7
}, {
label: '战败订单',
asc: '',
value: 8
}, {
label: '转化率',
asc: '',
value: 9
}],
'SC001': [{
label: '营业额',
asc: '',
value: 4
}, {
label: '推荐客户量',
asc: '',
value: 5
}, {
label: '成交客户量',
asc: '',
value: 6
}, {
label: '融合客单价',
asc: '',
value: 7
}, {
label: '权益客单价',
asc: '',
value: 8
}, {
label: '转化率',
asc: '',
value: 9
}]
}
},
lifetimes: {
attached() {
console.log(this.data.obj[this.data.sceneCode])
}
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/output/components/sortTab/sortTab.wxss */
.sort-tab {
display: flex;
box-sizing: border-box;
width: 100vw;
height: 86rpx;
line-height: 86rpx;
background-color: #FFFFFF;
padding: 0 20rpx;
.title {
width: 196rpx;
flex-shrink: 0;
}
.sort-scroll {
display: flex;
width: calc(100% - 196rpx);
.item {
display: inline-block;
}
}
}
\ No newline at end of file \ No newline at end of file
<!--pages/tab/output/components/sortTab/sortTab.wxml-->
<view class="sort-tab">
<ciew class="title">{{title}}</ciew>
<scroll-view class="sort-scroll" scroll-x="true">
<view wx:for="{{obj[sceneCode]}}" wx:key="index" class="item">
<view>{{item.label}}</view>
<view>111</view>
</view>
</scroll-view>
</view>
\ 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!