Commit 43252df2 by zhangxw

绩效评分需求开发

1 parent 00221d2f
...@@ -9,6 +9,10 @@ Component({ ...@@ -9,6 +9,10 @@ Component({
emptyImageStyle: { emptyImageStyle: {
type: String, type: String,
value: 'width: var(--fontSize208);height: var(--fontSize208);' value: 'width: var(--fontSize208);height: var(--fontSize208);'
},
emptyText: {
type: String,
value: '暂无数据'
} }
}, },
......
<!--components/emptyData/emptyData.wxml--> <!--components/emptyData/emptyData.wxml-->
<view class="empty-box"> <view class="empty-box">
<image class="no-data-img" style="{{emptyImageStyle}}" src="{{IMG_URL}}empty-data.png" /> <image class="no-data-img" style="{{emptyImageStyle}}" src="{{IMG_URL}}empty-data.png" />
<view class="list-not-text">暂无数据</view> <view class="list-not-text">{{emptyText || '暂无数据'}}</view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -64,6 +64,7 @@ Component({ ...@@ -64,6 +64,7 @@ Component({
}, },
show(n) { show(n) {
// 进出场时保持数据一致 // 进出场时保持数据一致
console.log(this.data.value)
if (n) { if (n) {
this.initDisplay(this.properties.options || [], this.properties.multiple, this.properties.value, this.properties.values) this.initDisplay(this.properties.options || [], this.properties.multiple, this.properties.value, this.properties.values)
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<view class="filter-item flex {{filterObj.orderStatus ? 'active': ''}}" bindtap="handleOrderStatusFilter"> <view class="filter-item flex {{filterObj.orderStatus ? 'active': ''}}" bindtap="handleOrderStatusFilter">
<text>{{orderStatusMap[filterObj.orderStatus].name}}</text><image src="{{IMG_URL}}{{filterObj.orderStatus ? 'expand_icon_blue' : 'expand_icon'}}.png" mode=""/> <text>{{orderStatusMap[filterObj.orderStatus].name}}</text><image src="{{IMG_URL}}{{filterObj.orderStatus ? 'expand_icon_blue' : 'expand_icon'}}.png" mode=""/>
</view> </view>
<calendar id="calender" class="calendar" allowSameDay shortcut bindselect="rangeSelect" calenderColor="#347BFF" vertical dateType='range' minDate="2020-10-01" maxDate="{{ maxDate }}" isComponents> <calendar id="calender" class="calendar" allowSameDay shortcut bindselect="rangeSelect" calenderColor="#347BFF" vertical dateType='range' minDate="2024-01-01" maxDate="{{ maxDate }}" isComponents>
<view class="filter-item flex {{filterObj.date ? 'active': ''}}"> <view class="filter-item flex {{filterObj.date ? 'active': ''}}">
<text class="hide-text">{{filterObj.date || '提单日期'}}</text> <text class="hide-text">{{filterObj.date || '提单日期'}}</text>
<image src="{{IMG_URL}}{{filterObj.date ? 'expand_icon_blue' : 'expand_icon'}}.png" mode=""/> <image src="{{IMG_URL}}{{filterObj.date ? 'expand_icon_blue' : 'expand_icon'}}.png" mode=""/>
......
// packageWorkspace/pages/performanceRating/components/helpPopup/helpPopup.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean, //目前接受的类型包括:String, Number, Boolean, Object, Array, null(表示任意类型)
value: false, // 默认值
observer(newVal, oldVal) {
console.log('222')
if (newVal) {
this.createMaskAnimate(true)
} else {
this.createMaskAnimate(false)
}
}
},
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
helpContents: [{
title: '底薪',
value: '底薪=工资标准 / 应出勤天数×实际出勤天数×70%'
}, {
title: '绩效工资',
value: '绩效工资=工资标准 / 应出勤天数 × 实际出勤天数 × 30% × 绩效系数(如有手动维护绩效工资,则取最终手工维护的绩效金额)'
}, {
title: '基本工资',
value: '基本工资=底薪+绩效工资'
}, {
title: '手动维护最终绩效金额',
value: '手动维护最终绩效金额字段大于等级字段'
}],
maskAnimate: [],
frameAnimate: [],
},
/**
* 组件的方法列表
*/
methods: {
close() {
this.setData({
show: !this.data.show
})
},
//动画-遮罩层淡入淡出
createMaskAnimate(currentStatu) {
if (currentStatu) {
this.setData({
_show: currentStatu
})
this.createframeAnimate(true)
} else {
setTimeout(() => {
this.setData({
_show: false
})
}, 300)
this.createframeAnimate(false)
}
let maskAnimate = wx.createAnimation({
duration: 300,
timingFunction: 'ease-in-out',
delay: 0
})
this.maskAnimate = maskAnimate
maskAnimate.opacity(currentStatu ? 0.7 : 0).step()
setTimeout(() => {
this.setData({
maskAnimate: maskAnimate.export()
})
}, 50)
},
//动画-弹层内容Q弹
createframeAnimate(currentStatu) {
// return
let frameAnimate = wx.createAnimation({
duration: 300,
timingFunction: 'ease',
delay: 0
})
this.frameAnimate = frameAnimate
frameAnimate
.translate('-50%', '-50%')
.opacity(currentStatu ? 0.5 : 1)
.step()
// .scale(currentStatu ? 1.05 : 1)
this.setData({
frameAnimate: frameAnimate.export()
})
setTimeout(() => {
// 执行第二组动画
frameAnimate
.opacity(currentStatu ? 1 : 0)
.scale(currentStatu ? 1 : 0.9)
.step()
// 给数据对象储存的第一组动画,更替为执行完第二组动画的动画对象
this.setData({
frameAnimate: frameAnimate.export()
})
}, 150)
}
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageWorkspace/pages/performanceRating/components/helpPopup/helpPopup.wxss */
.popV {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 999;
width: 100vw;
height: 100vh;
}
.popV-mask {
position: absolute;
width: 100%;
height: 100%;
background: rgba(0, 0, 0);
opacity: 0;
display: block;
}
.popV-content {
position: absolute;
top: 50%;
left: 50%;
transform: translateY(-50%);
transform: translate(-50%);
width: var(--fontSize640);
box-sizing: border-box;
background: #FFFFFF;
border-radius: var(--fontSize32);
z-index: 1000;
display: flex;
flex-direction: column;
overflow: hidden;
opacity: 1;
.gradient {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 360rpx;
z-index: -1;
background: linear-gradient(to bottom, #DCE8FA, #FFFFFF);
}
.container {
padding: 48rpx;
.title {
text-align: center;
font-weight: 500;
font-size: 36rpx;
margin-bottom: 36rpx;
}
.content {
font-size: 28rpx;
color: #222222;
.cont-title {
display: flex;
align-items: center;
font-weight: 500;
margin: 16rpx 0;
image {
width: 6rpx;
height: 24rpx;
margin-right: 16rpx;
}
}
.cont-value {
font-size: 26rpx;
color: #666666;
}
}
}
.btn {
height: 96rpx;
line-height: 96rpx;
text-align: center;
border-top: 2rpx solid #F6F6F7;
color: #222222;
font-size: 32rpx;
}
}
\ No newline at end of file \ No newline at end of file
<!--packageWorkspace/pages/performanceRating/components/helpPopup/helpPopup.wxml-->
<view wx:if="{{ _show }}" class="popV" catchtouchmove="move">
<view class="popV-mask" bindtap="selectMask" animation="{{ maskAnimate }}" />
<view class="popV-content" animation="{{ frameAnimate }}">
<view class="gradient"></view>
<view class="container">
<view class="title">帮助</view>
<view class="content">
<view wx:for="{{helpContents}}" wx:key="index">
<view class="cont-title">
<image src="{{IMG_URL}}title_icon.png" mode=""/>
<view class="label">{{item.title}}</view>
</view>
<view class="cont-value">{{item.value}}</view>
</view>
</view>
</view>
<view class="btn" bindtap="close">我知道了</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// packageWorkspace/pages/performanceRating/components/levelRate/levelRate.js // packageWorkspace/pages/performanceRating/components/levelRate/levelRate.js
import { starCountObj, levelColorObj } from '~/packageWorkspace/pages/performanceRating/constant'
Component({ Component({
/** /**
...@@ -7,6 +8,9 @@ Component({ ...@@ -7,6 +8,9 @@ Component({
properties: { properties: {
info: { info: {
type: Object type: Object
},
hideStar: {
type: Boolean
} }
}, },
...@@ -14,15 +18,8 @@ Component({ ...@@ -14,15 +18,8 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
colorObj: { colorObj: levelColorObj,
'S': '#E9E0FA', starCountObj: starCountObj
'A': '#D8F4D4',
'B+': '#D6F5EF',
'B': '#E6EFFF',
'B-': '#D5F1FA',
'C': '#F7EFCD',
'D': '#F9E0E0'
}
}, },
/** /**
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
.rate-item { .rate-item {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 24rpx;
.level-item { .level-item {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -11,6 +10,8 @@ ...@@ -11,6 +10,8 @@
height: 60rpx; height: 60rpx;
border-radius: 40rpx; border-radius: 40rpx;
margin-right: 24rpx; margin-right: 24rpx;
color: #222222;
font-weight: 500;
} }
.coeff { .coeff {
margin-left: 12rpx; margin-left: 12rpx;
......
<!--packageWorkspace/pages/performanceRating/components/levelRate/levelRate.wxml--> <!--packageWorkspace/pages/performanceRating/components/levelRate/levelRate.wxml-->
<view class="rate-item"> <view class="rate-item">
<view class="level-item" style="background: {{colorObj[info.levelCode]}};">{{info.levelCode}}级:{{info.scoreSymbolValue}}分</view> <view class="level-item" style="background: {{colorObj[info.levelCode]}};">{{info.levelCode}}级:{{info.scoreSymbolValue}}分</view>
<view class="rate-box"> <block wx:if="{{!hideStar}}">
<van-rate readonly value="{{ info.starCount }}" count="{{6}}" void-icon="star" size="16px" void-color="#DEE0E3" color="#FFB742" /> <view class="rate-box">
</view> <van-rate readonly value="{{ starCountObj[info.levelCode] }}" count="{{6}}" void-icon="star" size="16px" void-color="#DEE0E3" color="#FFB742" />
<view class="coeff">系数:{{info.rewardCoefficient}}</view> </view>
<view class="coeff">系数:{{info.rewardCoefficient}}</view>
</block>
</view> </view>
export const levelColorObj = {
'S': '#E9E0FA',
'A': '#D8F4D4',
'B+': '#D6F5EF',
'B': '#E6EFFF',
'B-': '#D5F1FA',
'C': '#F7EFCD',
'D': '#F9E0E0'
}
export const starCountObj = {
'S': 6,
'A': 5,
'B+': 4,
'B': 3,
'B-': 2,
'C': 1,
'D': 0
}
export const levelMap = {
'': '绩效',
'S': 'S',
'A': 'S',
'B+': 'B+',
'B': 'B',
'B-': 'B-',
'C': 'C',
'D': 'D'
}
export const levelList = [{
name: 'S',
value: 'S'
}, {
name: 'A',
value: 'A'
}, {
name: 'B+',
value: 'B+'
}, {
name: 'B',
value: 'B'
}, {
name: 'B-',
value: 'B-'
}, {
name: 'C',
value: 'C'
}, {
name: 'D',
value: 'D'
}]
export const statusMap = {
'': {name: '处理状态'},
'0': {name: '未处理', color: '#FF9D0A', background: '#ff9d0a1a'},
'1': {name: '已处理', color: '#35C376', background: '#35c3761a'}
}
export const statusList = [{
name: '已处理',
value: '1'
}, {
name: '未处理',
value: '2'
}]
\ No newline at end of file \ No newline at end of file
// packageWorkspace/pages/performanceRating/rateDetail/rateDetail.js // packageWorkspace/pages/performanceRating/rateDetail/rateDetail.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/'
import { levelList } from '~/packageWorkspace/pages/performanceRating/constant'
import api from '~/packageWorkspace/pages/performanceRating/api'
import NP from 'number-precision'
Page({ Page({
/** /**
...@@ -22,7 +25,10 @@ Page({ ...@@ -22,7 +25,10 @@ Page({
threshold: 15000, threshold: 15000,
levelCode: 'A', levelCode: 'A',
coefficient: '0.8' coefficient: '0.8'
} },
levelList: levelList,
pageQuery: {},
performanceList: []
}, },
navbarReady(e) { navbarReady(e) {
...@@ -40,7 +46,18 @@ Page({ ...@@ -40,7 +46,18 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.setData({
pageQuery: options,
currentMobile: options.mobilePhone
}, () => {
// 获取当前月份的绩效配置规则
this.getRuleConfig()
// 获取绩效评分详情
this.getDetail(options.mobilePhone)
// 获取全部员工绩效
this.getList()
})
}, },
/** /**
...@@ -57,9 +74,241 @@ Page({ ...@@ -57,9 +74,241 @@ Page({
}, },
getRuleConfig() {
const res = {
code: 0,
data: {
performanceLevelDetailDTOS: [{
levelCode: 'S',
scoreSymbolValue: '>150',
rewardCoefficient: '2.0'
}, {
levelCode: 'A',
scoreSymbolValue: '>120',
rewardCoefficient: '1.5'
}, {
levelCode: 'B+',
scoreSymbolValue: '>110',
rewardCoefficient: '1.3'
}, {
levelCode: 'B',
scoreSymbolValue: '=100',
rewardCoefficient: '1.0'
}, {
levelCode: 'B-',
scoreSymbolValue: '<85',
rewardCoefficient: '0.7'
}, {
levelCode: 'C',
scoreSymbolValue: '<70',
rewardCoefficient: '0.5'
}, {
levelCode: 'D',
scoreSymbolValue: '<60',
rewardCoefficient: '0.0'
}]
}
}
this.setData({
ruleConfigInfo: res.data
})
// let { pageQuery } = this.data
// api.getPerformanceRule({queryMonth: pageQuery.queryMonth}).then(res => {
// let { code, data, message } = res
// if (code == 0) {
// this.setData({
// ruleConfigInfo: data
// })
// } else {
// wx.$util.showToast(message)
// }
// })
},
getDetail(mobilePhone) {
const res = {
code: 0,
data: {
mobilePhone: '18452561247',
name: '张三',
evaluationMonth: '2026-01',
merchantName: '嘀加深圳园区店',
autoGradeCode: 'S',
autoRewardCoefficient: '2.0',
autoScoreSymbolValue: '>150',
manualGradeCode: 'A',
manualRewardCoefficient: '1.5',
manualScoreSymbolValue: '>120',
manualFinalPerformanceAmount: '',
isAutoPerformance: '1',
adoptType: '2',
totalGrossSalary: 4450.95,
performanceSalary: 2200,
baseSalary: 1850,
submitCount: 1,
basicSalary: 4050,
autoGradeType: 2
}
}
this.setData({
info: {
...res.data,
copyPerformanceSalary: wx.$util.deepClone(res.data.performanceSalary)
},
autoInfo: {
levelCode: res.data.autoGradeCode,
rewardCoefficient: res.data.autoRewardCoefficient,
scoreSymbolValue: res.data.autoScoreSymbolValue
}
})
if (res.data.adoptType == 2 && res.data.manualRewardCoefficient && res.data.performanceSalary) {
this.setData({
'info.performanceSalary': NP.times(res.data.performanceSalary, res.data.manualRewardCoefficient)
})
}
return
let { pageQuery } = this.data
api.performanceDetail({queryMonth: pageQuery.queryMonth, mobilePhone}).then(res => {
let {code, message, data} = res
if (code == 0) {
this.setData({
info: data
})
} else {
wx.$util.showToast(message)
}
})
},
checkIsFirstOrLast(list, targetMobile) {
if (!Array.isArray(list) || list.length === 0) {
return { isFirst: false, isLast: false }
}
const first = list[0].mobilePhone
const last = list[list.length - 1].mobilePhone
return {
isFirst: targetMobile == first,
isLast: targetMobile == last
}
},
getList() {
let { pageQuery } = this.data
const res = {
code: 0,
data: [{
mobilePhone: '13923832622'
}, {
mobilePhone: '15737326757'
}]
}
this.setData({
performanceList: res.data,
showLastBtn: !this.checkIsFirstOrLast(res.data, pageQuery.mobilePhone).isFirst,
showNextBtn: !this.checkIsFirstOrLast(res.data, pageQuery.mobilePhone).isLast
})
return
api.getPerformanceList({queryMonth: pageQuery.queryMonth, page}).then(res => {
let { code, data, message } = res
if (code == 0) {
this.setData({
performanceList: data || [],
})
} else {
wx.$util.showToast(message)
}
})
},
handleHelpPopup() {
console.log('111111')
this.setData({
showHelpPopup: true
})
},
// 手动评分选择绩效等级
selectLevelCode() {
let {
info,
levelList
} = this.data
this.setData({
showSelectPopup: true,
selectOptions: levelList,
selectTitle: '绩效',
selectMultiple: false,
selectValue: [info.manualGradeCode],
})
},
handlePopupConfirm(e) {
let { values } = e.detail
let { ruleConfigInfo, info } = this.data
const obj = ruleConfigInfo?.performanceLevelDetailDTOS?.find(val => val.levelCode == values[0])
this.setData({
[`info.manualGradeCode`]: values[0],
['info.manualScoreSymbolValue']: obj.scoreSymbolValue,
['info.manualRewardCoefficient']: obj.rewardCoefficient
})
// 未输入手动维护绩效金额 根据评分等级系数计算绩效工资
if (!info.manualFinalPerformanceAmount) {
const performanceSalary = NP.times(info.copyPerformanceSalary, obj.rewardCoefficient)
this.setData({
'info.performanceSalary': performanceSalary,
'info.basicSalary': NP.plus(performanceSalary, info.baseSalary)
})
}
this.hideSelectPopup()
},
hideSelectPopup() {
this.setData({
showSelectPopup: false
})
},
priceInput(e) {
let { value } = e.detail
let { info } = this.data
let cleanValue = value.replace(/[^\d.]/g, '')
const firstDotIndex = cleanValue.indexOf('.')
if (firstDotIndex !== -1) {
cleanValue = cleanValue.substring(0, firstDotIndex + 1) + cleanValue.substring(firstDotIndex + 1).replace(/\./g, '')
}
if (cleanValue === '.') {
cleanValue = '0.'
}
if (cleanValue.length > 1 && cleanValue.startsWith('0') && !cleanValue.startsWith('0.')) {
cleanValue = cleanValue.replace(/^0+/, '')
if (cleanValue === '') {
cleanValue = '0'
}
}
const numericValue = parseFloat(cleanValue)
if (numericValue > 10000) {
cleanValue = '10000'
} else if (numericValue === 10000 && cleanValue.includes('.')) {
cleanValue = '10000'
}
const dotIndexAfterCheck = cleanValue.indexOf('.');
if (dotIndexAfterCheck !== -1 && cleanValue.length > dotIndexAfterCheck + 3) {
cleanValue = cleanValue.substring(0, dotIndexAfterCheck + 3)
}
value = cleanValue
this.setData({
'info.manualFinalPerformanceAmount': value,
'info.performanceSalary': value,
'info.basicSalary': NP.plus(value, info.baseSalary)
})
},
// 查看规则 // 查看规则
goRule() { goRule() {
let { info, pageQuery } = this.data
wx.navigateTo({
url: `/packageWorkspace/pages/performanceRating/ruleNote/ruleNote?autoGradeType=${info.autoGradeType}&queryMonth=${pageQuery.queryMonth}`,
})
}, },
// 切换 // 切换
...@@ -71,6 +320,38 @@ Page({ ...@@ -71,6 +320,38 @@ Page({
}) })
}, },
// 提交
handleConfirm() {
},
_getCurrentIndex() {
let { performanceList, currentMobile } = this.data
return performanceList.findIndex(item => item.mobilePhone == currentMobile)
},
// 上一位
handleLast() {
let { performanceList } = this.data
const currentIndex = this._getCurrentIndex()
const prevPhone = performanceList[currentIndex - 1].mobilePhone
this.setData({
currentMobile: prevPhone,
showLastBtn: !this.checkIsFirstOrLast(performanceList, prevPhone).isFirst,
showNextBtn: !this.checkIsFirstOrLast(performanceList, prevPhone).isLast
})
this.getDetail(prevPhone)
},
// 下一位
handleNext() {
let { performanceList } = this.data
const currentIndex = this._getCurrentIndex()
const nextPhone = performanceList[currentIndex + 1].mobilePhone
this.setData({
currentMobile: nextPhone,
showLastBtn: !this.checkIsFirstOrLast(performanceList, nextPhone).isFirst,
showNextBtn: !this.checkIsFirstOrLast(performanceList, nextPhone).isLast
})
this.getDetail(nextPhone)
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
......
{ {
"usingComponents": {}, "usingComponents": {
"select-popup": "/packageWorkspace/components/selectPopup/selectPopup",
"level-rate": "../components/levelRate/levelRate",
"help-popup": "../components/helpPopup/helpPopup"
},
"navigationStyle": "custom" "navigationStyle": "custom"
} }
\ No newline at end of file \ No newline at end of file
...@@ -26,6 +26,12 @@ page { ...@@ -26,6 +26,12 @@ page {
.blue { .blue {
color: #347BFF; color: #347BFF;
} }
.help-icon {
width: 28rpx;
height: 28rpx;
flex-shrink: 0;
margin-left: 8rpx;
}
.content-box { .content-box {
border-radius: 32rpx; border-radius: 32rpx;
background: #ffffff; background: #ffffff;
...@@ -38,6 +44,11 @@ page { ...@@ -38,6 +44,11 @@ page {
color: #222222; color: #222222;
font-weight: 500; font-weight: 500;
margin-bottom: 16rpx; margin-bottom: 16rpx;
.title-icon {
width: 6rpx;
height: 32rpx;
margin-right: 16rpx;
}
image { image {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
...@@ -98,6 +109,9 @@ page { ...@@ -98,6 +109,9 @@ page {
} }
} }
} }
.radio-box {
border-bottom: 2rpx solid #F2F3F5;
}
.radio-item { .radio-item {
margin: 16rpx 0 24rpx; margin: 16rpx 0 24rpx;
padding: 10rpx 0; padding: 10rpx 0;
...@@ -153,6 +167,91 @@ page { ...@@ -153,6 +167,91 @@ page {
margin-left: 28rpx; margin-left: 28rpx;
} }
} }
.input-content {
margin: 16rpx 0;
font-size: 28rpx;
color: #222222;
image {
width: 28rpx;
height: 28rpx;
flex-shrink: 0;
margin: 0 16rpx 0 8rpx;
}
.input-box {
width: 196rpx;
height: 72rpx;
line-height: 72rpx;
box-sizing: border-box;
padding: 0 20rpx;
position: relative;
border-radius: 16rpx;
border: 2rpx solid #eff0f2;
.input {
height: 72rpx;
line-height: 72rpx;
width: 100%;
}
}
}
.input-tips {
font-size: 24rpx;
color: #888888;
line-height: 1.5;
}
.label {
font-weight: 500;
}
.unit {
margin: 0 4rpx;
font-size: 28rpx;
font-weight: 500;
&.font-s20{
font-size: 40rpx;
}
}
.price-box {
font-weight: 500;
color: #222222;
.left,.right {
flex: 1;
}
.price {
margin: 16rpx 0;
font-size: 40rpx;
font-family: "numberBold";
}
}
.fancy-divider {
position: relative;
width: 100%;
height: 1px;
background: #347bff80;
&::before {
content: '';
position: absolute;
left: 30rpx;
top: -10rpx;
width: 16rpx;
height: 16rpx;
background-color: #FFFFFF;
border: 2rpx solid #347bff80;
border-color: transparent transparent #347bff80 #347bff80;
transform: rotate(-45deg);
}
}
.base-box {
margin-top: 24rpx;
.comput-price {
margin-top: 16rpx;
font-size: 40rpx;
font-family: "numberBold";
}
}
.gross-price {
text-align: center;
font-family: "numberBold";
font-size: 68rpx;
}
} }
.top { .top {
display: flex; display: flex;
...@@ -181,4 +280,22 @@ page { ...@@ -181,4 +280,22 @@ page {
height: 138rpx; height: 138rpx;
} }
} }
.btn-box {
padding: 32rpx 40rpx 68rpx;
font-size: 32rpx;
.btn {
width: 100%;
height: 88rpx;
border-radius: 24rpx;
margin-bottom: 20rpx;
text-align: center;
line-height: 88rpx;
background: #FFFFFF;
&.confirm {
background: #2C66F7;
color: #FFFFFF;
font-weight: 500;
}
}
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -37,40 +37,95 @@ ...@@ -37,40 +37,95 @@
</view> </view>
<view class="content-box"> <view class="content-box">
<view class="content-title flex"> <view class="content-title flex">
<view class="left"><view class="left-top"></view></view> <image class="title-icon" src="{{IMG_URL}}title_icon.png" mode=""/>
<view>绩效评分</view> <view>绩效评分</view>
<view class="tips">支持手动修改</view> <view class="tips">支持手动修改</view>
</view> </view>
<view class="mar-t32">当前状态</view> <view class="mar-t32">当前状态</view>
<view class="radio-item flex" bindtap="changeRadio" data-value="1"> <view class="radio-box" style="padding-bottom: {{info.adoptType == 2 ? '16rpx' : ''}}">
<view wx:if="{{info.adoptType == 2}}" class="radio"></view> <view class="radio-item flex" bindtap="changeRadio" data-value="1">
<image wx:else src="{{IMG_URL}}radio-checked.png" mode=""/> <image wx:if="{{info.adoptType == 1}}" src="{{IMG_URL}}radio-checked.png" mode=""/>
<view class="label">系统自动设置</view> <view wx:else class="radio"></view>
</view> <view class="label">系统自动设置</view>
<view class="radio-item flex" bindtap="changeRadio" data-value="2"> <view style="margin-left: 8rpx;" wx:if="{{info.adoptType == 1 && info.autoGradeCode == 'D'}}"><level-rate info="{{autoInfo}}" hideStar="{{true}}" /></view>
<view wx:if="{{info.adoptType == 1}}" class="radio"></view> </view>
<image wx:else src="{{IMG_URL}}radio-checked.png" mode=""/> <view wx:if="{{info.adoptType == 1 && info.autoGradeCode != 'D'}}"><level-rate info="{{autoInfo}}" /></view>
<view class="label">手动自动设置</view> <view class="radio-item flex" bindtap="changeRadio" data-value="2">
<image wx:if="{{info.adoptType == 2}}" src="{{IMG_URL}}radio-checked.png" mode=""/>
<view wx:else class="radio"></view>
<view class="label">手动自动设置</view>
</view>
<block wx:if="{{info.adoptType == 2}}">
<view class="manual-box">
<view class="flex">
<view class="dot"></view>
<view>手动评分</view>
</view>
<view class="select flex just-space {{info.manualGradeCode ? '' : 'gary'}}" bindtap="selectLevelCode">
{{info.manualGradeCode || '请选择等级'}}
<image src="{{IMG_URL}}expand_icon.png" mode=""/>
</view>
<view class="blue rate">
<text>评分:</text>
<text>{{info.manualScoreSymbolValue || 0}}分</text>
<text class="mar-l32">系数:</text>
<text>{{info.manualRewardCoefficient || '0.0'}}</text>
</view>
</view>
</block>
</view> </view>
<block wx:if="{{info.adoptType == 2}}"> <block wx:if="{{info.adoptType == 2}}">
<view class="manual-box"> <view class="input-content flex">
<view class="flex"> <view>手动维护最终绩效金额</view>
<view class="dot"></view> <image src="{{IMG_URL}}caption-icon.png" class="help-icon" bindtap="handleHelpPopup" mode=""/>
<view>手动评分</view> <view class="input-box flex">
</view> <input class='input' placeholder="请输入" value="{{info.manualFinalPerformanceAmount}}" placeholder-style="color: #999EA8;" bindinput="priceInput" type="digit"/>
<view class="select flex just-space {{info.manualGradeCode ? '' : 'gary'}}"> <view>元</view>
{{info.manualGradeCode || '请选择等级'}}
<image src="{{IMG_URL}}expand_icon.png" mode=""/>
</view>
<view class="blue rate">
<text>评分:</text>
<text>{{info.manualScoreSymbolValue || 0}}分</text>
<text class="mar-l32">系数:</text>
<text>{{info.manualRewardCoefficient || '0.0'}}</text>
</view> </view>
</view> </view>
<view class="input-tips">根据系数算出绩效,如觉得绩效金额不合适,可<text class="blue">手动输入</text>最终绩效金额</view>
</block>
</view>
<view class="content-box">
<view class="content-title flex">
<image class="title-icon" src="{{IMG_URL}}title_icon.png" mode=""/>
<view>工资</view>
<view class="tips">当前收入是预估的,可在收到工资条后发起考勤等申诉</view>
</view>
<view class="flex price-box">
<view class="left">
<view class="flex"><view class="label">绩效工资</view><image class="help-icon" bindtap="handleHelpPopup" src="{{IMG_URL}}caption-icon.png" mode=""/></view>
<view class="price blue">{{info.performanceSalary}}<text class="unit blue">元</text></view>
</view>
<view class="right">
<view class="flex"><view class="label">底薪</view><image class="help-icon" bindtap="handleHelpPopup" src="{{IMG_URL}}caption-icon.png" mode=""/></view>
<view class="price blue">{{info.baseSalary}}<text class="unit blue">元</text></view>
</view>
</view>
<view class="fancy-divider"></view>
<view class="base-box">
<view class="flex"><view class="label">基本工资</view><image class="help-icon" bindtap="handleHelpPopup" src="{{IMG_URL}}caption-icon.png" mode=""/></view>
<view class="comput-price">{{info.performanceSalary}}<text class="unit font-s20">+</text>{{info.baseSalary}}<text class="unit font-s20">=</text><text class="blue">{{info.basicSalary}}</text><text class="blue unit">元</text></view>
</view>
</view>
<view class="content-box">
<view class="content-title flex">
<image class="title-icon" src="{{IMG_URL}}title_icon.png" mode=""/>
<view>合计应发工资</view>
<view class="tips">工资条上的金额</view>
</view>
<block wx:if="{{info.totalGrossSalary}}">
<view class="gross-price blue">{{info.totalGrossSalary}}<text class="unit">元</text></view>
</block> </block>
<block wx:else>
<empty-data emptyText="总部运营-薪酬专员 未出工资条" />
</block>
</view>
<view class="btn-box">
<view class="btn confirm" bindtap="handleConfirm" wx:if="{{info.submitCount < 2}}">提交</view>
<view class="btn" bindtap="handleLast" wx:if="{{showLastBtn}}">上一位</view>
<view class="btn" bindtap="handleNext" wx:if="{{showNextBtn}}">下一位</view>
</view> </view>
<view class="content-box"></view>
</view>
\ No newline at end of file \ No newline at end of file
</view>
<select-popup show="{{ showSelectPopup }}" options="{{ selectOptions }}" multiple="{{ selectMultiple }}" values="{{ selectValues }}" value="{{ selectValue }}" bindconfirm="handlePopupConfirm" title="{{ selectTitle }}" bindcancel="hideSelectPopup" customIsTab="{{ true }}"></select-popup>
<help-popup show="{{showHelpPopup}}" />
\ No newline at end of file \ No newline at end of file
...@@ -4,6 +4,7 @@ const __CUR_YM_TS__ = new Date(__NOW__.getFullYear(), __NOW__.getMonth(), 1).get ...@@ -4,6 +4,7 @@ const __CUR_YM_TS__ = new Date(__NOW__.getFullYear(), __NOW__.getMonth(), 1).get
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/'
const sysInfo = wx.getSystemInfoSync() const sysInfo = wx.getSystemInfoSync()
const rpxToPx = sysInfo.screenWidth / 750 const rpxToPx = sysInfo.screenWidth / 750
import {statusMap, statusList, levelList, levelMap, starCountObj} from '~/packageWorkspace/pages/performanceRating/constant'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import api from '../api' import api from '../api'
Page({ Page({
...@@ -22,49 +23,6 @@ Page({ ...@@ -22,49 +23,6 @@ Page({
performanceLevelDetailDTOS: [], performanceLevelDetailDTOS: [],
autoPerformRuleDetailDTO: {} autoPerformRuleDetailDTO: {}
}, },
rateRuleList: [{
level: 'S',
score: '>150',
color: '#E9E0FA',
rate: 6,
coefficient: 2.0
}, {
level: 'A',
score: '>120',
color: '#D8F4D4',
rate: 5,
coefficient: 1.5
}, {
level: 'B+',
score: '>110',
color: '#D6F5EF',
rate: 4,
coefficient: 1.3
}, {
level: 'B',
score: '=100',
color: '#E6EFFF',
rate: 3,
coefficient: 1
}, {
level: 'B-',
score: '<85',
color: '#D5F1FA',
rate: 2,
coefficient: 0.7
}, {
level: 'C',
score: '<70',
color: '#F7EFCD',
rate: 1,
coefficient: 0.5
}, {
level: 'D',
score: '<60',
color: '#F9E0E0',
rate: 0,
coefficient: 0.0
}],
row1: [ row1: [
{ label: '总人数', key: 'totalCount', value: 0 }, { label: '总人数', key: 'totalCount', value: 0 },
{ label: '当月入职人数', key: 'entryCount', value: 0 } { label: '当月入职人数', key: 'entryCount', value: 0 }
...@@ -83,50 +41,11 @@ Page({ ...@@ -83,50 +41,11 @@ Page({
performanceLevel: '', performanceLevel: '',
handleStatus: '' handleStatus: ''
}, },
levelMap: { statusMap: statusMap,
'': '绩效', statusList: statusList,
'S': 'S', levelList: levelList,
'A': 'S', levelMap: levelMap,
'B+': 'B+', starCountObj: starCountObj,
'B': 'B',
'B-': 'B-',
'C': 'C',
'D': 'D'
},
statusMap: {
'': {name: '处理状态'},
'0': {name: '未处理', color: '#FF9D0A', background: '#ff9d0a1a'},
'1': {name: '已处理', color: '#35C376', background: '#35c3761a'}
},
levelList: [{
name: 'S',
value: 'S'
}, {
name: 'A',
value: 'A'
}, {
name: 'B+',
value: 'B+'
}, {
name: 'B',
value: 'B'
}, {
name: 'B-',
value: 'B-'
}, {
name: 'C',
value: 'C'
}, {
name: 'D',
value: 'D'
}],
statusList: [{
name: '已处理',
value: '1'
}, {
name: '未处理',
value: '2'
}],
list: [] list: []
}, },
...@@ -187,6 +106,55 @@ Page({ ...@@ -187,6 +106,55 @@ Page({
manualRewardCoefficient: '1.0', manualRewardCoefficient: '1.0',
manualScoreSymbolValue: '>120', manualScoreSymbolValue: '>120',
submitCount: 1, submitCount: 1,
mobilePhone: '15737326757',
handleStatus: 0,
adoptType: 1
}, {
name: '张三',
merchantName: '嘀加深圳园区店',
autoRewardCoefficient: '0.8',
autoScoreSymbolValue: '>150',
autoGradeCode: 'A',
manualGradeCode: 'C',
manualRewardCoefficient: '1.0',
manualScoreSymbolValue: '>120',
submitCount: 1,
handleStatus: 0,
adoptType: 1
}, {
name: '张三',
merchantName: '嘀加深圳园区店',
autoRewardCoefficient: '0.8',
autoScoreSymbolValue: '>150',
autoGradeCode: 'A',
manualGradeCode: 'C',
manualRewardCoefficient: '1.0',
manualScoreSymbolValue: '>120',
submitCount: 1,
handleStatus: 0,
adoptType: 1
}, {
name: '张三',
merchantName: '嘀加深圳园区店',
autoRewardCoefficient: '0.8',
autoScoreSymbolValue: '>150',
autoGradeCode: 'A',
manualGradeCode: 'C',
manualRewardCoefficient: '1.0',
manualScoreSymbolValue: '>120',
submitCount: 1,
handleStatus: 0,
adoptType: 1
}, {
name: '张三',
merchantName: '嘀加深圳园区店',
autoRewardCoefficient: '0.8',
autoScoreSymbolValue: '>150',
autoGradeCode: 'A',
manualGradeCode: 'C',
manualRewardCoefficient: '1.0',
manualScoreSymbolValue: '>120',
submitCount: 1,
handleStatus: 0, handleStatus: 0,
adoptType: 1 adoptType: 1
}] }]
...@@ -197,7 +165,7 @@ Page({ ...@@ -197,7 +165,7 @@ Page({
val.symbolValue = val.adoptType == 1 ? val.autoScoreSymbolValue : val.adoptType == 2 ? val.manualScoreSymbolValue : '' val.symbolValue = val.adoptType == 1 ? val.autoScoreSymbolValue : val.adoptType == 2 ? val.manualScoreSymbolValue : ''
}) })
this.setData({ this.setData({
[`list[0]`]: res.data
}) })
return return
let { pageNum, nothing, filterObj, merchantAndStaffSearch } = this.data let { pageNum, nothing, filterObj, merchantAndStaffSearch } = this.data
...@@ -280,6 +248,57 @@ Page({ ...@@ -280,6 +248,57 @@ Page({
}, },
getRule(flag) { getRule(flag) {
const res = {
code: 0,
data: {
performanceLevelDetailDTOS: [{
levelCode: 'S',
scoreSymbolValue: '>150',
rewardCoefficient: '2.0'
}, {
levelCode: 'A',
scoreSymbolValue: '>120',
rewardCoefficient: '1.5'
}, {
levelCode: 'B+',
scoreSymbolValue: '>110',
rewardCoefficient: '1.3'
}, {
levelCode: 'B',
scoreSymbolValue: '=100',
rewardCoefficient: '1.0'
}, {
levelCode: 'B-',
scoreSymbolValue: '<85',
rewardCoefficient: '0.7'
}, {
levelCode: 'C',
scoreSymbolValue: '<70',
rewardCoefficient: '0.5'
}, {
levelCode: 'D',
scoreSymbolValue: '<60',
rewardCoefficient: '0.0'
}],
autoPerformRuleDetailDTO: {
isAutoPerform: 1,
monthOnboardAttendanceDays: 18,
monthOnboardOutputThreshold: 13500,
monthOnboardTriggerLevelCode: 'D',
monthOnboardTriggerRewardCoefficient: '0.0',
monthOnboardDefaultLevelCode: 'B',
noMonthOnboardOutputThreshold: '16800',
noMonthOnboardTriggerLevelCode: 'C',
noMonthOnboardTriggerRewardCoefficient: '0.5',
noMonthOnboardDefaultLevelCode: 'B'
}
}
}
this.setData({
rulesData: res.data || {},
showRule: flag
})
return
let { monthPickerValue } = this.data let { monthPickerValue } = this.data
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
api.getPerformanceRule({queryMonth: dayjs(monthPickerValue).format('YYYY-MM-DD')}).then(res => { api.getPerformanceRule({queryMonth: dayjs(monthPickerValue).format('YYYY-MM-DD')}).then(res => {
...@@ -292,10 +311,16 @@ Page({ ...@@ -292,10 +311,16 @@ Page({
}) })
}) })
}, },
// 批量操作
handleBatch() {
wx.navigateTo({
url: '/packageWorkspace/pages/performanceRating/batchOperation/batchOperation',
})
},
// 获取统计数据 // 获取统计数据
getStatics() { getStatics() {
let {monthPickerValue} = this.data let {monthPickerValue} = this.data
api.getPerformanceStatistics({queryMonth: dayjs(monthPickerValue).format('YYYY-MM-DD')}).then(res => { api.getPerformanceStatistics({queryMonth: dayjs(monthPickerValue).format('YYYY-MM')}).then(res => {
this.setData({ this.setData({
staticsData: res?.data || {} staticsData: res?.data || {}
}) })
...@@ -305,7 +330,8 @@ Page({ ...@@ -305,7 +330,8 @@ Page({
// 收起规则 // 收起规则
handleRuleClose() { handleRuleClose() {
this.setData({ this.setData({
showRule: false showRule: false,
scrollTop: 0
}) })
}, },
// 重置筛选条件 // 重置筛选条件
...@@ -315,6 +341,8 @@ Page({ ...@@ -315,6 +341,8 @@ Page({
performanceLevel: '', performanceLevel: '',
handleStatus: '' handleStatus: ''
} }
}, () => {
this.search()
}) })
}, },
onScroll(e) { onScroll(e) {
...@@ -373,7 +401,7 @@ Page({ ...@@ -373,7 +401,7 @@ Page({
let { values } = e.detail let { values } = e.detail
let { selectType } = this.data let { selectType } = this.data
this.setData({ this.setData({
[`filterObj.${selectType}`]: values [`filterObj.${selectType}`]: values[0]
}) })
this.hideSelectPopup() this.hideSelectPopup()
}, },
...@@ -383,6 +411,15 @@ Page({ ...@@ -383,6 +411,15 @@ Page({
showSelectPopup: false showSelectPopup: false
}) })
}, },
// 查看/编辑
handleDetail(e) {
let { target } = e.currentTarget.dataset
let { monthPickerValue } = this.data
wx.navigateTo({
url: `/packageWorkspace/pages/performanceRating/rateDetail/rateDetail?mobilePhone=${target.mobilePhone}&queryMonth=${dayjs(monthPickerValue).format('YYYY-MM')}`,
})
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
......
...@@ -136,6 +136,7 @@ page { ...@@ -136,6 +136,7 @@ page {
top: 0; top: 0;
margin: -16rpx -24rpx 0; margin: -16rpx -24rpx 0;
padding: 16rpx 24rpx; padding: 16rpx 24rpx;
z-index: 99;
} }
.is-sticky { .is-sticky {
background: #FFFFFF; background: #FFFFFF;
......
<!--packageWorkspace/pages/performanceRating/rateList/retaList.wxml--> <!--packageWorkspace/pages/performanceRating/rateList/retaList.wxml-->
<wxs module="utils">
var rateFormat = function(rateList, level) {
for (var i = 0; i < rateList.length; i++) {
if (rateList[i].level == level) {
return rateList[i].rate
}
}
return 0
}
module.exports = {
rateFormat: rateFormat
}
</wxs>
<view class="ratelist"> <view class="ratelist">
<view class="top-box flex"> <view class="top-box flex">
<view class="date-box flex" bindtap="openMonthPicker"> <view class="date-box flex" bindtap="openMonthPicker">
...@@ -23,13 +10,13 @@ ...@@ -23,13 +10,13 @@
<image src="{{IMG_URL}}note-icon.png" mode=""/> <image src="{{IMG_URL}}note-icon.png" mode=""/>
<view>规则说明</view> <view>规则说明</view>
</view> </view>
<view class="flex"> <view class="flex" bindtap="handleBatch">
<image src="{{IMG_URL}}batch-icon.png" mode=""/> <image src="{{IMG_URL}}batch-icon.png" mode=""/>
<view>批量操作</view> <view>批量操作</view>
</view> </view>
</view> </view>
</view> </view>
<scroll-view class="container" scroll-y show-scrollbar="{{false}}" enhanced="true" bindscroll="onScroll"> <scroll-view class="container" scroll-y show-scrollbar="{{false}}" scroll-top="{{scrollTop}}" enhanced="true" bindscroll="onScroll">
<view class="rule-card" wx:if="{{showRule}}"> <view class="rule-card" wx:if="{{showRule}}">
<view class="title flex"><image src="{{IMG_URL}}overview-icon.png" mode=""/>绩效评分规则总览</view> <view class="title flex"><image src="{{IMG_URL}}overview-icon.png" mode=""/>绩效评分规则总览</view>
<view class="box" wx:if="{{rulesData.autoPerformRuleDetailDTO.isAutoPerform == 1}}"> <view class="box" wx:if="{{rulesData.autoPerformRuleDetailDTO.isAutoPerform == 1}}">
...@@ -39,7 +26,9 @@ ...@@ -39,7 +26,9 @@
<view class="box"> <view class="box">
<view class="box-title">常规评分规则</view> <view class="box-title">常规评分规则</view>
<block wx:for="{{rulesData.performanceLevelDetailDTOS}}" wx:key="index"> <block wx:for="{{rulesData.performanceLevelDetailDTOS}}" wx:key="index">
<level-rate info="{{item}}" /> <view style="margin-bottom: 24rpx;">
<level-rate info="{{item}}" />
</view>
</block> </block>
</view> </view>
<view class="box" wx:if="{{rulesData.autoPerformRuleDetailDTO.isAutoPerform == 1}}"> <view class="box" wx:if="{{rulesData.autoPerformRuleDetailDTO.isAutoPerform == 1}}">
...@@ -114,16 +103,16 @@ ...@@ -114,16 +103,16 @@
</view> </view>
<view class="list-item"> <view class="list-item">
<view class="label">绩效分数</view> <view class="label">绩效分数</view>
<van-rate readonly value="{{ utils.rateFormat(rateRuleList, li.performanceLevel) }}" count="{{6}}" void-icon="star" size="16px" void-color="#DEE0E3" color="#FFB742" /> <van-rate readonly value="{{ starCountObj[li.performanceLevel] }}" count="{{6}}" void-icon="star" size="16px" void-color="#DEE0E3" color="#FFB742" />
<view class="score">{{li.symbolValue}}</view> <view class="score">{{li.symbolValue}}</view>
</view> </view>
<view class="list-item"> <view class="list-item">
<view class="label">绩效等级</view> <view class="label">绩效等级</view>
<view class="value"><text>{{li.performanceLevel}}</text><text wx:if="{{li.performanceLevel && li.coefficient}}" class="split">|</text><text>{{li.coefficient}}</text></view> <view class="value"><text wx:if="{{li.performanceLevel}}">{{li.performanceLevel}}级</text><text wx:if="{{li.performanceLevel && li.coefficient}}" class="split">|</text><text wx:if="{{li.coefficient}}">{{li.coefficient}}</text></view>
</view> </view>
<view class="btn-box flex"> <view class="btn-box flex">
<view bindtap="handleDetail" data-target="{{li}}" class="btn">查看</view> <view bindtap="handleDetail" data-target="{{li}}" class="btn">查看</view>
<view bindtap="handleDetail" data-target="{{li}}" class="btn primary">编辑{{(2 - submitCount) / 2}}</view> <view bindtap="handleDetail" data-target="{{li}}" class="btn primary">编辑{{(2 - li.submitCount)}}/2</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -19,10 +19,11 @@ Page({ ...@@ -19,10 +19,11 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
options = { // options = {
autoGradeType: '3', // autoGradeType: '3',
queryMonth: '2026-01-01' // queryMonth: '2026-01-01'
} // }
console.log(options, '22222')
this.getAutoResult(options) this.getAutoResult(options)
this.setData({ this.setData({
title: ['1', '2'].includes(options.autoGradeType) ? '新员工绩效 · 规则详情' : ['3', '4'] ? '老员工绩效 · 规则详情' : '无启用自动评绩效规则详情' title: ['1', '2'].includes(options.autoGradeType) ? '新员工绩效 · 规则详情' : ['3', '4'] ? '老员工绩效 · 规则详情' : '无启用自动评绩效规则详情'
......
...@@ -101,6 +101,78 @@ Page({ ...@@ -101,6 +101,78 @@ Page({
trackingCode: 'regional-assistant-order-approval' trackingCode: 'regional-assistant-order-approval'
} }
], ],
approvalMenus: [{
name: '退款审批',
icon: 'refund-review',
url: 'packageWorkspace.refundOperationList',
trackingCode: 'regional-assistant-refund-approval'
}],
storeManagementMenus: [{
name: "驻店管理",
url: "packageWorkspace.residentManage",
icon: "resident-manage",
trackingCode: 'regional-assistant-resident-manage'
}, {
name: "工作日报",
url: "packageWorkspace.supervisorDaily",
icon: "warranty-supervisor-daily",
reportTypeAttr: 'daily',
reportTypeVal: '1',
trackingCode: 'regional-modifications-supervisor-daily'
}, {
name: "工作周报",
url: "packageWorkspace.supervisorDaily",
icon: "modifications-supervisor-week",
reportTypeAttr: 'weekly',
reportTypeVal: '2',
trackingCode: 'regional-modifications-supervisor-daily'
}, {
name: "工作月报",
url: "packageWorkspace.supervisorDaily",
icon: "modifications-supervisor-month",
reportTypeAttr: 'monthly',
reportTypeVal: '3',
trackingCode: 'regional-modifications-supervisor-daily'
}],
staffDevelopmentMenus: [{
name: "招聘管理",
url: "packageWorkspace.recruitManage",
icon: "recruit-manage",
tipsNum: 0,
trackingCode: 'regional-assistant-recruit-manage'
}, {
name: "人才分析",
url: "packageWorkspace.talentAnalysis",
icon: "talent-analysis",
trackingCode: 'regional-assistant-talent-analysis'
}],
compensationMenus: [{
name: "绩效评分",
path: "/packageWorkspace/pages/performanceRating/rateList/retaList",
icon: "performance_rating_icon",
trackingCode: 'regional-assistant-performance-rating'
}, {
name: "有效引荐数",
path: "/packageWorkspace/pages/validReferralCount/referralCountList/referralCountList",
icon: "valid_referrals_icon",
trackingCode: 'regional-assistant-valid-referrals'
}, {
name: "考勤统计",
path: "/packageWorkspace/pages/attendanceStatis/attendanceList/attendanceList",
icon: "attendance_statistics_icon",
trackingCode: 'regional-assistant-attendance-statistics'
}, {
name: "申诉单",
path: "/packageWorkspace/pages/appealFormManage/appealFormList/appealFormList",
icon: "appeal_form_icon",
trackingCode: 'regional-assistant-appeal-form'
}, {
name: "订单审核",
path: "/packageWorkspace/pages/orderApprovalManage/orderApprovalList/orderApprovalList",
icon: "order_approval_icon",
trackingCode: 'regional-assistant-order-approval',
tipsNum: ''
}],
showReportPopup: false, showReportPopup: false,
reportTemplateList: [], reportTemplateList: [],
currentReportItem: null currentReportItem: null
...@@ -180,18 +252,17 @@ Page({ ...@@ -180,18 +252,17 @@ Page({
// }) // })
// } // }
} }
this.setData( this.setData({
{ approvalMenus,
approvalMenus, storeManagementMenus
storeManagementMenus }, () => {
}, // 获取退款待审批数量
() => { this.getWaitAuditCount(userInfo)
// 获取退款待审批数量 // 获取招聘管理待处理数量
this.getWaitAuditCount(userInfo) this.getWaitStaff()
// 获取招聘管理待处理数量 // 获取待审核订单数量
this.getWaitStaff() this.getWaitAudit()
} })
)
}, },
getWaitAuditCount(userInfo) { getWaitAuditCount(userInfo) {
...@@ -224,6 +295,14 @@ Page({ ...@@ -224,6 +295,14 @@ Page({
}) })
.catch(err => {}) .catch(err => {})
}, },
// 获取订单待审核角标数量
getWaitAudit() {
let { compensationMenus } = this.data
let index = compensationMenus.findIndex(e => e.name == '订单审核')
this.setData({
[`compensationMenus[${index}].tipsNum`]: 2
})
},
jump(e) { jump(e) {
// 创建节流函数,1500ms 内只能触发一次 // 创建节流函数,1500ms 内只能触发一次
......
...@@ -71,7 +71,7 @@ page { ...@@ -71,7 +71,7 @@ page {
} }
.hot_icon { .hot_icon {
position: absolute; position: absolute;
right: var(--fontSize40); right: var(--fontSize20);
top: 0; top: 0;
width: var(--fontSize38); width: var(--fontSize38);
height: var(--fontSize32); height: var(--fontSize32);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!