Commit 2607ea2d by 张立顺

bug修复

1 parent 5d5650e8
...@@ -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;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!