Commit c6395c24 by 前端
2 parents 06bbdbcf 865d525a
......@@ -11,7 +11,6 @@ Component({
sfaffList: {
type: Object,
observer(val) {
console.log(val, 'sfaffList')
this.getDetail(val)
this.filterStaff = val
this.setData({
......@@ -160,7 +159,6 @@ Component({
return item[k]
},
transferName: (item) => {
console.log(item)
let arr = []
item.avatar&&item.avatar.forEach((val, index) => {
arr.push({
......
.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: 128rpx;
text {
display: inline-block;
width: 100rpx;
}
.up-icon {
width: 14rpx;
height: 8rpx;
vertical-align: middle;
}
}
.up-box {
position: absolute;
width: 128rpx;
background: #FFFFFF;
box-shadow: 0 0 18rpx 0 #3a596a1c;
border-radius: 8rpx;
z-index: 10;
.up-item {
flex: auto;
font-weight: 400;
font-size: 20rpx;
color: #666666;
line-height: 53rpx;
&.checked {
color: #708CFF;
}
}
}
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: 128rpx;
text {
display: inline-block;
width: 100rpx;
}
}
.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;
.up-icon {
width: 14rpx;
height: 8rpx;
vertical-align: middle;
}
}
.up-box {
position: absolute;
width: 128rpx;
background: #FFFFFF;
box-shadow: 0 0 18rpx 0 #3a596a1c;
border-radius: 8rpx;
z-index: 10;
.up-item {
flex: auto;
font-weight: 400;
font-size: 20rpx;
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;
input {
height: 64rpx;
line-height: 64rpx;
color: #999999;
flex: 1;
}
}
}
.table {
display: flex;
display: flex;
}
.table_left_column {
min-width: 150rpx;
height: auto;
display: flex;
flex-direction: column;
min-width: 150rpx;
height: auto;
display: flex;
flex-direction: column;
}
.left_col_item {
width: 100%;
height: 63rpx;
font-size: 20rpx;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
width: 100%;
height: 63rpx;
font-size: 20rpx;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #1B233D;
background: #F9F9F9;
&:first-child {
font-weight: 600;
font-size: 24rpx;
color: #1B233D;
background: #F9F9F9;
&:first-child {
font-weight: 600;
font-size: 24rpx;
color: #1B233D;
}
}
&:nth-child(2n) {
background: #ffffff;
}
&:nth-child(2n) {
background: #ffffff;
}
}
.table_right_scroll_box {
display: flex;
white-space: nowrap;
overflow-x: scroll;
display: flex;
white-space: nowrap;
overflow-x: scroll;
}
.flex_direction_column_item {
min-width: 200rpx;
display: inline-block;
/* border: 1px solid #000; */
min-width: 200rpx;
display: inline-block;
/* border: 1px solid #000; */
}
.item_name {
min-width: 200rpx;
height: 63rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 20rpx;
min-width: 200rpx;
height: 63rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 20rpx;
color: #1B233D;
background: #F9F9F9;
image {
width: 36rpx;
height: 36rpx;
border-radius: 36rpx;
margin-right: 10rpx;
}
&:first-child {
font-weight: 600;
font-size: 24rpx;
color: #1B233D;
background: #F9F9F9;
}
image {
width: 36rpx;
height: 36rpx;
border-radius: 36rpx;
margin-right: 10rpx;
}
&:nth-child(2n) {
background: #ffffff;
}
}
&:first-child {
font-weight: 600;
font-size: 24rpx;
color: #1B233D;
}
.empty {
margin: 20rpx auto 0;
text-align: center;
&:nth-child(2n) {
background: #ffffff;
}
.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
......@@ -18,7 +18,8 @@
<input placeholder="输入员工名称" value="{{empName}}" bind:blur="hanldBlur"/>
<icon class="icon-small" type="search" size="14"></icon>
</view>
<view class='table'>
<blokc wx:if="{{sfaff[0].list.length}}">
<view class='table'>
<!-- 左侧固定 -->
<view class='table_left_column'>
<view class='left_col_item'>排名</view>
......@@ -37,4 +38,10 @@
</view>
</view>
</view>
</blokc>
<view wx:else class="empty">
<glsx-image webp custom-class="empty-icon" src="store-assistant-assemble/output/empty.png"></glsx-image>
<view class="empty-text">暂无排行榜数据</view>
</view>
</view>
\ No newline at end of file
......@@ -28,4 +28,4 @@
</view>
</scroll-view >
<van-calendar max-range="{{ 30 }}" show="{{ isShow }}" type="range" color="#4466F0" bind:confirm="onConfirm" bind:close="onClose"/>
\ No newline at end of file
<van-calendar max-range="{{ 30 }}" show="{{ isShow }}" type="range" color="#4466F0" bind:confirm="onConfirm" bind:close="onClose" min-date="{{ minDate }}" max-date="{{ maxDate }}"/>
\ No newline at end of file
......@@ -64,31 +64,31 @@ Component({
bottom: 0,
containLabel: true
},
tooltip: {
trigger: 'axis',
triggerOn: "mousemove",
axisPointer: {
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]+20];
// },
formatter: function (item) {
console.log(item)
return `${item[0].value}`
}
},
// 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: {
......@@ -125,6 +125,11 @@ Component({
series: [{
data: yData,
type: 'bar',
label: {
show: true,
position: 'top',
color: this.data.color,
},
color: this.data.color,
itemStyle: {
borderRadius: [50, 50, 0, 0],
......
......@@ -66,6 +66,7 @@ Component({
trigger: 'axis',
triggerOn: "mousemove",
axisPointer: {
type: "none",
lineStyle: {
type: 'solid'
}
......@@ -83,7 +84,6 @@ Component({
// return [pt[0], pt[1]+20];
// },
formatter: function (item) {
console.log(item)
return `${item[0].value}`
}
},
......
......@@ -107,7 +107,7 @@ Page({
dataT[type][timeType]()
ActivityApi[apiName](params).then(res => {
const list = res.employeeOutputList || res.staffList
const arr = new Array(3).fill(1)
const arr = []
const staffList = list.length?Object.assign(arr,list.splice(0,3)):arr
const billboard = staffList.map((item,idx)=>{
return {
......
......@@ -101,7 +101,7 @@
.output-num {
font-weight: 600;
font-size: 44rpx;
font-size: 30rpx;
color: #1B233D;
line-height: 64rpx;
._unit {
......@@ -208,4 +208,22 @@
.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
<!--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="top:{{navHeight}}px; height: calc(100vh - 150rpx)">
<!-- 背景图 -->
<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>
<navigation-bar showBack="{{true}}" navStyle="{{navStyle}}" bindnavbarReady="navbarReady">产值{{timeType=='day'?'日':'月'}}报表</navigation-bar>
<view class="layout" id="layout" style="top:{{navHeight}}px; height: calc(100vh - 150rpx)">
<!-- 背景图 -->
<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: calc(100% - 22rpx);'}}">
<view class="store-box">
<view class="store-item">
<view class="store-logo">
<glsx-image class="store-logo" webp src="store-assistant-assemble/output/store-icon.png"></glsx-image>
</view>
<view class="store-content">
<view class="store-name">{{merchantName}}</view>
<view class="store-desc">欢迎查看{{timeType=='day'?'日':'月'}}报表数据</view>
</view>
</view>
<scroll-view scroll-y class="content" class="content" refresher-triggered="{{triggered}}" refresher-enabled bindrefresherrefresh="getReport" bindscroll="scrollIng" style="{{'height: calc(100% - 22rpx);'}}">
<view class="store-box">
<view class="store-item">
<view class="store-logo">
<glsx-image class="store-logo" webp src="store-assistant-assemble/output/store-icon.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="store-assistant-assemble/output/date-icon.png"></glsx-image>
</view>
</view>
</view>
<view class="output-box">
<view class="output-title">
当{{timeType=='day'?'日':'月'}}产值
</view>
<view class="output-value">
<view class="output-item" wx:for="{{outputView[type == 2?'outputValue':'outputValueBoutique']}}" wx:key="index">
<view class="output-num"><text class="_unit">{{item._unit}}</text> {{outputData[item.name] ||0}}<text class="unit_">{{item.unit_}}</text></view>
<view class="output-label">{{item.label}}</view>
</view>
</view>
</view>
<view class="billboard-box">
<view class="billboard-title">当{{timeType=='day'?'日':'月'}}员工龙虎榜</view>
<view class="billboard-border">
<view class="billboard-item" wx:for="{{billboard}}" wx:key="index">
<view class="billboard-item-bar">
<view class="bill-border">
<view class="bill-num" wx:if="{{item.name}}" style="transform:translate({{index==1?-20:0}}rpx,0rpx)">¥{{item.value}}</view>
<view class="bill-name" style="transform:translate({{index==1?-20:0}}rpx,0rpx)">{{item.name}}</view>
</view>
<glsx-image webp custom-class="bill-bg" src="store-assistant-assemble/output/bill_{{item.sort}}.png"></glsx-image>
</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="store-assistant-assemble/output/date-icon.png"></glsx-image>
</view>
</view>
</view>
<view class="output-box">
<view class="output-title">
当{{timeType=='day'?'日':'月'}}产值
</view>
<view class="output-value">
<view class="output-item" wx:for="{{outputView[type == 2?'outputValue':'outputValueBoutique']}}" wx:key="index">
<view class="output-num"><text class="_unit">{{item._unit}}</text> {{outputData[item.name] ||0}}<text class="unit_">{{item.unit_}}</text></view>
<view class="output-label">{{item.label}}</view>
</view>
</view>
</view>
<view class="billboard-box">
<view class="billboard-title">当{{timeType=='day'?'日':'月'}}员工龙虎榜</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-num" wx:if="{{item.name}}" style="transform:translate({{index==1?-20:0}}rpx,0rpx)">¥{{item.value}}</view>
<view class="bill-name" style="transform:translate({{index==1?-20:0}}rpx,0rpx)">{{item.name}}</view>
</view>
<glsx-image webp custom-class="bill-bg" src="store-assistant-assemble/output/bill_{{item.sort}}.png"></glsx-image>
</view>
</view>
</block>
<view wx:if="{{billboard.length==0}}" class="empty">
<glsx-image webp custom-class="empty-icon" src="store-assistant-assemble/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 value="{{ currentDate }}" type="{{timeType=='day'?'date':'year-month'}}" bind:input="onInput" />
</popup>
</scroll-view>
</view>
<popup bind:hidePopup="cancel" bind:confirm="confirm" show="{{show}}" height="50vh">
<van-datetime-picker value="{{ currentDate }}" type="{{timeType=='day'?'date':'year-month'}}" bind:input="onInput" />
</popup>
</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!