Commit 22a79853 by chenwq

冗余代码;样式

1 parent bcaf70f3
......@@ -107,7 +107,6 @@ Component({
totalAmount: data.totalAmount,
activityList: data.activityList || []
}
console.log(data)
_obj.activityList.forEach(k => {
// 时间
k.time = k.startTime.slice(0, 16).replace(/-/g, '.') + ' - ' + k.endTime.slice(0, 16).replace(/-/g, '.')
......@@ -152,15 +151,10 @@ Component({
let params = {
...busiSearchData,
...sortSearchData,
// serviceMerchantId: userInfo.merchantId
serviceMerchantId: userInfo.subLoginUser.merchantId
// serviceMerchantId: '44184606'
// merchantIds: ['44211227', '44211547', '10011000', '44184606', '44209535']
}
console.log(params, 'params--')
outputApi.getBusiStatistics(params).then(res => {
this.resetBusiData()
// console.log(res, '汇总----')
if (isReset) {
this.setData({
busiScrollTop: 0
......@@ -176,7 +170,6 @@ Component({
switch (formData.sceneCode) {
case '-1':
_list = res.merchantList || []
console.log(_list, '_list---')
// 0:全部-1;1:精品升级SC002;2:售后众筹SC004;3:会员权益/升级SC001
let _openList = [{
code: 'SC002',
......
......@@ -67,7 +67,7 @@
</view>
<!-- 售后众筹 -->
<view class="output-box" wx:if="{{formData.sceneCode == 'SC004'}}">
<output-crowdfund wx:if="{{formData.sceneCode == 'SC004'}}" orderObj="{{crowdOrderObj}}"></output-crowdfund>
<output-crowdfund wx:if="{{formData.sceneCode == 'SC004'}}" orderObj="{{crowdOrderObj}}" proIdx="{{formData.proIdx}}"></output-crowdfund>
<view class="end-txt">
{{ crowdOrderObj.activityList.length ? '到底啦!' : '暂无数据' }}
</view>
......
// 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`
})
......@@ -13,14 +10,15 @@ Component({
properties: {
orderObj: {
type: Object,
value: () => { },
observer(n) {
// n && this.dealStaffList()
}
value: () => { }
},
hasReport: {
type: Boolean,
value: true
},
proIdx: {
type: String,
value: '0'
}
},
......@@ -80,215 +78,10 @@ Component({
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
// // })
// }
}
methods: {}
})
<!-- packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxml -->
<wxs src="../index.wxs" module="filter" />
<view class="crowdfund-layout">
<view class="crowdfund-box order">
<view wx:if="{{proIdx == '0'}}" class="profit-box flex-between">
<text>总收益</text>
<text class="price-txt">¥{{filter.money_three_for_two_thousands(orderObj[item.name] || 0.00)}}</text>
</view>
<view wx:else 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>
......@@ -16,11 +20,6 @@
<!-- text-hide -->
<glsx-image src="output/icon-head.png" class="icon" />
<view class="head-title">{{item.merchantName}}</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-title" data-item="{{item}}">
......@@ -33,59 +32,6 @@
{{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
</view>
\ 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!