Commit 0d3b46b4 by zhangxw

需求开发

1 parent 2b3bb0e9
Showing 21 changed files with 778 additions and 62 deletions
......@@ -80,7 +80,9 @@
"pages/appealFormManage/appealFormList/appealFormList",
"pages/orderApprovalManage/orderApprovalList/orderApprovalList",
"pages/orderApprovalManage/orderApprovalDetail/orderApprovalDetail",
"pages/performanceRating/ruleNote/rulwNote"
"pages/performanceRating/ruleNote/ruleNote",
"pages/performanceRating/rateDetail/rateDetail",
"pages/performanceRating/batchOperation/batchOperation"
]
},
{
......
import api from '~/utils/request/request.js'
module.exports = {
// 获取绩效统计卡片
getPerformanceStatistics(data) {
return api.post('dj.staff.api.perf.appraisal.statistics.card', data)
},
// 获取月份绩效规则
getPerformanceRule(data) {
return api.post('dj.staff.api.perf.rule.config.get', data)
},
// 获取绩效考核列表
getPerformanceList(data) {
return api.post('dj.staff.api.perf.appraisal.list', data)
},
// 自动检测规则结果
autoDetectResult(data) {
return api.post('dj.staff.api.perf.appraisal.auto.detect.result', data)
},
// 绩效详情
performanceDetail(data) {
return api.post('dj.staff.api.perf.appraisal.detail', data)
},
// 单个提交规则评分
singleSubmit(data) {
return api.post('dj.staff.api.perf.appraisal.single.submit', data)
},
// 批量提交规则评分
batchSubmit(data) {
return api.post('dj.staff.api.perf.appraisal.batch.submit', data)
}
}
\ No newline at end of file
// packageWorkspace/pages/performanceRating/ruleNote/rulwNote.js
// packageWorkspace/pages/performanceRating/batchOperation/batchOperation.js
Page({
/**
......
{
"usingComponents": {}
"usingComponents": {},
"navigationBarTitleText": "批量操作"
}
\ No newline at end of file
/* packageWorkspace/pages/performanceRating/batchOperation/batchOperation.wxss */
\ No newline at end of file
<!--packageWorkspace/pages/performanceRating/batchOperation/batchOperation.wxml-->
<text>packageWorkspace/pages/performanceRating/batchOperation/batchOperation.wxml</text>
\ No newline at end of file
......@@ -14,7 +14,15 @@ Component({
* 组件的初始数据
*/
data: {
colorObj: {
'S': '#E9E0FA',
'A': '#D8F4D4',
'B+': '#D6F5EF',
'B': '#E6EFFF',
'B-': '#D5F1FA',
'C': '#F7EFCD',
'D': '#F9E0E0'
}
},
/**
......
<!--packageWorkspace/pages/performanceRating/components/levelRate/levelRate.wxml-->
<view class="rate-item">
<view class="level-item" style="background: {{info.color}};">{{info.level}}级:{{info.score}}分</view>
<view class="level-item" style="background: {{colorObj[info.levelCode]}};">{{info.levelCode}}级:{{info.scoreSymbolValue}}分</view>
<view class="rate-box">
<van-rate readonly value="{{ info.rate }}" count="{{6}}" void-icon="star" size="16px" void-color="#DEE0E3" color="#FFB742" />
<van-rate readonly value="{{ info.starCount }}" count="{{6}}" void-icon="star" size="16px" void-color="#DEE0E3" color="#FFB742" />
</view>
<view class="coeff">系数:{{info.coefficient}}</view>
<view class="coeff">系数:{{info.rewardCoefficient}}</view>
</view>
// packageWorkspace/pages/performanceRating/rateDetail/rateDetail.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/'
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
navBarHeight: 0,
info: {
name: '方敏',
entryDate: '2026-01-01',
merchantName: '嘀加深圳园区店嘀加深圳园区店嘀加深圳园区店嘀加深圳园区店嘀加深圳园区店',
actualAttendance: 18,
outputValue: 8500,
isEntry: '1',
adoptType: 1
},
resultInfo: {
days: 15,
threshold: 15000,
levelCode: 'A',
coefficient: '0.8'
}
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
back() {
wx.navigateBack()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
// 查看规则
goRule() {
},
// 切换
changeRadio(e) {
let { value } = e.currentTarget.dataset
console.log(value)
this.setData({
'info.adoptType': value
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationStyle": "custom"
}
\ No newline at end of file
/* packageWorkspace/pages/performanceRating/rateDetail/rateDetail.wxss */
page {
background: #F2F3F7;
}
.title {
max-length: 360rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.flex {
display: flex;
align-items: center;
}
.just-space {
justify-content: space-between;
}
.mar-t32 {
margin-top: 32rpx;
}
.mar-l32 {
margin-left: 32rpx;
}
.container {
padding: 12rpx 24rpx;
.blue {
color: #347BFF;
}
.content-box {
border-radius: 32rpx;
background: #ffffff;
padding: 24rpx 28rpx;
margin-bottom: 24rpx;
color: #222222;
font-size: 26rpx;
.content-title {
font-size: 28rpx;
color: #222222;
font-weight: 500;
margin-bottom: 16rpx;
image {
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
margin-right: 8rpx;
}
.left {
width: 6rpx;
height: 32rpx;
border-radius: 6rpx;
overflow: hidden;
background: #347bff33;
position: relative;
margin-right: 16rpx;
.left-top {
width: 6rpx;
height: 16rpx;
border-radius: 6rpx;
overflow: hidden;
background: linear-gradient(180deg, #2c66f7 0%, #389fff 100%);
position: absolute;
top: 0;
left: 0;
}
}
.tips {
margin-left: 16rpx;
color: #888888;
font-size: 22rpx;
}
}
.level-box {
margin-top: 16rpx;
border-radius: 16rpx;
background: #f2f7ff;
padding: 24rpx;
font-size: 28rpx;
color: #133667;
.box-title {
font-weight: 500;
}
.mr-16 {
margin: 16rpx 0;
}
.weight {
font-weight: 600;
margin-left: 8rpx;
}
.rule-box {
border-radius: 28rpx;
background: #ffffffb0;
padding: 4rpx 20rpx;
font-size: 22rpx;
color: #666666;
image {
width: 24rpx;
height: 24rpx;
}
}
}
.radio-item {
margin: 16rpx 0 24rpx;
padding: 10rpx 0;
.radio {
width: 32rpx;
height: 32rpx;
box-sizing: border-box;
padding: 4rpx;
flex-shrink: 0;
margin-right: 8rpx;
border-radius: 50%;
border: 2rpx solid #D0D2D6;
}
image {
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
}
.manual-box {
border-radius: 20rpx;
background: #f7f8fa;
padding: 24rpx 20rpx;
font-size: 26rpx;
color: #222222;
.dot {
width: 12rpx;
height: 12rpx;
border-radius: 50%;
margin-right: 16rpx;
background: #347BFF;
}
.select {
margin: 12rpx 0 12rpx 28rpx;
height: 72rpx;
border-radius: 16rpx;
background: #FFFFFF;
border: 2rpx solid #EFF0F2;
color: #222222;
font-size: 28rpx;
font-weight: 500;
padding: 0 20rpx;
&.gary {
color: #999EA8;
font-weight: 400;
}
image {
width: 32rpx;
height: 32rpx;
}
}
.rate {
margin-left: 28rpx;
}
}
}
.top {
display: flex;
align-items: center;
justify-content: space-between;
padding: 28rpx 32rpx;
.name {
font-size: 30rpx;
color: #222222;
font-weight: 500;
text {
font-size: 22rpx;
color: #999999;
font-weight: 400;
margin-left: 16rpx;
}
}
.merchant {
margin-top: 10rpx;
font-size: 26rpx;
color: #666666;
}
.bg-image {
margin: -24rpx 0;
width: 186rpx;
height: 138rpx;
}
}
}
\ No newline at end of file
<!--packageWorkspace/pages/performanceRating/rateDetail/rateDetail.wxml-->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back">
<view class="title">{{info.name}}绩效评分</view>
</navigation-bar>
<view class="container" style="margin-top: {{navBarHeight}}px;">
<view class="content-box top">
<view>
<view class="name">{{info.name}}<text>{{info.entryDate}}入职</text></view>
<view class="merchant">{{info.merchantName}}</view>
</view>
<image class="bg-image" src="{{IMG_URL}}rate_bg_image.png" mode=""/>
</view>
<view class="content-box">
<view class="content-title flex">
<image src="{{IMG_URL}}note-icon.png" mode=""/>
<text>系统检测到以下规则适用:</text>
</view>
<block wx:if="{{info.isEntry != 1}}">
<view>1.非当月入职员工</view>
</block>
<block wx:else>
<view>1.当月入职员工</view>
<view>2.实际出勤≥{{resultInfo.days}}天<text class="blue">({{info.actualAttendance}}天)</text></view>
<view>3.当月产值<{{resultInfo.threshold}}元 <text class="blue">(¥{{info.outputValue}})</text></view>
</block>
<view class="level-box">
<view class="flex just-space">
<view class="box-title">根据规则:</view>
<view class="rule-box flex" bindtap="goRule">
<text>查看规则</text>
<image src="{{IMG_URL}}arrow-left.png" mode=""/>
</view>
</view>
<view class="mr-16">绩效等级强制设为<text class="weight">{{resultInfo.levelCode}}级</text></view>
<view>奖励系数强制设为<text class="weight">{{resultInfo.coefficient}}</text></view>
</view>
</view>
<view class="content-box">
<view class="content-title flex">
<view class="left"><view class="left-top"></view></view>
<view>绩效评分</view>
<view class="tips">支持手动修改</view>
</view>
<view class="mar-t32">当前状态</view>
<view class="radio-item flex" bindtap="changeRadio" data-value="1">
<view wx:if="{{info.adoptType == 2}}" class="radio"></view>
<image wx:else src="{{IMG_URL}}radio-checked.png" mode=""/>
<view class="label">系统自动设置</view>
</view>
<view class="radio-item flex" bindtap="changeRadio" data-value="2">
<view wx:if="{{info.adoptType == 1}}" class="radio"></view>
<image wx:else src="{{IMG_URL}}radio-checked.png" mode=""/>
<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'}}">
{{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 class="content-box"></view>
</view>
\ No newline at end of file
......@@ -4,6 +4,8 @@ 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 sysInfo = wx.getSystemInfoSync()
const rpxToPx = sysInfo.screenWidth / 750
import dayjs from 'dayjs'
import api from '../api'
Page({
/**
......@@ -16,6 +18,10 @@ Page({
monthPickerValue: __CUR_YM_TS__,
pendingMonthValue: 0,
showRule: false,
rulesData: {
performanceLevelDetailDTOS: [],
autoPerformRuleDetailDTO: {}
},
rateRuleList: [{
level: 'S',
score: '>150',
......@@ -60,21 +66,22 @@ Page({
coefficient: 0.0
}],
row1: [
{ label: '总人数', key: 'allAmount', value: 0 },
{ label: '当月入职人数', key: '', value: 0 }
{ label: '总人数', key: 'totalCount', value: 0 },
{ label: '当月入职人数', key: 'entryCount', value: 0 }
],
row2: [
{ label: 'S', key: '', value: 0 },
{ label: 'A', value: 6 },
{ label: 'B+', value: 54 },
{ label: 'B', value: 51 },
{ label: 'B-', value: 4 },
{ label: 'C', value: 5 },
{ label: 'D', value: 3 }
{ label: 'S', key: 'sCount' },
{ label: 'A', key: 'aCount' },
{ label: 'B+', key: 'bPlusCount' },
{ label: 'B', key: 'bCount' },
{ label: 'B-', key: 'bMinusCount' },
{ label: 'C', key: 'cCount' },
{ label: 'D', key: 'dCount' }
],
staticsData: {},
filterObj: {
level: '',
status: ''
performanceLevel: '',
handleStatus: ''
},
levelMap: {
'': '绩效',
......@@ -88,8 +95,8 @@ Page({
},
statusMap: {
'': {name: '处理状态'},
'1': {name: '未处理', color: '#FF9D0A', background: '#ff9d0a1a'},
'2': {name: '已处理', color: '#35C376', background: '#35c3761a'}
'0': {name: '未处理', color: '#FF9D0A', background: '#ff9d0a1a'},
'1': {name: '已处理', color: '#35C376', background: '#35c3761a'}
},
levelList: [{
name: 'S',
......@@ -146,12 +153,12 @@ Page({
input(e) {
let { value } = e.detail
this.setData({keyword: value})
this.setData({merchantAndStaffSearch: value})
},
clear() {
this.setData({
keyword: ''
merchantAndStaffSearch: ''
}, () => {
this.search()
})
......@@ -166,19 +173,34 @@ Page({
})
this.getList()
},
// 获取统计数据
getStatics() {
},
// 获取列表数据
getList() {
const res = {
code: 0,
data: [{
name: '张三',
merchantName: '嘀加深圳园区店',
autoRewardCoefficient: '0.8',
autoScoreSymbolValue: '>150',
autoGradeCode: 'A',
manualGradeCode: 'C',
manualRewardCoefficient: '1.0',
manualScoreSymbolValue: '>120',
submitCount: 1,
handleStatus: 0,
adoptType: 1
}]
}
res?.data.forEach(val => {
val.performanceLevel = val.adoptType == 1 ? val.autoGradeCode : val.adoptType == 2 ? val.manualGradeCode : '',
val.coefficient = val.adoptType == 1 ? val.autoRewardCoefficient : val.adoptType == 2 ? val.manualRewardCoefficient : '',
val.symbolValue = val.adoptType == 1 ? val.autoScoreSymbolValue : val.adoptType == 2 ? val.manualScoreSymbolValue : ''
})
this.setData({
list: [[{staffName: '张三', status: '1', level: 'S', score: '>150', name: '梁达康', orderTime: '2026-01-07 10:05:32', allPrice: 6000},
{applyCode: 1, status: '2', orderType: 2, level: 'A', name: '梁达康', orderTime: '2026-01-07 10:05:32', allPrice: 6000},
{applyCode: 1, status: '3', orderType: 2, name: '梁达康', orderTime: '2026-01-07 10:05:32', allPrice: 6000}, ]]
})
return
let { pageNum, nothing, filterObj, keyword } = this.data
let { pageNum, nothing, filterObj, merchantAndStaffSearch } = this.data
let userInfo = wx.$util.getUserInfo()
if (nothing) return
const auditStatus = tabIndex == 1 ? 0 : tabIndex == 2 ? 3 : ''
......@@ -253,8 +275,30 @@ Page({
// 展示规则说明
handleRuleShow() {
this.setData({
showRule: true
// 获取月份绩效规则
this.getRule(true)
},
getRule(flag) {
let { monthPickerValue } = this.data
let userInfo = wx.$util.getUserInfo()
api.getPerformanceRule({queryMonth: dayjs(monthPickerValue).format('YYYY-MM-DD')}).then(res => {
this.setData({
rulesData: res?.data || {}
}, () => {
if (flag) {
this.setData({showRule: true})
}
})
})
},
// 获取统计数据
getStatics() {
let {monthPickerValue} = this.data
api.getPerformanceStatistics({queryMonth: dayjs(monthPickerValue).format('YYYY-MM-DD')}).then(res => {
this.setData({
staticsData: res?.data || {}
})
})
},
......@@ -268,8 +312,8 @@ Page({
handleFilterReset() {
this.setData({
filterObj: {
level: '',
status: ''
performanceLevel: '',
handleStatus: ''
}
})
},
......@@ -304,8 +348,8 @@ Page({
selectOptions: levelList,
selectTitle: '绩效',
selectMultiple: false,
selectValue: [filterObj.level],
selectType: 'level'
selectValue: [filterObj.performanceLevel],
selectType: 'performanceLevel'
})
},
......@@ -320,8 +364,8 @@ Page({
selectOptions: statusList,
selectTitle: '处理状态',
selectMultiple: false,
selectValue: [filterObj.status],
selectType: 'status'
selectValue: [filterObj.handleStatus],
selectType: 'handleStatus'
})
},
......
......@@ -244,6 +244,9 @@ page {
margin-right: 32rpx;
color: #999999;
}
.split {
margin: 0 8rpx;
}
.score {
margin-left: 12rpx;
}
......
......@@ -32,19 +32,19 @@
<scroll-view class="container" scroll-y show-scrollbar="{{false}}" enhanced="true" bindscroll="onScroll">
<view class="rule-card" wx:if="{{showRule}}">
<view class="title flex"><image src="{{IMG_URL}}overview-icon.png" mode=""/>绩效评分规则总览</view>
<view class="box">
<view class="box" wx:if="{{rulesData.autoPerformRuleDetailDTO.isAutoPerform == 1}}">
<view class="box-title">当月入职新员工规则</view>
<view class="box-content"><view>当月入职,出勤≥15天,产值<10000元 → 自动D级(系数:0)</view>除上述规则以外,当月入职的新员工绩效默认为【B】</view>
<view class="box-content"><view>当月入职,出勤≥{{rulesData.autoPerformRuleDetailDTO.monthOnboardAttendanceDays}}天,产值<{{rulesData.autoPerformRuleDetailDTO.monthOnboardOutputThreshold}}元 → 自动{{rulesData.autoPerformRuleDetailDTO.monthOnboardTriggerLevelCode}}级(系数:{{rulesData.autoPerformRuleDetailDTO.monthOnboardTriggerRewardCoefficient}})</view>除上述规则以外,当月入职的新员工绩效默认为【{{rulesData.autoPerformRuleDetailDTO.monthOnboardDefaultLevelCode}}】</view>
</view>
<view class="box">
<view class="box-title">常规评分规则</view>
<block wx:for="{{rateRuleList}}" wx:key="index">
<block wx:for="{{rulesData.performanceLevelDetailDTOS}}" wx:key="index">
<level-rate info="{{item}}" />
</block>
</view>
<view class="box">
<view class="box" wx:if="{{rulesData.autoPerformRuleDetailDTO.isAutoPerform == 1}}">
<view class="box-title">非当月入职新员工规则</view>
<view class="box-content"><view>当月总产值<10,000元 → 自动D级(系数:0</view>除上述规则以外,当月入职的新员工绩效默认为【B】</view>
<view class="box-content"><view>当月总产值<{{rulesData.autoPerformRuleDetailDTO.noMonthOnboardOutputThreshold}}元 → 自动{{rulesData.autoPerformRuleDetailDTO.noMonthOnboardTriggerLevelCode}}级(系数:{{rulesData.autoPerformRuleDetailDTO.noMonthOnboardTriggerRewardCoefficient}}</view>除上述规则以外,当月入职的新员工绩效默认为【{{rulesData.autoPerformRuleDetailDTO.noMonthOnboardDefaultLevelCode}}】</view>
</view>
<view class="arrow-btn flex"><view class="flex" bindtap="handleRuleClose">收起规则<image src="{{IMG_URL}}arrow-left.png" mode=""/></view></view>
</view>
......@@ -54,13 +54,13 @@
<view class="card-row">
<view wx:for="{{row1}}" wx:key="index" class="card">
<text class="label">{{item.label}}</text>
<text class="value">{{item.value}}</text>
<text class="value">{{staticsData[item.key] || 0}}</text>
</view>
</view>
<view class="card-row card-row2">
<view wx:for="{{row2}}" wx:key="index" class="card">
<text class="label">{{item.label}}</text>
<text class="value">{{item.value}}</text>
<text class="value">{{staticsData[item.key] || 0}}</text>
</view>
</view>
</view>
......@@ -69,19 +69,19 @@
<view class="search-box">
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="员工姓名/手机号查询" class="input" value="{{ keyword }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{ keyword }}">
<input type="text" placeholder="员工姓名/手机号查询" class="input" value="{{ merchantAndStaffSearch }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{ merchantAndStaffSearch }}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
</view>
<view class="filter-box flex">
<view class="flex">
<view class="filter-item flex {{filterObj.level ? 'active': ''}}" bindtap="handleLevelFilter">
<text>{{levelMap[filterObj.level]}}</text><image src="{{IMG_URL}}{{filterObj.level ? 'expand_icon_blue' : 'expand_icon'}}.png" mode=""/>
<view class="filter-item flex {{filterObj.performanceLevel ? 'active': ''}}" bindtap="handleLevelFilter">
<text>{{levelMap[filterObj.performanceLevel]}}</text><image src="{{IMG_URL}}{{filterObj.performanceLevel ? 'expand_icon_blue' : 'expand_icon'}}.png" mode=""/>
</view>
<view class="filter-item flex {{filterObj.status ? 'active': ''}}" bindtap="handleStatusFilter">
<text>{{statusMap[filterObj.status].name}}</text><image src="{{IMG_URL}}{{filterObj.status ? 'expand_icon_blue' : 'expand_icon'}}.png" mode=""/>
<view class="filter-item flex {{filterObj.handleStatus ? 'active': ''}}" bindtap="handleStatusFilter">
<text>{{statusMap[filterObj.handleStatus].name}}</text><image src="{{IMG_URL}}{{filterObj.handleStatus ? 'expand_icon_blue' : 'expand_icon'}}.png" mode=""/>
</view>
</view>
<view class="reset-btn" bindtap="handleFilterReset">重置</view>
......@@ -103,9 +103,9 @@
data-item="{{ li }}"
>
<view class="item-top">
<view class="name">{{li.staffName}}</view>
<view class="status text-center" style="color:{{ statusMap[li.status].color }};background-color:{{statusMap[li.status].background }};">
{{statusMap[li.status].name }}
<view class="name">{{li.name}}</view>
<view class="status text-center" style="color:{{ statusMap[li.handleStatus].color }};background-color:{{statusMap[li.handleStatus].background }};">
{{statusMap[li.handleStatus].name }}
</view>
</view>
<view class="list-item">
......@@ -114,16 +114,16 @@
</view>
<view class="list-item">
<view class="label">绩效分数</view>
<van-rate readonly value="{{ utils.rateFormat(rateRuleList, li.level) }}" count="{{6}}" void-icon="star" size="16px" void-color="#DEE0E3" color="#FFB742" />
<view class="score">{{li.score}}</view>
<van-rate readonly value="{{ utils.rateFormat(rateRuleList, li.performanceLevel) }}" count="{{6}}" void-icon="star" size="16px" void-color="#DEE0E3" color="#FFB742" />
<view class="score">{{li.symbolValue}}</view>
</view>
<view class="list-item">
<view class="label">入职门店</view>
<view class="value">{{li.merchantName}}</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>
<view class="btn-box flex">
<view bindtap="handleDetail" data-target="{{li}}" class="btn">查看</view>
<view bindtap="handleDetail" data-target="{{li}}" class="btn primary">编辑</view>
<view bindtap="handleDetail" data-target="{{li}}" class="btn primary">编辑{{(2 - submitCount) / 2}}</view>
</view>
</view>
</view>
......
import api from '../api'
// packageWorkspace/pages/performanceRating/ruleNote/rulwNote.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/regional-assistant/'
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
title: '',
ruleInfo: {
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
options = {
autoGradeType: '3',
queryMonth: '2026-01-01'
}
this.getAutoResult(options)
this.setData({
title: ['1', '2'].includes(options.autoGradeType) ? '新员工绩效 · 规则详情' : ['3', '4'] ? '老员工绩效 · 规则详情' : '无启用自动评绩效规则详情'
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
getAutoResult(data) {
const res = {
code: 0,
data: {
autoPerformRuleDetailDTO: {
monthOnboardAttendanceDays: 18,
monthOnboardOutputThreshold: 15000,
monthOnboardTriggerLevelCode: 'C',
monthOnboardTriggerRewardCoefficient: '0.8',
monthOnboardDefaultLevelCode: 'B',
noMonthOnboardOutputThreshold: 20000,
noMonthOnboardTriggerLevelCode: 'B',
noMonthOnboardTriggerRewardCoefficient: '1.0',
noMonthOnboardDefaultLevelCode: 'C'
}
}
}
if (['1', '2'].includes(data.autoGradeType)) {
this.setData({
ruleInfo: {
autoGradeType: data.autoGradeType,
days: res.data?.autoPerformRuleDetailDTO?.monthOnboardAttendanceDays,
threshold: res.data?.autoPerformRuleDetailDTO?.monthOnboardOutputThreshold,
levelCode: res.data?.autoPerformRuleDetailDTO?.monthOnboardTriggerLevelCode,
coefficient: res.data?.autoPerformRuleDetailDTO?.monthOnboardTriggerRewardCoefficient,
defaultLevelCode: res.data?.autoPerformRuleDetailDTO?.monthOnboardDefaultLevelCode
}
})
} else if (['3', '4'].includes(data.autoGradeType)) {
this.setData({
ruleInfo: {
autoGradeType: data.autoGradeType,
threshold: res.data?.autoPerformRuleDetailDTO?.noMonthOnboardOutputThreshold,
levelCode: res.data?.autoPerformRuleDetailDTO?.noMonthOnboardTriggerLevelCode,
coefficient: res.data?.autoPerformRuleDetailDTO?.noMonthOnboardTriggerRewardCoefficient,
defaultLevelCode: res.data?.autoPerformRuleDetailDTO?.noMonthOnboardDefaultLevelCode
}
})
}
return
api.getPerformanceRule({queryMonth: data.queryMonth}).then(res => {
this.setData({
ruleInfo: res.data || {}
})
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "规则说明"
}
\ No newline at end of file
/* packageWorkspace/pages/performanceRating/ruleNote/rulwNote.wxss */
page {
background: #F2F3F7;
}
.note-page {
.bg {
position: absolute;
right: 0;
top: 0;
width: 264rpx;
height: 196rpx;
z-index: -1;
}
.title {
text-align: center;
font-size: 32rpx;
color: #222222;
font-weight: 500;
margin: 40rpx auto 28rpx;
}
.container {
min-height: calc(100vh - 224rpx);
margin: 0 24rpx;
border-radius: 32px;
background: linear-gradient(0deg, #ffffff 88%, #ffffffb3 100%);
backdrop-filter: blur(8rpx);
padding: 32rpx;
.cont-title {
display: flex;
align-items: center;
color: #0755E6;
font-size: 28rpx;
font-weight: 500;
margin-bottom: 24rpx;
.dot {
width: 25rpx;
height: 25rpx;
background: #347BFF;
border-radius: 50%;
flex-shrink: 0;
margin-right: 12rpx;
}
}
.content {
margin-bottom: 40rpx;
font-size: 26rpx;
color: #333333;
line-height: 1.5;
.mb-24 {
margin-bottom: 24rpx;
}
.gray {
color: #888888;
}
}
}
.empty-box {
width: 100%;
height: 50rpx;
}
}
\ No newline at end of file
<!--packageWorkspace/pages/performanceRating/ruleNote/rulwNote.wxml-->
<view class="note-page">
<view class="bg"><image src="{{IMG_URL}}rate_bg_image.png" mode=""/></view>
<view class="title">{{title}}</view>
<view class="container">
<!-- 自动设置规则 -->
<block wx:if="{{ruleInfo.autoGradeType}}">
<view class="cont-title"><view class="dot"></view>自动设置规则</view>
<view class="content">
<view class="mb-24">
<view>适用条件(同时满足):</view>
<view>1.<text wx:if="{{ruleInfo.autoGradeType == 3 || ruleInfo.autoGradeType == 4}}">非</text>当月入职员工</view>
<view wx:if="{{ruleInfo.autoGradeType == 1 || ruleInfo.autoGradeType == 2}}">2.实际出勤天数 ≥ {{ruleInfo.days}}天</view>
<view><text>{{ruleInfo.autoGradeType == 1 || ruleInfo.autoGradeType == 2 ? 3 : 2}}</text>.当月总产值 < {{ruleInfo.threshold}}元</view>
</view>
<view class="mb-24">
<view>自动设置:</view>
<view>· 绩效等级:{{ruleInfo.levelCode}}级</view>
<view>· 奖励系数:{{ruleInfo.coefficient}}</view>
</view>
<view>
<view>例外情况:</view>
<view wx:if="{{ruleInfo.autoGradeType == 1 || ruleInfo.autoGradeType == 2}}">· 出勤 < {{ruleInfo.days}}天 → 按实际出勤比例计算</view>
<view>· 除上述规则以外,{{ruleInfo.autoGradeType == 1 || ruleInfo.autoGradeType == 2 ? '当月入职的新员工' : '非当月入职的员工'}}绩效默认为【{{ruleInfo.defaultLevelCode}}】</view>
</view>
</view>
</block>
<!-- 数据来源 -->
<block>
<view class="cont-title"><view class="dot"></view>数据来源说明</view>
<view class="content">
<view class="mb-24">
<view>出勤数据:企微考勤系统</view>
<view>计算方式:有效打卡天数</view>
</view>
<view class="mb-24">
<view>产值数据:业务系统</view>
<view>包含:订单总额</view>
</view>
<view class="mb-24">
<view>入职数据:北森HR系统</view>
<view>判端标准:入职日期</view>
</view>
</view>
</block>
<!-- 影响说明 -->
<block wx:if="{{ruleInfo.autoGradeType}}">
<view class="cont-title"><view class="dot"></view>影响说明</view>
<view class="content">
<view class="mb-24">对薪资的影响:</view>
<view class="mb-24 gray">
<view>底薪:正常计算(有疑问可让驻店销售走考勤申诉通道)</view>
<view>绩效工资:0</view>
<view>基本工资 = 底薪 + 0</view>
</view>
<view class="mb-24">可手动调整</view>
<view class="gray">区域经理可手动修改评分,也可手工维护最终一个绩效金额</view>
</view>
</block>
</view>
<view class="empty-box"></view>
</view>
\ No newline at end of file
/* packageWorkspace/pages/performanceRating/ruleNote/rulwNote.wxss */
\ No newline at end of file
<!--packageWorkspace/pages/performanceRating/ruleNote/rulwNote.wxml-->
<text>packageWorkspace/pages/performanceRating/ruleNote/rulwNote.wxml</text>
\ 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!