Commit f5e6d4e8 by 张立顺

逻辑修改

1 parent 8c74f56b
...@@ -65,13 +65,6 @@ Page({ ...@@ -65,13 +65,6 @@ Page({
passwordPop: true, passwordPop: true,
isSetPassword: staffInfoObj.staffInfo.needSetPwd isSetPassword: staffInfoObj.staffInfo.needSetPwd
}) })
// } else {
// this.setData({
// passwordPop: true,
// isSetPassword: false
// })
// }
}, },
refresh() { refresh() {
// console.log('refresh', refresh) // console.log('refresh', refresh)
...@@ -82,7 +75,7 @@ Page({ ...@@ -82,7 +75,7 @@ Page({
this.orderPerformanceDetail() this.orderPerformanceDetail()
}, },
onBottomRefresh() { onBottomRefresh() {
console.log('onBottomRefresh') // console.log('onBottomRefresh')
let { currentPage, monthArray } = this.data let { currentPage, monthArray } = this.data
if (currentPage < monthArray.length - 1) { if (currentPage < monthArray.length - 1) {
this.setData({ this.setData({
...@@ -92,16 +85,14 @@ Page({ ...@@ -92,16 +85,14 @@ Page({
} else { } else {
wx.$util.showToast('没有更多了') wx.$util.showToast('没有更多了')
} }
// console.log('test', test)
}, },
orderPerformanceDetail() { orderPerformanceDetail() {
let { currentPage, monthArray, orderList } = this.data let { currentPage, monthArray, orderList } = this.data
let performanceMonth = monthArray[currentPage] let performanceMonth = monthArray[currentPage]
console.log(performanceMonth, 'performanceMonth') // console.log(performanceMonth, 'performanceMonth')
orderPerformanceDetail({ performanceMonth }) orderPerformanceDetail({ performanceMonth })
.then(res => { .then(res => {
console.log(res) // console.log(res)
//
let { code, data } = res let { code, data } = res
if (code == 0 && data.performanceMonth) { if (code == 0 && data.performanceMonth) {
...@@ -117,7 +108,7 @@ Page({ ...@@ -117,7 +108,7 @@ Page({
}) })
// wx.$util.tsFormatTime(data.orderTime, 'Y年M月D日 h:m:s') // wx.$util.tsFormatTime(data.orderTime, 'Y年M月D日 h:m:s')
orderList.push({ ...data }) orderList.push({ ...data })
console.log(data, 'data') // console.log(data, 'data')
this.setData({ this.setData({
orderList, orderList,
triggered: false triggered: false
...@@ -132,7 +123,7 @@ Page({ ...@@ -132,7 +123,7 @@ Page({
wx.$util.showLoading('加载中...') wx.$util.showLoading('加载中...')
staffInfo({}) staffInfo({})
.then(res => { .then(res => {
console.log(res) // console.log(res)
let { userInfo } = this.data let { userInfo } = this.data
let { code, data } = res let { code, data } = res
if (code == 0) { if (code == 0) {
...@@ -172,7 +163,7 @@ Page({ ...@@ -172,7 +163,7 @@ Page({
// pageSize: monthArray.length, // pageSize: monthArray.length,
currentPage: 0 currentPage: 0
}) })
console.log(monthArray, 'monthArray') // console.log(monthArray, 'monthArray')
// 获取商学院员工信息及前3月绩效信息 // 获取商学院员工信息及前3月绩效信息
this.businessSchoolStaffInfo() this.businessSchoolStaffInfo()
//获取商学院员工订单绩效明细 //获取商学院员工订单绩效明细
...@@ -234,16 +225,12 @@ Page({ ...@@ -234,16 +225,12 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
// console.log(options);
const isStaff = app.globalData.isStaff const isStaff = app.globalData.isStaff
let { userInfo } = this.data let { userInfo } = this.data
// if (userInfo?.isSuper) { // console.log(userInfo?.isSuper ? true : false, 'userInfo?.isSuper ? true : false');
// this.setData({
// enableBusinessSchool: true
// })
this.setData({ this.setData({
isStaff, isStaff,
hasStaffPassword: userInfo?.isSuper ? true : false hasStaffPassword: !isStaff ? true : false
}) })
this.getDetailInfo() this.getDetailInfo()
...@@ -252,37 +239,36 @@ Page({ ...@@ -252,37 +239,36 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady() { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow(e) { onShow(e) {
// console.log(e);
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {} onShareAppMessage() { }
}) })
...@@ -9,19 +9,8 @@ ...@@ -9,19 +9,8 @@
<!-- <!--
upper-threshold="20" upper-threshold="20"
lower-threshold="50" --> lower-threshold="50" -->
<scroll-view <scroll-view class="scroll-list" scroll-y enable-back-to-top refresher-enabled="{{ true }}" bindrefresherrefresh="refresh" bindscrolltolower="onBottomRefresh" refresher-threshold="104" refresher-triggered="{{ triggered }}">
class="scroll-list" <view class="userInfoCon {{ staffInfoObj.staffInfo.studentStaffNameList&&staffInfoObj.staffInfo.studentStaffNameList.length>3? 'userInfoConMore':'' }}">
scroll-y
enable-back-to-top
refresher-enabled="{{ true }}"
bindrefresherrefresh="refresh"
bindscrolltolower="onBottomRefresh"
refresher-threshold="104"
refresher-triggered="{{ triggered }}"
>
<view
class="userInfoCon {{ staffInfoObj.staffInfo.studentStaffNameList&&staffInfoObj.staffInfo.studentStaffNameList.length>3? 'userInfoConMore':'' }}"
>
<view class="date">{{staffInfoObj.staffInfo.entryDate}}入职</view> <view class="date">{{staffInfoObj.staffInfo.entryDate}}入职</view>
<view class="userInfo"> <view class="userInfo">
<view class="left"> <view class="left">
...@@ -52,7 +41,7 @@ ...@@ -52,7 +41,7 @@
</view> </view>
</view> </view>
<view class="swiperCon"> <view class="swiperCon">
<block wx:if="{{ !isStaff }}"> <block wx:if="{{ isStaff }}">
<view class="staffCon" wx:if="{{ !hasStaffPassword }}"> <view class="staffCon" wx:if="{{ !hasStaffPassword }}">
<view class="accessView"></view> <view class="accessView"></view>
<view class="forbid" bindtap="viewPerformance"> <view class="forbid" bindtap="viewPerformance">
...@@ -84,7 +73,7 @@ ...@@ -84,7 +73,7 @@
</view> </view>
</block> </block>
<!-- 超管和商户管理 --> <!-- 超管和商户管理 -->
<block wx:else="{{ isStaff }}"> <block wx:else="{{ !isStaff }}">
<view class="performanceCon"> <view class="performanceCon">
<view class="title">预估本月绩效提成</view> <view class="title">预估本月绩效提成</view>
<view class="tips">(最终工资按实际发放为准)</view> <view class="tips">(最终工资按实际发放为准)</view>
...@@ -93,20 +82,9 @@ ...@@ -93,20 +82,9 @@
<text class="num">{{staffInfoObj.finalWage || 0}}</text> <text class="num">{{staffInfoObj.finalWage || 0}}</text>
<image class="eyesIcon" src="{{ ImgUrl+'openeyesIcon.png' }}"></image> <image class="eyesIcon" src="{{ ImgUrl+'openeyesIcon.png' }}"></image>
</view> </view>
<swiper <swiper class="swiper" indicator-dots="{{ indicatorDots }}" autoplay="{{ autoplay }}" interval="{{ interval }}" duration="{{ duration }}">
class="swiper"
indicator-dots="{{ indicatorDots }}"
autoplay="{{ autoplay }}"
interval="{{ interval }}"
duration="{{ duration }}"
>
<!-- <block wx:for="{{background}}" wx:key="*this"> --> <!-- <block wx:for="{{background}}" wx:key="*this"> -->
<swiper-item <swiper-item wx:for="{{ staffInfoObj.monthPerformanceList }}" wx:for-item="monthPerformanceList" wx:for-index="monthPerformanceListIndex" wx:key="monthPerformanceListIndex">
wx:for="{{ staffInfoObj.monthPerformanceList }}"
wx:for-item="monthPerformanceList"
wx:for-index="monthPerformanceListIndex"
wx:key="monthPerformanceListIndex"
>
<view class="wagesCon"> <view class="wagesCon">
<!-- <block wx:if="{{ !monthPerformanceListItemIndex }}"> --> <!-- <block wx:if="{{ !monthPerformanceListItemIndex }}"> -->
<view class="wagesItem"> <view class="wagesItem">
...@@ -134,13 +112,7 @@ ...@@ -134,13 +112,7 @@
</view> </view>
</view> --> </view> -->
<!-- </block> --> <!-- </block> -->
<view <view class="wagesItem" wx:for="{{ monthPerformanceList.staffDataList }}" wx:for-item="monthPerformanceListItem" wx:for-index="monthPerformanceListItemIndex" wx:key="monthPerformanceListItemIndex">
class="wagesItem"
wx:for="{{ monthPerformanceList.staffDataList }}"
wx:for-item="monthPerformanceListItem"
wx:for-index="monthPerformanceListItemIndex"
wx:key="monthPerformanceListItemIndex"
>
<!-- {{monthPerformanceListIndex}} --> <!-- {{monthPerformanceListIndex}} -->
<!-- <block wx:else> --> <!-- <block wx:else> -->
<view class="label">{{monthPerformanceListItem.staffName}}</view> <view class="label">{{monthPerformanceListItem.staffName}}</view>
...@@ -191,13 +163,7 @@ ...@@ -191,13 +163,7 @@
<view class="li orderAmount goods"> <view class="li orderAmount goods">
<view class="label">商品</view> <view class="label">商品</view>
<view class="conent"> <view class="conent">
<view <view class="goodsItem" wx:for="{{ childItem.orderGoodsName }}" wx:for-item="goodsItem" wx:for-index="goodsIndex" wx:key="goodsIndex">
class="goodsItem"
wx:for="{{ childItem.orderGoodsName }}"
wx:for-item="goodsItem"
wx:for-index="goodsIndex"
wx:key="goodsIndex"
>
<view class="goodsName">{{goodsItem}}</view> <view class="goodsName">{{goodsItem}}</view>
<!-- <view class="goodsNum">x{{goodsItem.goodsNum}}</view> --> <!-- <view class="goodsNum">x{{goodsItem.goodsNum}}</view> -->
</view> </view>
...@@ -257,12 +223,4 @@ ...@@ -257,12 +223,4 @@
</view> </view>
</view> --> </view> -->
</scroll-view> </scroll-view>
<password-pop
wx:if="{{ passwordPop }}"
isSetPassword="{{ isSetPassword }}"
title="{{ isSetPassword ? '首次设置绩效查看密码':'请输入绩效查看密码' }}"
show="{{ passwordPop }}"
maxlength="4"
bindcancel="remarkCancel"
bindconfirm="remarkConfirm"
></password-pop>
\ No newline at end of file \ No newline at end of file
<password-pop wx:if="{{ passwordPop }}" isSetPassword="{{ isSetPassword }}" title="{{ isSetPassword ? '首次设置绩效查看密码':'请输入绩效查看密码' }}" show="{{ passwordPop }}" maxlength="4" bindcancel="remarkCancel" bindconfirm="remarkConfirm"></password-pop>
\ 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!