Commit d2568e2e by 前端

fixed

1 parent e25ac7b7
...@@ -16,13 +16,54 @@ Component({ ...@@ -16,13 +16,54 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
dataType: {
crowType: [{
label: '转发次数',
value: 1
}, {
label: '访客总数',
value: 2
}, {
label: '浏览总数',
value: 3
}, {
label: '成交单量',
value: 4
}, {
label: '转化率',
value: 5
}],
boutique: [{
label: '单量',
value: 1
}, {
label: '客单量',
value: 2
}, {
label: '转化率',
value: 3
}]
},
show: true,
selectTxt: '单量',
selectValue: 1,
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
showUp() {
this.setData({show:false})
},
selectType(e) {
const {value,label} = e.target.dataset
console.log(label)
this.setData({
selectValue: value,
show:true,
selectTxt: label
})
}
} }
}) })
page { .box {
background: #f3f3f3; margin: 20rpx;
font-size: 30rpx; 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: 108rpx;
}
.up-box {
position: absolute;
width: 108rpx;
height: 160rpx;
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 { .table {
display: flex; display: flex;
} }
......
<!--packageOutput/components/staff/staff.wxml--> <!--packageOutput/components/staff/staff.wxml-->
<view class='table'> <view class="box staff-box">
<!-- 左侧固定 --> <view class="box-title">
<view class='table_left_column'> <text>员工排行榜</text>
<view class='left_col_item'>排名</view> <view class="select-up">
<view class='left_col_item' wx:for="{{sfaffList[0].list}}" wx:for-index="index" wx:key="index">{{index+1}}</view> <view bindtap="showUp" class="staff-type">{{selectTxt}}</view>
</view> <view class="up-box" hidden="{{show}}">
<!-- 右侧表格滚动 --> <view class="up-item {{selectValue == item.value? 'checked':''}}" wx:for="{{dataType}}" wx:key="{{index}}" data-label="{{item.label}}" data-value="{{item.value}}" catchtap="selectType">
<view class="table_right_scroll_box"> {{item.label}}
<view class="flex_direction_column_item" wx:for="{{sfaffList}}" wx:for-index="index" wx:key="index"> </view>
<view class='item_name'>{{item.name}}</view> </view>
<view wx:for="{{item.list}}" wx:for-item="litem" wx:for-index="lindex" wx:key="lindex" class='item_name item_desc'> </view>
<block wx:if="{{litem.price !='缺货'}}">¥{{litem.price}}/斤</block>
<block wx:else>缺货</block>
</view>
</view> </view>
</view> <view class="staff-input">
</view> <input placeholder="输入员工名称" />
<icon class="icon-small" type="search" size="14"></icon>
</view>
<view class='table'>
<!-- 左侧固定 -->
<view class='table_left_column'>
<view class='left_col_item'>排名</view>
<view class='left_col_item' wx:for="{{sfaffList[0].list[sfaffList[0].val]}}" wx:for-index="index" wx:key="index">{{index+1}}</view>
</view>
<!-- 右侧表格滚动 -->
<view class="table_right_scroll_box">
<view class="flex_direction_column_item" wx:for="{{sfaffList}}" wx:for-index="index" wx:key="index">
<view class='item_name'>{{item.name}}</view>
<view wx:for="{{item.list[item.val]}}" wx:for-item="litem" wx:for-index="lindex" wx:key="lindex" class='item_name item_desc'>
<block>{{litem}}</block>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
.layout { .layout {
position: relative; position: relative;
.bg-box {
width: 100%; .bg-box {
overflow: hidden; width: 100%;
position: absolute; overflow: hidden;
left: 0; position: absolute;
z-index: -1; left: 0;
.bg { z-index: -1;
width: 100%;
height: 100%; .bg {
position: absolute; width: 100%;
z-index: -1; height: 100%;
top: 0; position: absolute;
left: 0; z-index: -1;
} top: 0;
} left: 0;
}
}
}
.output-box {
background: #F4F8FE;
border-radius: 32rpx;
margin: 0 16rpx;
padding: 24rpx;
.output-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
margin-bottom: 22rpx;
display: flex;
} }
.output-box {
background: #F4F8FE; .output-value {
border-radius: 32rpx; display: grid;
margin: 0 16rpx; grid-template-columns: repeat(3, 33.33%);
padding: 24rpx; row-gap: 24rpx;
.output-title { padding: 32rpx;
font-weight: 600; background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
font-size: 32rpx; border-radius: 16rpx;
color: #1B233D;
line-height: 48rpx; .output-item {
margin-bottom: 22rpx; text-align: center;
.output-num {
font-weight: 600;
font-size: 44rpx;
color: #1B233D;
line-height: 64rpx;
}
.output-label {
font-size: 24rpx;
color: #6E6E7A;
line-height: 36rpx;
margin-top: 12rpx;
}
} }
.output-value {
display: grid;
grid-template-columns: repeat(3, 33.33%);
row-gap: 24rpx;
padding: 32rpx;
background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
border-radius: 16rpx;
.output-item {
text-align: center;
.output-num {
font-weight: 600;
font-size: 44rpx;
color: #1B233D;
line-height: 64rpx;
}
.output-label {
font-size: 24rpx;
color: #6E6E7A;
line-height: 36rpx;
margin-top: 12rpx;
}
}
}
} }
}
.box { .box {
margin: 20rpx; margin: 20rpx;
background: #FFFFFF; background: #FFFFFF;
...@@ -67,16 +74,42 @@ ...@@ -67,16 +74,42 @@
font-size: 32rpx; font-size: 32rpx;
color: #1B233D; color: #1B233D;
line-height: 48rpx; line-height: 48rpx;
display: flex;
justify-content: space-between;
.select-up {
font-weight: 400;
font-size: 24rpx;
color: #666666;
position: relative;
.up-box {
position: absolute;
width: 108rpx;
height: 160rpx;
background: #FFFFFF;
box-shadow: 0 0 18rpx 0 #3a596a1c;
border-radius: 8rpx;
.up-item {
flex: auto;
font-weight: 400;
font-size: 20rpx;
color: #666666;
text-align: center;
line-height: 53rpx;
}
}
}
} }
.staff-input { .staff-input {
width: 638rpx; width: 638rpx;
height: 64rpx; height: 64rpx;
background: #ffffff7d; background: #ffffff7d;
border: 2rpx solid #EEEEEE; border: 2rpx solid #EEEEEE;
border-radius: 12rpx; border-radius: 12rpx;
margin: 20rpx auto; margin: 40rpx auto 20rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
产值总览 产值总览
</view> </view>
<view class="output-value"> <view class="output-value">
<view class="output-item" wx:for="{{outputValue}}"> <view class="output-item" wx:for="{{outputValue}}" wx:key="{{index}}">
<view class="output-num">444</view> <view class="output-num">444</view>
<view class="output-label">{{item.label}}</view> <view class="output-label">{{item.label}}</view>
</view> </view>
...@@ -25,14 +25,7 @@ ...@@ -25,14 +25,7 @@
<invert-analyse data="{{analyseValue}}"></invert-analyse> <invert-analyse data="{{analyseValue}}"></invert-analyse>
</view> </view>
<view class="box staff-box"> <staff sfaffList="{{sfaffList}}" />
<view class="box-title">员工排行榜</view>
<view class="staff-input">
<input placeholder="输入员工名称" />
<icon class="icon-small" type="search" size="14"></icon>
</view>
<staff sfaffList="{{sfaffList}}" />
</view>
</scroll-view> </scroll-view>
</view> </view>
......
...@@ -92,10 +92,10 @@ Page({ ...@@ -92,10 +92,10 @@ Page({
} }
}, },
month: () => { month: () => {
apiName = 'boutiquecouponQueryByDayReport', apiName = 'boutiquecouponQueryByMonthReport',
params = { params = {
merchantId, merchantId,
reportMonth: timeValue reportMonth: timeValue.substring(0,7)
} }
} }
}, },
...@@ -120,17 +120,27 @@ Page({ ...@@ -120,17 +120,27 @@ Page({
} }
dataT[type][timeType]() dataT[type][timeType]()
ActivityApi[apiName](params).then(res => { ActivityApi[apiName](params).then(res => {
const list = res.employeeOutputList || res.staffList
const staffList = list.length?list.splice(0,3):new Array(3).fill(1)
const billboard = staffList.map((item,idx)=>{
return {
sort: idx+1,
value:item.outputValue || item.orderMoneyTotal || 0,
name: item.transferName||item.employeeName
}
})
this.setData({ this.setData({
outputData: res||{}, outputData: res||{},
triggered:false triggered:false,
billboard
}) })
}) })
}, },
//获取day后的 //获取下个月时间
getNextMonth(time) { getNextMonth(time) {
const arr = time.split('-') const arr = time.split('-')
let year = arr[0]; //获取当前日期的年份 let year = arr[0]; //获取当前日期的年份
let month = +arr[1]; //获取当前日期的月份 let month = +arr[1] + 1; //获取当前日期的月份
let day = arr[2]; //获取当前日期的日 let day = arr[2]; //获取当前日期的日
if (month == 13) { if (month == 13) {
year = parseInt(year) + 1; year = parseInt(year) + 1;
...@@ -147,7 +157,6 @@ Page({ ...@@ -147,7 +157,6 @@ Page({
return `${date.getFullYear()}年${date.getMonth() + 1}}月`; return `${date.getFullYear()}年${date.getMonth() + 1}}月`;
}, },
onInput(event) { onInput(event) {
console.log(event.detail)
this.setData({ this.setData({
currentDate: event.detail, currentDate: event.detail,
}); });
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<view class="billboard-item" wx:for="{{billboard}}" wx:key="{{index}}"> <view class="billboard-item" wx:for="{{billboard}}" wx:key="{{index}}">
<view class="billboard-item-bar"> <view class="billboard-item-bar">
<view class="bill-border"> <view class="bill-border">
<view class="bill-num" style="transform:translate({{index==1?-20:0}}rpx,0rpx)">¥{{item.value}}</view> <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 class="bill-name" style="transform:translate({{index==1?-20:0}}rpx,0rpx)">{{item.name}}</view>
</view> </view>
<glsx-image webp custom-class="bill-bg" src="store-assistant-assemble/output/bill_{{item.sort}}.png"></glsx-image> <glsx-image webp custom-class="bill-bg" src="store-assistant-assemble/output/bill_{{item.sort}}.png"></glsx-image>
......
<van-popup custom-style="height: 100%;width:70%;" custom-class="popclass" bind:click-overlay="closeMenu" position="left" show="{{ show }}"> <van-popup custom-style="height: 100%;width:70%;" custom-class="popclass" bind:click-overlay="closeMenu" position="right" show="{{ show }}">
<view class="wrapper"> <view class="wrapper">
<view class="title">工作台</view> <view class="title">工作台</view>
<block wx:for="{{menus}}" wx:key="index"> <block wx:for="{{menus}}" wx:key="index">
......
...@@ -64,7 +64,7 @@ Component({ ...@@ -64,7 +64,7 @@ Component({
onLoad(options) { onLoad(options) {
const {merchantId,merchantName} = options; const {merchantId,merchantName} = options;
this.setData({merchantId,merchantName}) this.setData({merchantId:44211227,merchantName})
this.getSubscribeConfig(options) this.getSubscribeConfig(options)
this.addEvent() this.addEvent()
}, },
......
...@@ -7,14 +7,6 @@ ...@@ -7,14 +7,6 @@
font-size: 34rpx; font-size: 34rpx;
font-weight: 600; font-weight: 600;
} }
.nav-func-icon{
width: 88rpx;
height: 88rpx;
position: absolute;
left: 0rpx;
top: 50%;
transform: translateY(-50%);
}
} }
.layout { .layout {
...@@ -47,12 +39,25 @@ ...@@ -47,12 +39,25 @@
padding: 0 32rpx; padding: 0 32rpx;
.tab-scroll{ .tab-scroll{
height: 100%; height: 100%;
width: 600rpx;
}
.nav-btn {
width: 88rpx;
transform: translate(20rpx,8rpx);
.nav-func-icon{
width: 88rpx;
height: 88rpx;
}
} }
.tab_element{ .tab_element{
display: inline-block; display: inline-block;
width: 50%; padding: 0rpx 28rpx;
position: relative; position: relative;
line-height: 96rpx; line-height: 96rpx;
margin-right: 24rpx;
&:last-child {
margin-right: 0rpx;
}
.inner{ .inner{
width: 100%; width: 100%;
display: flex; display: flex;
......
<wxs src="./index.wxs" module="fn"></wxs> <wxs src="./index.wxs" module="fn"></wxs>
<view class="navigation-bar"> <view class="navigation-bar">
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady" page-title="工作台"> <navigation-bar showBack="{{true}}" navStyle="{{navStyle}}" bindnavbarReady="navbarReady" page-title="工作台">
<view class="bar-nav"> <view class="bar-nav">
<glsx-image class="nav-func-icon" bind:tap="showMenuList" webp src="store-assistant/menu/menu_logo.png"></glsx-image>
<view class="bar-text">工作台</view> <view class="bar-text">工作台</view>
</view> </view>
</navigation-bar> </navigation-bar>
...@@ -28,6 +27,10 @@ ...@@ -28,6 +27,10 @@
</view> </view>
</block> </block>
</scroll-view> </scroll-view>
<view class="nav-btn">
<glsx-image class="nav-func-icon" bind:tap="showMenuList" webp src="store-assistant/menu/menu_logo.png"></glsx-image>
</view>
</view> </view>
<!-- currentServiceType 0售后众筹 1续保膨胀金 2定保招揽 3私域运营 4精品礼券 5续保招揽 6节假日关怀 --> <!-- currentServiceType 0售后众筹 1续保膨胀金 2定保招揽 3私域运营 4精品礼券 5续保招揽 6节假日关怀 -->
<view class="pannel" style="height:calc(100% - 30rpx)"> <view class="pannel" style="height:calc(100% - 30rpx)">
...@@ -42,7 +45,5 @@ ...@@ -42,7 +45,5 @@
</view> </view>
</view> </view>
</block> </block>
<!-- 安装信息 -->
<install-popup show="{{showPopup}}" data="{{installItem}}" bind:hidePopup="hidePopup"></install-popup>
<!-- 菜单信息 --> <!-- 菜单信息 -->
<menu bind:currentMenu="getCurrentMenu" tabs="{{tab}}" totals="{{totals_zc}}" tabIndex="{{tabIndex}}" show="{{showMenu}}"></menu> <menu bind:currentMenu="getCurrentMenu" tabs="{{tab}}" totals="{{totals_zc}}" tabIndex="{{tabIndex}}" show="{{showMenu}}"></menu>
\ No newline at end of file \ No newline at end of file
<!-- pages/tab/output/output.wxml --> <!-- pages/tab/output/output.wxml -->
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady">我的</navigation-bar> <navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady">我的</navigation-bar>
<view class="layout" style="padding-top:{{tabBarStyle}}px;"> <view class="layout" style="padding-top:{{tabBarStyle}}px;">
<view class="userInfoCon"> <view class="userInfoCon" bindtap="jumpLogout">
<glsx-image class="headPortrait" src="{{userInfo.userAvatarUrl||IMAGES.userAvatarUrl }}" webp> <glsx-image class="headPortrait" src="{{userInfo.userAvatarUrl||IMAGES.userAvatarUrl }}" webp>
头像 头像
</glsx-image> </glsx-image>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<view class="name">{{userInfo.merchantName}}</view> <view class="name">{{userInfo.merchantName}}</view>
<view class="id">{{userInfo.merchantId}}</view> <view class="id">{{userInfo.merchantId}}</view>
</view> </view>
<view class="logot" bindtap="jumpLogout"> <view class="logot">
<glsx-image class="logot" webp src="store-assistant-assemble/login/arrow-left.png"></glsx-image> <glsx-image class="logot" webp src="store-assistant-assemble/login/arrow-left.png"></glsx-image>
</view> </view>
</view> </view>
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
}, },
{ {
"name": "", "name": "",
"pathName": "packageOutput/pages/crowdDetail/crowdDetail", "pathName": "pages/tab/output/output",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!