Commit d229ccfa by 张立顺

看产品样式修改

1 parent 59ef301c
<wxs src="./Tab.wxs" module="filterUtils" />
<block wx:if="{{openScroll}}">
<scroll-view
class="tab-box {{align}} {{outClassName}}"
style="{{productHeight ? 'height: 72rpx;' : ''}}"
scroll-x
enable-flex
scroll-with-animation
scroll-into-view="{{to}}"
enhanced="{{true}}"
show-scrollbar="{{false}}">
<block wx:for="{{tab}}" wx:key="index">
<view
class="tab {{index==count?'active':''}}"
bindtap="click"
data-count="{{index}}"
id="to-{{index}}"
>
<view class="text" style="{{productHeight ? 'height: 60rpx;' : ''}}">{{item}}</view>
<!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> -->
<view class="line" style="{{productHeight ? 'height: 4rpx;' : ''}}" />
</view>
</block>
</scroll-view>
<scroll-view class="tab-box {{align}} {{outClassName}}" style="{{productHeight ? 'height: 72rpx;' : ''}}" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}" enhanced="{{true}}" show-scrollbar="{{false}}">
<block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index==count?'active':''}}" bindtap="click" data-count="{{index}}" id="to-{{index}}">
<view class="text" style="{{productHeight ? 'height: 60rpx;' : ''}}">{{item}}</view>
<!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> -->
<view class="line" style="{{productHeight ? 'height: 4rpx;' : ''}}" />
</view>
</block>
</scroll-view>
</block>
<block wx:else>
<view class="tab-box flex" style="{{tabHeight ? 'height: 60rpx;' : ''}}">
<block wx:for="{{tab}}" wx:key="index">
<view
class="tab {{index==count?'active':''}}"
style="width:{{itemWidth}}; {{index == 0 ? 'margin-left: 32rpx;' : ''}}"
bindtap="click"
data-count="{{index}}"
>
<view class="text text-center" style="{{tabHeight ? 'height: 60rpx;' : ''}}">
{{item}}
</view>
<view class="line" style="{{tabHeight ? 'margin-top: 6rpx;' : ''}}" />
<!-- -->
<view wx:if="{{filterUtils.hasRedpoint(unreadClueCount)}}" class="redpoint" />
</view>
</block>
</view>
</block>
<view class="tab-box flex" style="{{tabHeight ? 'height: 60rpx;' : ''}}">
<block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index==count?'active':''}}" style="width:{{itemWidth}}; {{index == 0 ? 'margin-left: 32rpx;' : ''}}" bindtap="click" data-count="{{index}}">
<view class="text text-center" style="{{tabHeight ? 'height: 60rpx;' : ''}}">{{item}}</view>
<view class="line" style="{{tabHeight ? 'margin-top: 6rpx;' : ''}}" />
<!-- -->
<view wx:if="{{filterUtils.hasRedpoint(unreadClueCount)}}" class="redpoint" />
</view>
</block>
</view>
</block>
\ No newline at end of file
......@@ -32,6 +32,7 @@
box-sizing: border-box;
color: #A9A9A9;
justify-content: center;
font-size: 28rpx;
}
.left .text {
......@@ -71,9 +72,11 @@
height: 0;
color: transparent;
}
.active .redpoint{
.active .redpoint {
display: none;
}
.redpoint {
position: absolute;
top: 10px;
......@@ -85,19 +88,22 @@
background: #EB4E4E;
border-radius: 50%;
}
/* 外部出进来的自定义样式 */
.project-tab{
.project-tab {
padding-left: 20px;
padding-right: 20px;
}
.project-tab .tab {
margin-right: 28px;
}
.project-tab .tab.active .text {
font-size: 28rpx;
color: var(--btnColor);
}
.project-tab .tab .line{
width:auto;
}
.project-tab .tab .line {
width: auto;
}
\ No newline at end of file
......@@ -2,6 +2,9 @@
import wxqrcode from '~/utils/lib/wxqrcode'
import { IMG_URL } from '~/utils/constantData'
import outputApi from '~/api/outputApi/index'
const IMAGES = Object.freeze({
download: `${IMG_URL}/output/download.webp`
})
Component({
/**
* 组件的属性列表
......@@ -9,11 +12,11 @@ Component({
properties: {
orderObj: {
type: Object,
value: () => { },
value: () => {},
observer(n) {
n && this.dealStaffList()
}
},
}
},
/**
......@@ -21,55 +24,72 @@ Component({
*/
data: {
IMGURL: IMG_URL,
orderFormList: [{
label: '总场次',
name: 'totalNum'
}, {
label: '总订单',
name: 'totalOrderCount'
}, {
label: '成交金额',
name: 'totalAmount',
prefix: '¥'
}],
merchantFormList: [{
label: '活动时间',
name: 'time'
}, {
label: '订单数',
name: 'orderCount'
}, {
label: '产值',
name: 'realAmount',
className: 'red',
prefix: '¥'
}, {
label: '预估产值',
name: 'predictAmount',
prefix: '¥'
}],
tableHeadList: [{
label: '',
width: '',
width: '28rpx'
}, {
label: '业务员',
name: 'shareName',
}, {
label: '转发',
name: 'shareCount',
}, {
label: '浏览',
name: 'browseCount'
}, {
label: '成交',
name: 'dealCount',
width: '92rpx'
}, {
label: '产值',
name: 'totalAmount',
prefix: '¥'
}]
IMAGES,
orderFormList: [
{
label: '总场次',
name: 'totalNum'
},
{
label: '总订单',
name: 'totalOrderCount'
},
{
label: '成交金额',
name: 'totalAmount',
prefix: '¥'
}
],
merchantFormList: [
{
label: '活动时间',
name: 'time'
},
{
label: '订单数',
name: 'orderCount'
},
{
label: '产值',
name: 'realAmount',
className: 'red',
prefix: '¥'
},
{
label: '预估产值',
name: 'predictAmount',
prefix: '¥'
}
],
tableHeadList: [
{
label: '',
width: '',
width: '28rpx'
},
{
label: '业务员',
name: 'shareName'
},
{
label: '转发',
name: 'shareCount'
},
{
label: '浏览',
name: 'browseCount'
},
{
label: '成交',
name: 'dealCount',
width: '92rpx'
},
{
label: '产值',
name: 'totalAmount',
prefix: '¥'
}
]
},
/**
......@@ -78,12 +98,13 @@ Component({
methods: {
dealStaffList() {
var list = this.data.orderObj
list && list.activityList?.forEach(item => {
// 0-未开始;1-活动中;2-已结束
let sliceNum = item.actStatus == 2 ? 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) : []
})
list &&
list.activityList?.forEach(item => {
// 0-未开始;1-活动中;2-已结束
let sliceNum = item.actStatus == 2 ? 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
})
......@@ -129,8 +150,7 @@ Component({
path: obj.path
})
},
fail() {
}
fail() {}
})
})
},
......@@ -143,7 +163,6 @@ Component({
posterItem: item
})
})
}
}
})
......@@ -43,11 +43,14 @@
padding: 0 32rpx 32rpx;
.head {
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
height: 70rpx;
line-height: 70rpx;
// height: 70rpx;
// line-height: 70rpx;
padding: 16rpx 0;
line-height: 40rpx;
font-size: 28rpx;
font-weight: 600;
border-bottom: 1rpx dashed #CCCED1;
......@@ -60,7 +63,8 @@
&-link {
font-size: 24rpx;
color: #3666FE;
line-height: 32rpx;
// line-height: 32rpx;
line-height: 37rpx;
}
}
......@@ -205,4 +209,9 @@
}
}
}
}
.downloadIcon {
width: 40rpx;
height: 40rpx;
}
\ No newline at end of file
<!--packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxml-->
<!-- packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxml -->
<view class="layout">
<view class="box order">
<view class="order-block" wx:for="{{orderFormList}}" wx:key="index">
<view class="order-txt">
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>
{{orderObj[item.name] || 0}}
</view>
<view class="order-label">{{item.label}}</view>
</view>
</view>
<view class="box merchant" wx:for="{{orderObj.activityList}}" wx:key="index">
<view class="head">
<view class="text-hide head-title">{{item.activityName}}</view>
<view class="head-link" bindtap="download" data-item="{{item}}">下载海报</view>
<!-- <view class="head-link" bindtap="handleCopy" data-idx="{{index}}">复制活动链接</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>
{{item[subItem.name]}}
</view>
</view>
<!-- 排名 -->
<view class="content-rank">
<view class="rank-head">
<view>员工转发数据排名</view>
<view class="activity-status" wx:if="{{item.actStatus == 0}}">距离开始{{item.interDays}}天</view>
<view class="activity-status" wx:if="{{item.actStatus == 1}}">已开始{{item.interDays}}天</view>
<view class="activity-status" wx:if="{{item.actStatus == 2 && item.interDays < 8}}">已结束{{item.interDays}}天</view>
</view>
<view class="rank-table">
<view class="tr">
<view class="th" style="width: {{subItem.width || ''}};" wx:for="{{tableHeadList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">{{subItem.label}}</view>
</view>
<view wx:if="{{item.showStaffList.length}}">
<block wx:for="{{item.showStaffList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="tr">
<view class="td" style="width: {{i.width || ''}};" wx:for="{{tableHeadList}}" wx:for-item="i" wx:for-index="j" wx:key="j">
<view wx:if="{{j == 0}}">
<image class="icon-rank" src="{{IMGURL}}output/rank0{{idx + 1}}.png?v={{img_version}}"></image>
</view>
<text wx:if="{{i.prefix}}">{{i.prefix}}</text>
{{subItem[i.name]}}
</view>
</view>
</block>
<view wx:if="{{item.staffList.length}}" class="btn-more" bindtap="handleMore" data-idx="{{index}}">查看更多</view>
</view>
<view class="tr-no-data" wx:else>暂无数据</view>
</view>
</view>
<!-- 诊断 -->
<view class="content-suggest" wx:if="{{item.actStatus == 1 && item.suggestTxtList.length}}">
<view class="suggest-title"># 活动诊断</view>
<view class="suggest-txt">
<!-- <text wx:if="{{item.toEndDays < 8}}">距离活动结束剩余{{item.interDays}}天,</text> -->
{{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>
</view>
<view class="box order">
<view class="order-block" wx:for="{{orderFormList}}" wx:key="index">
<view class="order-txt">
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>
{{orderObj[item.name] || 0}}
</view>
<view class="order-label">{{item.label}}</view>
</view>
</view>
<view class="box merchant" wx:for="{{orderObj.activityList}}" wx:key="index">
<view class="head">
<!-- text-hide -->
<view class=" head-title">{{item.activityName}}</view>
<view class="head-link" bindtap="download" data-item="{{item}}">
<image src="{{IMAGES.download}}" class="downloadIcon" webp></image>
下载海报
</view>
<!-- <view class="head-link" bindtap="handleCopy" data-idx="{{index}}">复制活动链接</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>
{{item[subItem.name]}}
</view>
</view>
<!-- 排名 -->
<view class="content-rank">
<view class="rank-head">
<view>员工转发数据排名</view>
<view class="activity-status" wx:if="{{item.actStatus == 0}}">
距离开始{{item.interDays}}天
</view>
<view class="activity-status" wx:if="{{item.actStatus == 1}}">
已开始{{item.interDays}}天
</view>
<view class="activity-status" wx:if="{{item.actStatus == 2 && item.interDays < 8}}">
已结束{{item.interDays}}天
</view>
</view>
<view class="rank-table">
<view class="tr">
<view
class="th"
style="width: {{subItem.width || ''}};"
wx:for="{{tableHeadList}}"
wx:for-item="subItem"
wx:for-index="idx"
wx:key="idx">
{{subItem.label}}
</view>
</view>
<view wx:if="{{item.showStaffList.length}}">
<block
wx:for="{{item.showStaffList}}"
wx:for-item="subItem"
wx:for-index="idx"
wx:key="idx">
<view class="tr">
<view
class="td"
style="width: {{i.width || ''}};"
wx:for="{{tableHeadList}}"
wx:for-item="i"
wx:for-index="j"
wx:key="j">
<view wx:if="{{j == 0}}">
<image class="icon-rank" src="{{IMGURL}}output/rank0{{idx + 1}}.png?v={{img_version}}" />
</view>
<text wx:if="{{i.prefix}}">{{i.prefix}}</text>
{{subItem[i.name]}}
</view>
</view>
</block>
<view
wx:if="{{item.staffList.length}}"
class="btn-more"
bindtap="handleMore"
data-idx="{{index}}">
查看更多
</view>
</view>
<view class="tr-no-data" wx:else>暂无数据</view>
</view>
</view>
<!-- 诊断 -->
<view class="content-suggest" wx:if="{{item.actStatus == 1 && item.suggestTxtList.length}}">
<view class="suggest-title"># 活动诊断</view>
<view class="suggest-txt">
<!-- <text wx:if="{{item.toEndDays < 8}}">距离活动结束剩余{{item.interDays}}天,</text> -->
{{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>
</view>
</view>
<crowdfund-poster item="{{posterItem}}"/>
\ No newline at end of file
<crowdfund-poster item="{{posterItem}}" />
......@@ -34,7 +34,7 @@
.title {
font-size: 32rpx;
font-weight: 600;
padding: 12rpx 20rpx 12rpx 40rpx;
padding: 12rpx 20rpx 12rpx 20rpx;
border-bottom: 1rpx dashed #CCCED1;
}
......@@ -43,10 +43,10 @@
}
scroll-view ::-webkit-scrollbar {
display:none;
width:0;
height:0;
color:transparent;
display: none;
width: 0;
height: 0;
color: transparent;
}
.activity-box {
......@@ -95,9 +95,16 @@
font-weight: 400;
.select {
display: flex;
align-items: center;
font-size: 24rpx;
color: #323436;
.select-txt {
line-height: 40rpx;
}
.icon-arrow {
width: 24rpx;
height: 24rpx;
......@@ -144,4 +151,8 @@
border-radius: 8rpx;
}
}
}
.summary .layout .p-l-20 {
padding: 12rpx 40rpx;
}
\ No newline at end of file
<!--packageOutput/pages/summary/summary.wxml-->
<!-- packageOutput/pages/summary/summary.wxml -->
<view class="summary">
<view class="layout {{ (sceneActive == 4 && activityList[activityActive].productStatus == 2) ? 'bg-grey' : 'bg-white'}}">
<view class="{{ (sceneActive == 4 && activityList[activityActive].productStatus == 2) ? 'bg-white' : 'p-rl-20'}}">
<view class="{{ (sceneActive == 4 && activityList[activityActive].productStatus == 2) ? 'm-rl-20' : ''}}">
<view class="title bg-white">选产品/活动</view>
<view class="scene-box bg-white">
<scene-box formData="{{sceneObj}}" scenePriceList="{{scenePriceList}}" sceneActive="{{sceneActive}}" bindhandleSceneChange="handleSceneChange"></scene-box>
</view>
</view>
</view>
<!-- 活动 -->
<view class="p-rl-20 bg-white">
<scroll-view 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.productStatus == 2 ? 'open' : 'no-open'}}" wx:for="{{activityList}}" wx:key="index" bindtap="handleActChange" data-idx="{{index}}">{{item.productName}}</view>
</view>
</scroll-view>
</view>
<!-- 活动内容 -->
<view class="activity-content {{ (sceneActive == 4 && activityList[activityActive].productStatus == 2) ? '' : 'p-rl-20'}}">
<view wx:if="{{activityList[activityActive].productStatus == 2 && sceneActive != 1}}">
<view class="activity-title title bg-white {{ sceneActive == 4 ? 'no-border' : ''}}">
<view>看产值</view>
<view class="select" bindtap="handleSearch">
<text wx:if="{{sceneActive == 2 || sceneActive == 3}}" class="select-txt">{{baseData.timeList[sceneActive == 2 ? searchForm.scene2Idx : searchForm.scene3Idx]}}</text>
<text wx:if="{{sceneActive == 4}}" class="select-txt">{{baseData.actStatusList[searchForm.scene4Idx]}}</text>
<image class="icon-arrow" src="{{IMGURL}}output/arrow.png?v={{img_version}}"></image>
</view>
</view>
<output-transform wx:if="{{sceneActive == 2 || sceneActive == 3}}" formData="{{activityList[activityActive].orderTotal}}"></output-transform>
<output-crowdfund wx:if="{{sceneActive == 4}}" orderObj="{{activityList[activityActive].outputData}}"></output-crowdfund>
</view>
<view wx:else class="content-empty bg-white">
<image class="img-empty" src="{{IMGURL}}output/sum-empty.png?v={{img_version}}" />
</view>
</view>
</view>
<view wx:if="{{sceneActive != 1}}">
<view class="isFullSucreen btn" wx:if="{{ activityList[activityActive].productStatus != 2 && !merchantInfo.isSuper}}">
<view class="btn-blue" bindtap="handleJump">点击开通</view>
</view>
</view>
<view class="isFullSucreen btn" wx:if="{{sceneActive == 1}}">
<view class="btn-disabled">点击开通</view>
</view>
</view>
\ No newline at end of file
<view class="layout {{ (sceneActive == 4 && activityList[activityActive].productStatus == 2) ? 'bg-grey' : 'bg-white'}}">
<view class="{{ (sceneActive == 4 && activityList[activityActive].productStatus == 2) ? 'bg-white' : 'p-rl-20'}}">
<view class="{{ (sceneActive == 4 && activityList[activityActive].productStatus == 2) ? 'm-rl-20' : ''}}">
<view class="title bg-white ">选产品/活动</view>
<view class="scene-box bg-white">
<scene-box
formData="{{sceneObj}}"
scenePriceList="{{scenePriceList}}"
sceneActive="{{sceneActive}}"
bindhandleSceneChange="handleSceneChange" />
</view>
</view>
</view>
<!-- 活动 -->
<view class="p-rl-20 bg-white">
<scroll-view
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.productStatus == 2 ? 'open' : 'no-open'}}"
wx:for="{{activityList}}"
wx:key="index"
bindtap="handleActChange"
data-idx="{{index}}">
{{item.productName}}
</view>
</view>
</scroll-view>
</view>
<!-- 活动内容 -->
<view class="activity-content {{ (sceneActive == 4 && activityList[activityActive].productStatus == 2) ? '' : 'p-rl-20'}}">
<view wx:if="{{activityList[activityActive].productStatus == 2 && sceneActive != 1}}">
<view class="activity-title title bg-white p-l-20 {{ sceneActive == 4 ? 'no-border' : ''}}">
<view>看产值</view>
<view class="select" bindtap="handleSearch">
<view wx:if="{{sceneActive == 2 || sceneActive == 3}}" class="select-txt">
{{baseData.timeList[sceneActive == 2 ? searchForm.scene2Idx : searchForm.scene3Idx]}}
</view>
<view wx:if="{{sceneActive == 4}}" class="select-txt">
{{baseData.actStatusList[searchForm.scene4Idx]}}
</view>
<image class="icon-arrow" src="{{IMGURL}}output/arrow.png?v={{img_version}}" />
</view>
</view>
<output-transform wx:if="{{sceneActive == 2 || sceneActive == 3}}" formData="{{activityList[activityActive].orderTotal}}" />
<output-crowdfund wx:if="{{sceneActive == 4}}" orderObj="{{activityList[activityActive].outputData}}" />
</view>
<view wx:else class="content-empty bg-white">
<image class="img-empty" src="{{IMGURL}}output/sum-empty.png?v={{img_version}}" />
</view>
</view>
</view>
<view wx:if="{{sceneActive != 1}}">
<view class="isFullSucreen btn" wx:if="{{ activityList[activityActive].productStatus != 2 && !merchantInfo.isSuper}}">
<view class="btn-blue" bindtap="handleJump">点击开通</view>
</view>
</view>
<view class="isFullSucreen btn" wx:if="{{sceneActive == 1}}">
<view class="btn-disabled">点击开通</view>
</view>
</view>
......@@ -59,7 +59,7 @@
.head {
position: relative;
height: 40rpx;
// height: 40rpx;
line-height: 40rpx;
font-size: 28rpx;
color: #323436;
......
......@@ -18,7 +18,7 @@
bindtap="handleJump"
data-idx="{{index}}">
<view class="head flex-between">
<view class="name text-hide">{{item.merchantName}}</view>
<view class="name ">{{item.merchantName}}</view>
<view class="price-txt ">¥{{item.totalMoney}}</view>
</view>
<!-- 场景内容 -->
......
......@@ -62,6 +62,12 @@ Component({
attached() {
this.initTime()
this.init()
},
onPullDownRefresh() {
console.log('refresh')
// setTimeout(function () {
// uni.stopPullDownRefresh()
// }, 1000)
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!