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