Commit 2607ea2d by 张立顺

bug修复

1 parent 5d5650e8
...@@ -176,7 +176,7 @@ const firstObjSimple = { ...@@ -176,7 +176,7 @@ const firstObjSimple = {
label: '姓名', label: '姓名',
name: 'owner', name: 'owner',
type: 'input', type: 'input',
maxlength: '10', maxlength: '50',
noCellHeight: true, noCellHeight: true,
fieldType: 'textarea', fieldType: 'textarea',
required: true, required: true,
......
...@@ -231,6 +231,7 @@ ...@@ -231,6 +231,7 @@
align-items: center; align-items: center;
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
max-width: 60%;
color: #333333; color: #333333;
} }
......
...@@ -53,6 +53,15 @@ Page({ ...@@ -53,6 +53,15 @@ Page({
} }
] ]
}, },
hideStaffInfo() {
// 判断是不是 员工,是关闭
let { isStaff } = this.data
if (isStaff) {
this.setData({
hasStaffPassword: false
})
}
},
bindchange(e) { bindchange(e) {
this.setData({ current: e.detail.current }) this.setData({ current: e.detail.current })
}, },
...@@ -143,7 +152,15 @@ Page({ ...@@ -143,7 +152,15 @@ Page({
} }
data.monthPerformanceList = data.monthPerformanceList.map(item => { data.monthPerformanceList = data.monthPerformanceList.map(item => {
item.performanceMonthLabel = this.extractMonth(item.performanceMonth) item.performanceMonthLabel = this.extractMonth(item.performanceMonth)
item.height = item.staffDataList.length > 3 ? (item.staffDataList.length * 70 + 120) : '300' item.height = item.staffDataList.length > 3 ? item.staffDataList.length * 70 + 120 : '300'
if (item.minimumWage > item.finalWage) {
item.finalWage = item.minimumWage
// item.performanceWage = 0
item.hidePerformanceWage = true
}
// 处理基本工资和提成
// let [year, month] = item.performanceMonth.split('-') // let [year, month] = item.performanceMonth.split('-')
// item.year = year // item.year = year
// item.month = month // item.month = month
...@@ -155,6 +172,9 @@ Page({ ...@@ -155,6 +172,9 @@ Page({
2: '高级导师' 2: '高级导师'
} }
data.staffInfo.titleLabel = userInfo.isSuper ? '超管' : titleLabel[data.staffInfo.title] data.staffInfo.titleLabel = userInfo.isSuper ? '超管' : titleLabel[data.staffInfo.title]
// 如果title是2,那导师就是员工自己
if (data.staffInfo.title) {
}
this.setData({ this.setData({
staffInfoObj: data staffInfoObj: data
}) })
...@@ -228,7 +248,7 @@ Page({ ...@@ -228,7 +248,7 @@ Page({
init(userInfo) { init(userInfo) {
const isStaff = app.globalData.isStaff const isStaff = app.globalData.isStaff
// let { userInfo } = this.data // let { userInfo } = this.data
console.log(this.data, userInfo, 'userInfo'); console.log(this.data, userInfo, 'userInfo')
this.setData({ this.setData({
isStaff: userInfo.isSuper ? false : isStaff, isStaff: userInfo.isSuper ? false : isStaff,
hasStaffPassword: !isStaff ? true : false hasStaffPassword: !isStaff ? true : false
...@@ -243,48 +263,44 @@ Page({ ...@@ -243,48 +263,44 @@ Page({
// tabIndex // tabIndex
// }) // })
// console.log(options, 'options'); // console.log(options, 'options');
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {},
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { }, onReady() {},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow(e) { onShow(e) {},
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { }, onHide() {},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { }, onUnload() {},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { }, onPullDownRefresh() {},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { }, onReachBottom() {},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { } onShareAppMessage() {}
}) })
...@@ -81,9 +81,13 @@ page { ...@@ -81,9 +81,13 @@ page {
font-weight: 500; font-weight: 500;
font-size: 34rpx; font-size: 34rpx;
color: #A66E1E; color: #A66E1E;
} }
} }
// .nameCon{ // .nameCon{
// display: flex; // display: flex;
// } // }
...@@ -139,6 +143,10 @@ page { ...@@ -139,6 +143,10 @@ page {
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #A97225; color: #A97225;
.staffName {
margin-left: 10rpx;
}
} }
} }
} }
...@@ -234,6 +242,8 @@ page { ...@@ -234,6 +242,8 @@ page {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
text-align: left;
// margin-left: 80rpx;
.wagesItem { .wagesItem {
box-sizing: border-box; box-sizing: border-box;
......
...@@ -9,8 +9,19 @@ ...@@ -9,8 +9,19 @@
<!-- <!--
upper-threshold="20" upper-threshold="20"
lower-threshold="50" --> lower-threshold="50" -->
<scroll-view class="scroll-list" scroll-y enable-back-to-top refresher-enabled="{{ true }}" bindrefresherrefresh="refresh" bindscrolltolower="onBottomRefresh" refresher-threshold="104" refresher-triggered="{{ triggered }}"> <scroll-view
<view class="userInfoCon {{ staffInfoObj.staffInfo.studentStaffNameList&&staffInfoObj.staffInfo.studentStaffNameList.length>3? 'userInfoConMore':'' }}"> class="scroll-list"
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">
...@@ -20,7 +31,7 @@ ...@@ -20,7 +31,7 @@
<view class="name">{{staffInfoObj.staffInfo.staffName}}</view> <view class="name">{{staffInfoObj.staffInfo.staffName}}</view>
</view> </view>
</view> </view>
<view class="right"> <view class="right" wx:if="{{ staffInfoObj.staffInfo.certificatesGranted == 'Y' || !isStaff }}">
<view class="positionName">{{staffInfoObj.staffInfo.titleLabel}}</view> <view class="positionName">{{staffInfoObj.staffInfo.titleLabel}}</view>
<image class="position" src="{{ ImgUrl+'collegeSceneBadge.png' }}"></image> <image class="position" src="{{ ImgUrl+'collegeSceneBadge.png' }}"></image>
</view> </view>
...@@ -34,7 +45,7 @@ ...@@ -34,7 +45,7 @@
<view class="hierophantLabel">我的学员</view> <view class="hierophantLabel">我的学员</view>
<view class="name"> <view class="name">
<block wx:if="{{ staffInfoObj.staffInfo.studentStaffNameList }}"> <block wx:if="{{ staffInfoObj.staffInfo.studentStaffNameList }}">
<text wx:for="{{ staffInfoObj.staffInfo.studentStaffNameList }}" wx:key="index">{{item}} </text> <text class="staffName" wx:for="{{ staffInfoObj.staffInfo.studentStaffNameList }}" wx:key="index">{{item}} </text>
</block> </block>
</view> </view>
</view> </view>
...@@ -55,7 +66,7 @@ ...@@ -55,7 +66,7 @@
<view class="orderCount"> <view class="orderCount">
<text class="unit">¥</text> <text class="unit">¥</text>
<text class="num">{{staffInfoObj.finalWage || 0}}</text> <text class="num">{{staffInfoObj.finalWage || 0}}</text>
<image class="eyesIcon" src="{{ ImgUrl+'openeyesIcon.png' }}"></image> <image bind:tap="hideStaffInfo" class="eyesIcon" src="{{ ImgUrl+'openeyesIcon.png' }}"></image>
</view> </view>
<view class="wagesCon"> <view class="wagesCon">
<view class="wagesItem" wx:for="{{ staffInfoObj.monthPerformanceList }}"> <view class="wagesItem" wx:for="{{ staffInfoObj.monthPerformanceList }}">
...@@ -82,9 +93,22 @@ ...@@ -82,9 +93,22 @@
<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 class="swiper" bindchange="bindchange" indicator-dots="{{ indicatorDots }}" autoplay="{{ autoplay }}" interval="{{ interval }}" duration="{{ duration }}" style="height:{{staffInfoObj.monthPerformanceList[current].height||300}}rpx;"> <swiper
class="swiper"
bindchange="bindchange"
indicator-dots="{{ indicatorDots }}"
autoplay="{{ autoplay }}"
interval="{{ interval }}"
duration="{{ duration }}"
style="height:{{ staffInfoObj.monthPerformanceList[current].height||300 }}rpx;"
>
<!-- <block wx:for="{{background}}" wx:key="*this"> --> <!-- <block wx:for="{{background}}" wx:key="*this"> -->
<swiper-item wx:for="{{ staffInfoObj.monthPerformanceList }}" wx:for-item="monthPerformanceList" wx:for-index="monthPerformanceListIndex" wx:key="monthPerformanceListIndex"> <swiper-item
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">
...@@ -112,7 +136,13 @@ ...@@ -112,7 +136,13 @@
</view> </view>
</view> --> </view> -->
<!-- </block> --> <!-- </block> -->
<view class="wagesItem" wx:for="{{ monthPerformanceList.staffDataList }}" wx:for-item="monthPerformanceListItem" wx:for-index="monthPerformanceListItemIndex" wx:key="monthPerformanceListItemIndex"> <view
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>
...@@ -120,7 +150,7 @@ ...@@ -120,7 +150,7 @@
<text>工资</text> <text>工资</text>
<text class="num">¥{{monthPerformanceListItem.finalWage || 0}}</text> <text class="num">¥{{monthPerformanceListItem.finalWage || 0}}</text>
</view> </view>
<view class="value"> <view class="value" wx:if="{{ !monthPerformanceListItem.hidePerformanceWage }}">
<text>+提成</text> <text>+提成</text>
<text class="num">¥{{monthPerformanceListItem.performanceWage || 0}}</text> <text class="num">¥{{monthPerformanceListItem.performanceWage || 0}}</text>
</view> </view>
...@@ -163,7 +193,13 @@ ...@@ -163,7 +193,13 @@
<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 class="goodsItem" wx:for="{{ childItem.orderGoodsName }}" wx:for-item="goodsItem" wx:for-index="goodsIndex" wx:key="goodsIndex"> <view
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>
...@@ -173,7 +209,7 @@ ...@@ -173,7 +209,7 @@
<view class="label">提成</view> <view class="label">提成</view>
<view class="conent"> <view class="conent">
<block wx:if="{{ hasStaffPassword }}"> <block wx:if="{{ hasStaffPassword }}">
<view class="name"> <view class="name" wx:if="{{ childItem.mentorStaffName }}">
<text>导师{{childItem.mentorStaffName}}</text> <text>导师{{childItem.mentorStaffName}}</text>
<text class="num">¥{{childItem.mentorBonus}}</text> <text class="num">¥{{childItem.mentorBonus}}</text>
</view> </view>
...@@ -223,4 +259,12 @@ ...@@ -223,4 +259,12 @@
</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!