Commit 5318f190 by zhangxw

绩效评分需求开发

1 parent cf6b3206
Showing 40 changed files with 1641 additions and 877 deletions
...@@ -423,5 +423,9 @@ module.exports = { ...@@ -423,5 +423,9 @@ module.exports = {
// 获取员工日报/周报/月报模版 // 获取员工日报/周报/月报模版
getStaffTemplate(data) { getStaffTemplate(data) {
return api.post('dj.api.carboutique.find.staff.good.news.template', data) return api.post('dj.api.carboutique.find.staff.good.news.template', data)
},
// 获取异常订单待审核数量
getOrderWaitForAudit(data) {
return api.post('dj.api.smartcarlife.goodsOrderApplyRecord.waitForAudit.count', data)
} }
} }
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
"pages/orderApprovalManage/orderApprovalList/orderApprovalList", "pages/orderApprovalManage/orderApprovalList/orderApprovalList",
"pages/orderApprovalManage/orderApprovalDetail/orderApprovalDetail", "pages/orderApprovalManage/orderApprovalDetail/orderApprovalDetail",
"pages/performanceRating/ruleNote/ruleNote", "pages/performanceRating/ruleNote/ruleNote",
"pages/performanceRating/rateEdit/rateEdit",
"pages/performanceRating/rateDetail/rateDetail", "pages/performanceRating/rateDetail/rateDetail",
"pages/performanceRating/batchOperation/batchOperation", "pages/performanceRating/batchOperation/batchOperation",
"pages/validReferralCount/referraCountEdit/referraCountEdit", "pages/validReferralCount/referraCountEdit/referraCountEdit",
......
...@@ -51,6 +51,12 @@ Component({ ...@@ -51,6 +51,12 @@ Component({
confirmOnSelect: { confirmOnSelect: {
type: Boolean, type: Boolean,
value: false value: false
},
height: {
type: String
},
allowSearch: {
type: Boolean
} }
}, },
data: { data: {
...@@ -64,8 +70,10 @@ Component({ ...@@ -64,8 +70,10 @@ Component({
}, },
show(n) { show(n) {
// 进出场时保持数据一致 // 进出场时保持数据一致
console.log(this.data.value)
if (n) { if (n) {
this.setData({
searchValue: ''
})
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)
} }
} }
...@@ -82,13 +90,14 @@ Component({ ...@@ -82,13 +90,14 @@ Component({
}) })
this.setData({ this.setData({
displayOptions: display, displayOptions: display,
copyDisplayOptions: wx.$util.deepClone(display),
selectedValues: initSelected selectedValues: initSelected
}) })
}, },
toggle(e) { toggle(e) {
const { index } = e.currentTarget.dataset const { index, item } = e.currentTarget.dataset
const { multiple, max, valueKey } = this.properties const { multiple, max, valueKey } = this.properties
const item = this.data.displayOptions[index] let { displayOptions, copyDisplayOptions } = this.data
if (!item || item.disabled) return if (!item || item.disabled) return
if (multiple) { if (multiple) {
...@@ -101,7 +110,10 @@ Component({ ...@@ -101,7 +110,10 @@ Component({
return return
} }
} }
this.setData({ [`displayOptions[${index}].checked`]: nextChecked }) const selectIndex = displayOptions?.findIndex(v => v[valueKey] == item[valueKey])
this.setData({ [`displayOptions[${selectIndex}].checked`]: nextChecked })
const copySelectIndex = copyDisplayOptions?.findIndex(v => v[valueKey] == item[valueKey])
this.setData({ [`copyDisplayOptions[${copySelectIndex}].checked`]: nextChecked })
const val = item[valueKey] const val = item[valueKey]
let selected = this.data.selectedValues.slice() let selected = this.data.selectedValues.slice()
const pos = selected.findIndex(v => v === val) const pos = selected.findIndex(v => v === val)
...@@ -121,6 +133,32 @@ Component({ ...@@ -121,6 +133,32 @@ Component({
} }
} }
}, },
search(e) {
let { labelKey, copyDisplayOptions, displayOptions, selectedValues, valueKey } = this.data
let { value } = e.detail
if (!value) {
copyDisplayOptions.map(i => {
i.checked = false
if (selectedValues.includes(i[valueKey])) i.checked = true
return i
})
this.setData({
displayOptions: copyDisplayOptions
})
} else {
let arr = []
copyDisplayOptions.map(i => {
i.checked = false
if (selectedValues.includes(i[valueKey])) i.checked = true
if (i[labelKey].indexOf(value) != -1) {
arr.push(i)
}
})
this.setData({
displayOptions: arr
})
}
},
onCancel() { onCancel() {
this.triggerEvent('cancel') this.triggerEvent('cancel')
}, },
...@@ -130,7 +168,7 @@ Component({ ...@@ -130,7 +168,7 @@ Component({
this.triggerEvent('confirm', { values, items }) this.triggerEvent('confirm', { values, items })
}, },
getSelectedItems() { getSelectedItems() {
return (this.data.displayOptions || []).filter(it => it.checked) return (this.data.copyDisplayOptions || []).filter(it => it.checked)
} }
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
padding: 0 32rpx; padding: 0 32rpx;
box-sizing: border-box; box-sizing: border-box;
height: 100%; height: 100%;
&.hassearch {
height: calc(100% - 104rpx);
}
.sp-item { .sp-item {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -15,7 +18,7 @@ ...@@ -15,7 +18,7 @@
border-bottom: none; border-bottom: none;
} }
.label { .label {
max-width: 600rpx; max-width: 580rpx;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
......
<!--packageWorkspace/pages/performanceRating/components/selectPopup/selectPopup.wxml--> <!--packageWorkspace/pages/performanceRating/components/selectPopup/selectPopup.wxml-->
<popup show="{{show}}" title="{{title}}" height="50%" bind:confirm="onConfirm" bind:hidePopup="onCancel" customPopupSlotStyle="overflow:auto;"> <popup show="{{show}}" title="{{title}}" height="{{height || '50%'}}" bind:confirm="onConfirm" bind:hidePopup="onCancel" customPopupSlotStyle="overflow:auto;">
<scroll-view scroll-y show-scrollbar="{{false}}" enhanced class="sp-list"> <view wx:if="{{allowSearch}}">
<block wx:for="{{displayOptions}}" wx:key="value"> <search-input bindsearch="search" value="{{ searchValue }}" />
<view class="sp-item {{item.checked ? 'active' : ''}} {{item.disabled ? 'disabled' : ''}}" catchtap="toggle" data-index="{{index}}"> </view>
<scroll-view scroll-y show-scrollbar="{{false}}" enhanced class="sp-list {{allowSearch ? 'hassearch' : ''}}">
<block wx:if="{{displayOptions.length}}">
<block wx:for="{{displayOptions}}" wx:key="index">
<view class="sp-item {{item.checked ? 'active' : ''}} {{item.disabled ? 'disabled' : ''}}" catchtap="toggle" data-index="{{index}}" data-item="{{item}}">
<text class="label">{{item[labelKey] || item.label || item.text}}</text> <text class="label">{{item[labelKey] || item.label || item.text}}</text>
<image class="check" src="{{IMG_URL}}checked.png" wx:if="{{item.checked}}" /> <image class="check" src="{{IMG_URL}}checked.png" wx:if="{{item.checked}}" />
</view> </view>
</block> </block>
</block>
<block wx:else>
<empty-data />
</block>
</scroll-view> </scroll-view>
</popup> </popup>
\ No newline at end of file \ No newline at end of file
import api from '~/utils/request/request.js'
module.exports = {
// 获取订单审核列表
getOrderApplyList(data) {
return api.post('dj.api.smartcarlife.goodsOrderApplyRecord.page', data)
},
// 获取订单待审核详情
getOrderApplyDetail(data) {
return api.post('dj.api.smartcarlife.goodsOrderApplyRecord.detail.select', data)
},
// 订单申请审核
auditOrderApply(data) {
return api.post('dj.api.smartcarlife.goodsOrderApplyRecord.audit.update', data)
}
}
\ No newline at end of file \ No newline at end of file
...@@ -38,6 +38,7 @@ Component({ ...@@ -38,6 +38,7 @@ Component({
onConfirm() { onConfirm() {
let { infoData, remark } = this.data let { infoData, remark } = this.data
if (infoData.type == 2 && !remark) return wx.$util.showToast('请输入驳回备注') if (infoData.type == 2 && !remark) return wx.$util.showToast('请输入驳回备注')
this.triggerEvent('confirm', remark)
}, },
onCancel() { onCancel() {
this.triggerEvent('cancel') this.triggerEvent('cancel')
......
// packageWorkspace/pages/orderApprovalManage/components/goodsOrderItem/goodsOrderItem.js
Component({
/**
* 组件的属性列表
*/
properties: {
title: {
type: String,
value: '商品信息'
},
goodsData: {
type: Object,
value: {
subOrderList: [],
packageGoodsList: []
}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ 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/orderApprovalManage/components/goodsOrderItem/goodsOrderItem.wxss */
.flex {
display: flex;
align-items: center;
}
.column {
flex-flow: column;
}
.flex-start {
align-items: flex-start;
}
.just-space {
justify-content: space-between;
}
.section {
border-radius: 32rpx;
background: #ffffff;
margin: 24rpx 0;
padding: 24rpx 32rpx;
.section-title {
font-size: 30rpx;
font-weight: 500;
color: #222222;
margin-bottom: 24rpx;
}
.order-item {
border-radius: 20rpx;
background: #f7f8fa;
padding: 24rpx;
margin-bottom: 24rpx;
color: #222222;
font-size: 26rpx;
&:last-child {
margin-bottom: 0;
}
.just-space {
justify-content: space-between;
}
.package-item {
margin-bottom: 24rpx;
}
.name {
width: 410rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
}
.dot {
display: inline-block;
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: #347BFF;
margin: 12rpx 12rpx 0 0;
}
.gray {
font-size: 24rpx;
color: #999999;
margin-top: 8rpx;
.tag {
display: inline-block;
width: 56rpx;
height: 28rpx;
line-height: 28rpx;
border-radius: 6rpx;
border: 2rpx solid #f4a08f;
text-align: center;
color: #F24724;
}
}
.item-right {
text-align: right;
}
.pl-24 {
padding-left: 24rpx;
}
.split {
margin: 0 12rpx;
}
.ml-24 {
margin-left: 24rpx;
}
.count {
font-size: 24rpx;
color: #999999;
margin-top: 8rpx;
padding-left: 24rpx;
}
.item {
font-size: 26rpx;
color: #222222;
}
.package-list {
.list-item {
padding: 24rpx;
margin: 0 -24rpx;
border-top: 1px solid #dfe4f2;
&:last-child {
padding-bottom: 0;
}
}
}
}
}
\ No newline at end of file \ No newline at end of file
<!--packageWorkspace/pages/orderApprovalManage/components/goodsOrderItem/goodsOrderItem.wxml-->
<view class="section">
<view class="section-title">{{ title }}</view>
<!-- 普通商品 -->
<view class="order-item" wx:for="{{ goodsData.subOrderList }}" wx:key="index">
<view class="flex just-space flex-start">
<view class="item-left">
<view class="flex flex-start">
<text class="dot"></text>
<text class="name">{{ item.upgradeGoodsName }}</text>
</view>
<view class="gray pl-24">
<text>原价¥{{ item.totalPrice }}</text>
<text wx:if="{{ item.discountType != 3 && item.discountType != 5 }}" class="split">|</text>
<block wx:if="{{ item.discountType == 1 || item.discountType == 2 }}">
<text wx:if="{{ item.discountType == 1 }}">{{ item.discountValue }}折</text>
<text wx:else>折扣¥{{ item.discountValue }}</text>
</block>
<block wx:if="{{ item.discountType == 4 }}">
<text class="tag">赠品</text>
</block>
</view>
</view>
<view class="item-right">
<view class="price">¥{{ item.finalPrice }}</view>
<view class="gray">
共<text class="split">{{ item.number }}</text>件
</view>
</view>
</view>
</view>
<!-- 套餐商品 -->
<view class="order-item" wx:for="{{ goodsData.packageGoodsList }}" wx:key="index">
<view class="item flex just-space package-item">
<view class="item-left flex flex-start">
<text class="dot"></text>
<text class="name">{{ item.packageName }}</text>
</view>
<view class="item-right">
<text class="price">¥{{ item.packagePrice }}</text>
</view>
</view>
<view class="package-list">
<view
wx:for="{{ item.packageGoodsOrderList }}"
wx:for-item="subItem"
wx:for-index="subIndex"
wx:key="subIndex"
class="list-item flex just-space flex-start"
>
<view class="item-left">
<view class="flex flex-start pl-24">
<text class="name">{{ subItem.upgradeGoodsName }}</text>
</view>
<view class="gray pl-24">
<text>原价¥{{ subItem.totalPrice }}</text>
<text wx:if="{{ subItem.discountType != 3 && subItem.discountType != 5 }}" class="split">|</text>
<block wx:if="{{ subItem.discountType == 1 || subItem.discountType == 2 }}">
<text wx:if="{{ subItem.discountType == 1 }}">{{ subItem.discountValue }}折</text>
<text wx:else>折扣¥{{ subItem.discountValue }}</text>
</block>
<block wx:if="{{ subItem.discountType == 4 }}">
<text>赠品</text>
</block>
</view>
</view>
<view class="item-right">
<view class="price">¥{{ subItem.finalPrice }}</view>
<view class="gray">
共<text class="split">{{ subItem.number }}</text>件
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
// packageWorkspace/pages/orderApprovalManage/orderApprovalDetail/orderApprovalDetail.js // packageWorkspace/pages/orderApprovalManage/orderApprovalDetail/orderApprovalDetail.js
import api from "~/packageWorkspace/pages/orderApprovalManage/api"
import NP from 'number-precision'
import dayjs from "dayjs"
Page({ Page({
/** /**
...@@ -6,40 +9,14 @@ Page({ ...@@ -6,40 +9,14 @@ Page({
*/ */
data: { data: {
// 订单信息 // 订单信息
orderInfo: { orderInfo: {},
orderCode: '56118642212126', statusMap: {
orderType: '2',
allPrice: 99088.90,
name: '柔浔辉',
merchantName: '深圳福加门店深圳福加门店深圳福加门店深圳福加门店',
orderTime: '2026-01-07 10:05:32',
approvalStatus: '1',
subOrderList: [{
"type": "goods",
"name": "高透光太阳膜高透光太阳膜高透光太阳膜高透光太阳膜高透光太阳膜高透光太阳膜高透光太阳膜",
"price": "1000000.90",
"number": 1,
originalPrice: 800,
discountRate: 5,
discountPrice: 520,
discountType: 1
},
{
"type": "package",
"name": "平步青云全车贴膜套餐",
"packagePrice": "199.00",
"items": [
{ "name": "前挡风玻璃膜", "price": "179.00", "quantity": 1, "unit": "张" },
{ "name": "侧窗太阳膜(4门)", "price": "320.00", "quantity": 1, "unit": "套" }
]
}]
},
approvalMap: {
'1': {name: '待审核', tips: '请尽快处理', icon: 'more-o', color: '#FF9D0A'}, '1': {name: '待审核', tips: '请尽快处理', icon: 'more-o', color: '#FF9D0A'},
'2': {name: '已审核', tips: '订单已流转至线上运营审核', icon: 'passed', color: '#35C376'}, '2': {name: '已审核', tips: '订单已流转至线上运营审核', icon: 'passed', color: '#35C376'},
'3': {name: '已驳回', tips: '订单已驳回', icon: 'warning-o', color: '#666666'} '3': {name: '已审核', tips: '订单已被线上运营审核通过', icon: 'passed', color: '#35C376'},
'4': {name: '已驳回', tips: '订单已驳回', icon: 'warning-o', color: '#666666'}
}, },
orderTypeMap: { djOrderTypeMap: {
'': '订单类型', '': '订单类型',
'1': '打折策略', '1': '打折策略',
'2': '组合付款', '2': '组合付款',
...@@ -52,18 +29,19 @@ Page({ ...@@ -52,18 +29,19 @@ Page({
key: 'orderCode' key: 'orderCode'
}, { }, {
label: '订单类型', label: '订单类型',
key: 'orderType', key: 'djOrderType',
format: true format: true
}, { }, {
label: '总价', label: '总价',
key: 'allPrice' key: 'finalPrice',
unit: '¥'
}, { }, {
label: '提单人', label: '提单人',
key: ['name', 'merchantName'], key: ['sellerName', 'merchantName'],
arr: true arr: true
}, { }, {
label: '提单时间', label: '提单时间',
key: 'orderTime' key: 'applyDate'
}], }],
}, },
...@@ -72,30 +50,80 @@ Page({ ...@@ -72,30 +50,80 @@ Page({
*/ */
onLoad(options) { onLoad(options) {
// 可以从 options 中获取订单ID,然后加载详情 // 可以从 options 中获取订单ID,然后加载详情
const { orderId } = options const { orderCode } = options
if (orderId) { if (orderCode) {
this.loadOrderDetail(orderId) this.loadOrderDetail(orderCode)
} }
}, },
processOrderData(rawOrder) {
if (!rawOrder) return rawOrder
const processed = { ...rawOrder }
// 处理普通商品订单(goodsOrderDTO)
if (processed.goodsOrderDTO) {
processed.goodsOrderDTO = this.addPackagePrice(processed.goodsOrderDTO)
}
// 处理原错误订单(oldGoodsOrderDTO)
if (processed.oldGoodsOrderDTO) {
processed.oldGoodsOrderDTO = this.addPackagePrice(processed.oldGoodsOrderDTO)
}
return processed
},
addPackagePrice(orderDTO) {
const dto = { ...orderDTO }
if (Array.isArray(dto.packageGoodsList)) {
dto.packageGoodsList = dto.packageGoodsList.map(pkg => {
let total = 0
if (Array.isArray(pkg.packageGoodsOrderList)) {
total = pkg.packageGoodsOrderList.reduce((sum, item) => {
// const itemTotal = NP.times(item.finalPrice || 0, item.number || 1)
return NP.plus(sum, item.finalPrice)
}, 0)
}
return {
...pkg,
packagePrice: total
}
})
}
return dto
},
/** /**
* 加载订单详情 * 加载订单详情
*/ */
loadOrderDetail(orderId) { loadOrderDetail(orderCode) {
this.setData({ loading: true }) let { orderForm } = this.data
// 这里调用API获取订单详情 wx.$util.showLoading()
// 示例代码 api.getOrderApplyDetail({orderCode}).then(res => {
// wx.request({ wx.$util.hideLoading()
// url: '/api/order/detail', let { code, data, message } = res
// data: { orderId }, if (code == 0) {
// success: (res) => { // 处理商品信息
// this.setData({ const processedData = this.processOrderData(res.data || {})
// orderInfo: res.data.orderInfo, this.setData({
// productList: res.data.productList, orderInfo: processedData,
// loading: false 'orderInfo.applyDate': res.data.applyDate ? dayjs(res.data.applyDate).format('YYYY-MM-DD HH:mm:ss') : '-'
// }) })
// } if (res.data?.oldGoodsOrderDTO) {
// }) this.setData({
'orderInfo.oldOrderCode': res?.data.oldGoodsOrderDTO?.orderCode
}, () => {
const typeAIndex = orderForm.findIndex(f => f.key === 'djOrderType')
orderForm.splice(typeAIndex, 0, {
label: '原错误订单编号',
key: 'oldOrderCode'
})
this.setData({
orderForm
})
})
}
} else {
wx.$util.showToast(message)
}
})
}, },
/** /**
...@@ -129,38 +157,30 @@ Page({ ...@@ -129,38 +157,30 @@ Page({
/** /**
* 提交审核结果 * 提交审核结果
*/ */
submitApproval(status) { handlePopupConfirm(e) {
this.setData({ loading: true }) if (this.data.submitFlag) return
const { orderInfo, rejectReason } = this.data this.setData({
submitFlag: true
// 这里调用API提交审核结果 })
// wx.request({ wx.$util.showLoading()
// url: '/api/order/approval', const { orderInfo, popupInfo } = this.data
// method: 'POST', api.auditOrderApply({auditResult: popupInfo?.type, orderCode: orderInfo.orderCode, remark: e.detail}).then(res => {
// data: { wx.$util.hideLoading()
// orderId: orderInfo.orderNumber, this.setData({
// status: status, submitFlag: false
// rejectReason: status === 'rejected' ? rejectReason : '' })
// }, let { code, data, message } = res
// success: (res) => { if (code == 0) {
// this.setData({ loading: false, approvalStatus: status }) wx.navigateBack()
// wx.showToast({ } else {
// title: status === 'approved' ? '审核通过' : '已驳回', wx.$util.showToast(message)
// icon: 'success' }
// }) }).catch(() => {
// // 延迟返回上级页面 wx.$util.hideLoading()
// setTimeout(() => { this.setData({
// wx.navigateBack() submitFlag: false
// }, 1500) })
// }, })
// fail: () => {
// this.setData({ loading: false })
// wx.showToast({
// title: '提交失败,请重试',
// icon: 'error'
// })
// }
// })
}, },
hidePopup() { hidePopup() {
......
{ {
"usingComponents": { "usingComponents": {
"van-icon": "@vant/weapp/icon/index", "van-icon": "@vant/weapp/icon/index",
"approval-popup": "../components/approvalPopup/approvalPopup" "approval-popup": "../components/approvalPopup/approvalPopup",
"goods-order-item": "../components/goodsOrderItem/goodsOrderItem"
}, },
"navigationBarTitleText": "审核详情" "navigationBarTitleText": "审核详情"
} }
\ No newline at end of file \ No newline at end of file
...@@ -51,19 +51,19 @@ page { ...@@ -51,19 +51,19 @@ page {
margin-bottom: 0; margin-bottom: 0;
} }
.info-label { .info-label {
width: 104rpx; width: 184rpx;
margin-right: 32rpx; margin-right: 32rpx;
color: #999999; color: #999999;
flex-shrink: 0; flex-shrink: 0;
} }
.info-item { .info-item {
.text-hide { .text-hide {
max-width: 320rpx; max-width: 280rpx;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
&.name { &.name {
max-width: 160rpx; max-width: 120rpx;
} }
} }
.split { .split {
...@@ -71,72 +71,11 @@ page { ...@@ -71,72 +71,11 @@ page {
} }
} }
} }
.order-item {
border-radius: 20rpx;
background: #f7f8fa;
padding: 24rpx;
margin-bottom: 24rpx;
color: #222222;
font-size: 26rpx;
.just-space {
justify-content: space-between;
}
.package-item {
margin-bottom: 24rpx;
}
.name {
width: 410rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
}
.dot {
display: inline-block;
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: #347BFF;
margin: 12rpx 12rpx 0 0;
}
.gray {
font-size: 24rpx;
color: #999999;
margin-top: 8rpx;
}
.pl-24 {
padding-left: 24rpx;
}
.split {
margin: 0 8rpx;
}
.ml-24 {
margin-left: 24rpx;
}
.count {
font-size: 24rpx;
color: #999999;
margin-top: 8rpx;
padding-left: 24rpx;
}
.item {
font-size: 26rpx;
color: #222222;
}
.package-list {
.list-item {
padding: 24rpx;
margin: 0 -24rpx;
border-top: 1px solid #dfe4f2;
&:last-child {
padding-bottom: 0;
}
}
}
} }
} }
.empty-box {
width: 100%;
height: 180rpx;
} }
.footerBtn { .footerBtn {
position: fixed; position: fixed;
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
<!-- 审核状态标签 --> <!-- 审核状态标签 -->
<view class="status-section"> <view class="status-section">
<view class="status-badge"> <view class="status-badge">
<van-icon name="{{approvalMap[orderInfo.approvalStatus].icon}}" color="{{approvalMap[orderInfo.approvalStatus].color}}"></van-icon> <van-icon name="{{statusMap[orderInfo.status].icon}}" color="{{statusMap[orderInfo.status].color}}"></van-icon>
<text class="status-text">{{approvalMap[orderInfo.approvalStatus].name}}</text> <text class="status-text">{{statusMap[orderInfo.status].name}}</text>
</view> </view>
<text class="status-tip">{{approvalMap[orderInfo.approvalStatus].tips}}</text> <text class="status-tip">{{statusMap[orderInfo.status].tips}}</text>
</view> </view>
<!-- 订单信息 --> <!-- 订单信息 -->
...@@ -17,85 +17,30 @@ ...@@ -17,85 +17,30 @@
<view class="info-item" wx:for="{{orderForm}}" wx:key="index"> <view class="info-item" wx:for="{{orderForm}}" wx:key="index">
<text class="info-label">{{item.label}}</text> <text class="info-label">{{item.label}}</text>
<block wx:if="{{item.format}}"> <block wx:if="{{item.format}}">
<view class="info-item">{{orderTypeMap[orderInfo[item.key]]}}</view> <view class="info-item">{{djOrderTypeMap[orderInfo[item.key]]}}</view>
</block> </block>
<block wx:elif="{{item.arr}}"> <block wx:elif="{{item.arr}}">
<view class="info-item"><text class="name text-hide">{{orderInfo[item.key[0]]}}</text><text class="split">|</text><text class="text-hide">{{orderInfo[item.key[1]]}}</text></view> <view class="info-item"><text class="name text-hide">{{orderInfo[item.key[0]]}}</text><text class="split">|</text><text class="text-hide">{{orderInfo[item.key[1]]}}</text></view>
</block> </block>
<block wx:else> <block wx:else>
<text class="info-value">{{ orderInfo[item.key] }}</text> <text class="info-value"><text style="margin-right: 8rpx;" wx:if="{{item.unit}}">{{item.unit}}</text>{{ orderInfo[item.key] }}</text>
</block> </block>
</view> </view>
</view> </view>
<!-- 原错误订单商品信息 --> <!-- 原错误订单商品信息 -->
<view class="section" wx:if="{{orderInfo.errorOrderCode}}"> <goods-order-item
<view class="section-title">原错误订单商品信息</view> wx:if="{{orderInfo.oldOrderCode}}"
</view> title="原错误订单商品信息"
<!-- 商品信息 --> goodsData="{{orderInfo.oldGoodsOrderDTO}}"
<view class="section"> />
<view class="section-title">{{orderInfo.errorOrderCode ? '新订单商品信息' : '商品信息'}}</view> <!-- 新订单 / 普通订单 -->
<view class="order-item" wx:for="{{orderInfo.subOrderList}}" wx:key="index"> <goods-order-item
<!-- 商品类型 --> title="{{orderInfo.oldOrderCode ? '新订单商品信息' : '商品信息'}}"
<block wx:if="{{item.type == 'goods'}}"> goodsData="{{orderInfo.goodsOrderDTO}}"
<view class="flex just-space flex-start"> />
<view class="item-left"> <view class="empty-box"></view>
<view class="flex flex-start"> </view>
<text class="dot"></text> <view wx:if="{{orderInfo.status == 1}}" class="footerBtn {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<text class="name">{{item.name}}</text>
</view>
<view class="gray pl-24">
<text>原价¥{{item.originalPrice}}</text>
<text class="split">|</text>
<text wx:if="{{item.discountType == 1}}">{{item.discountRate}}折</text>
<text wx:else>折扣¥{{item.discountPrice}}</text>
</view>
</view>
<view class="item-right">
<view class="price">¥{{item.price}}</view>
<view class="gray">
共<text class="split">{{item.number}}</text>件
</view>
</view>
</view>
</block>
<!-- 套餐类型 -->
<view wx:elif="{{item.type === 'package'}}">
<view class="item flex just-space package-item">
<view class="item-left flex flex-start">
<text class="dot"></text>
<text class="name">{{item.name}}</text>
</view>
<view class="item-right">
<text class="price">¥{{item.packagePrice}}</text>
</view>
</view>
<!-- 套餐内商品列表 -->
<view class="package-list">
<view wx:for="{{item.items}}" class="list-item flex just-space flex-start" wx:key="index">
<view class="item-left">
<view class="flex flex-start pl-24">
<text class="name">{{item.name}}</text>
</view>
<view class="gray pl-24">
<text>原价¥{{item.originalPrice}}</text>
<text class="split">|</text>
<text wx:if="{{item.discountType == 1}}">{{item.discountRate}}折</text>
<text wx:else>折扣¥{{item.discountPrice}}</text>
</view>
</view>
<view class="item-right">
<view class="price">¥{{item.price}}</view>
<view class="gray">
共<text class="split">{{item.number}}</text>件
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="footerBtn {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="btn cancel" bindtap="reject">驳回</view> <view class="btn cancel" bindtap="reject">驳回</view>
<view class="btn confirm" bindtap="pass">通过</view> <view class="btn confirm" bindtap="pass">通过</view>
</view> </view>
......
// packageWorkspace/pages/orderApprovalManage/orderApprovalList/orderApprovalList.js // packageWorkspace/pages/orderApprovalManage/orderApprovalList/orderApprovalList.js
import dayjs from 'dayjs' import dayjs from 'dayjs'
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 api from '~/packageWorkspace/pages/orderApprovalManage/api'
Page({ Page({
/** /**
...@@ -9,34 +10,40 @@ Page({ ...@@ -9,34 +10,40 @@ Page({
data: { data: {
IMG_URL, IMG_URL,
filterObj: { filterObj: {
orderType: '', djOrderType: '',
orderStatus: '1', auditStatus: '1',
date: '' date: ''
}, },
maxDate: new Date().format('yyyy-MM-dd'), maxDate: new Date().format('yyyy-MM-dd'),
orderTypeMap: { djOrderTypeMap: {
'': '订单类型', '': '订单类型',
'1': '打折策略', '2': '打折策略',
'2': '组合付款', '5': '组合付款',
'3': '买赠策略', '3': '买赠策略',
'4': '冲量活动', '4': '冲量活动',
'5': '错误订单' '1': '错误订单'
}, },
orderStatusMap: { auditStatusMap: {
'': {name: '订单状态'}, '': '订单状态',
'1': '待审核',
'2': '已审核',
'3': '已驳回'
},
listAuditStatusMap: {
'1': {name: '待审核', color: '#FF9D0A', background: '#ff9d0a1a'}, '1': {name: '待审核', color: '#FF9D0A', background: '#ff9d0a1a'},
'2': {name: '已审核', color: '#35C376', background: '#35C3761a'}, '2': {name: '已审核', color: '#35C376', background: '#35C3761a'}, // 线上运营待审核,区域运营已审核过显示为已审核
'3': {name: '已驳回', color: '#777777', background: '#7777771a'} '3': {name: '已审核', color: '#35C376', background: '#35C3761a'},
'4': {name: '已驳回', color: '#777777', background: '#7777771a'}
}, },
orderTypeList: [{ djOrderTypeList: [{
name: '全部', name: '全部',
value: '' value: ''
}, { }, {
name: '打折策略', name: '打折策略',
value: '1' value: '2'
}, { }, {
name: '组合付款', name: '组合付款',
value: '2' value: '5'
}, { }, {
name: '买赠策略', name: '买赠策略',
value: '3' value: '3'
...@@ -45,9 +52,9 @@ Page({ ...@@ -45,9 +52,9 @@ Page({
value: '4' value: '4'
}, { }, {
name: '错误订单', name: '错误订单',
value: '5' value: '1'
}], }],
orderStatusList: [{ auditStatusList: [{
name: '全部', name: '全部',
value: '' value: ''
}, { }, {
...@@ -63,28 +70,28 @@ Page({ ...@@ -63,28 +70,28 @@ Page({
list: [], list: [],
errorOrderItems: [{ errorOrderItems: [{
label: '订单类型', label: '订单类型',
key: 'orderType', key: 'djOrderType',
format: true format: true
}, { }, {
label: '原错误订单编号', label: '原错误订单编号',
key: 'errorCode' key: 'errorCode'
}, { }, {
label: '提单人', label: '提单人',
key: 'name' key: 'sellerName'
}, { }, {
label: '提单时间', label: '提单时间',
key: 'orderTime' key: 'applyDate'
}], }],
orderItems: [{ orderItems: [{
label: '订单类型', label: '订单类型',
key: 'orderType', key: 'djOrderType',
format: true format: true
}, { }, {
label: '提单人', label: '提单人',
key: 'name' key: 'sellerName'
}, { }, {
label: '提单时间', label: '提单时间',
key: 'orderTime' key: 'applyDate'
}] }]
}, },
...@@ -92,7 +99,7 @@ Page({ ...@@ -92,7 +99,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.search()
}, },
/** /**
...@@ -106,16 +113,16 @@ Page({ ...@@ -106,16 +113,16 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.search()
}, },
input(e) { input(e) {
let { value } = e.detail let { value } = e.detail
this.setData({keyword: value}) this.setData({sellerName: value})
}, },
clear() { clear() {
this.setData({keyword: ''}) this.setData({sellerName: ''})
this.search() this.search()
}, },
...@@ -130,18 +137,19 @@ Page({ ...@@ -130,18 +137,19 @@ Page({
}, },
getList() { getList() {
this.setData({ let { pageNum, nothing, filterObj, sellerName, endStr, startStr } = this.data
list: [[{applyCode: 1, status: '1', orderType: 2, name: '梁达康', orderTime: '2026-01-07 10:05:32', allPrice: 6000},
{applyCode: 1, status: '2', orderType: 2, 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 userInfo = wx.$util.getUserInfo()
if (nothing) return if (nothing) return
const auditStatus = tabIndex == 1 ? 0 : tabIndex == 2 ? 3 : ''
wx.$util.showLoading() wx.$util.showLoading()
api.getRefundReviewListAPI({sceneType: userInfo.sceneType, auditStatus, pageNum, pageSize: 4}).then(res => { let params = {
sellerName,
djOrderType: filterObj.djOrderType,
auditStatus: filterObj.auditStatus,
pageNum,
pageSize: 10,
applyStartDateStr: startStr,
applyEndDateStr: endStr
}
api.getOrderApplyList(params).then(res => {
wx.$util.hideLoading() wx.$util.hideLoading()
let total = 0 let total = 0
let list = [] let list = []
...@@ -150,6 +158,9 @@ Page({ ...@@ -150,6 +158,9 @@ Page({
data, data,
message message
} = res } = res
data?.list?.forEach(val => {
val.applyDate = dayjs(val.applyDate).format('YYYY-MM-DD HH:mm:ss')
})
if (code == 0) { if (code == 0) {
list = data.list list = data.list
total = data.total total = data.total
...@@ -178,7 +189,7 @@ Page({ ...@@ -178,7 +189,7 @@ Page({
handleDetail(e) { handleDetail(e) {
let { target } = e.currentTarget.dataset let { target } = e.currentTarget.dataset
wx.navigateTo({ wx.navigateTo({
url: '/packageWorkspace/pages/orderApprovalManage/orderApprovalDetail/orderApprovalDetail', url: `/packageWorkspace/pages/orderApprovalManage/orderApprovalDetail/orderApprovalDetail?orderCode=${target.orderCode}`,
}) })
}, },
...@@ -187,7 +198,11 @@ Page({ ...@@ -187,7 +198,11 @@ Page({
date: { start, end } date: { start, end }
} = e.detail } = e.detail
this.setData({ this.setData({
['filterObj.date']: `${start} 至 ${end}` ['filterObj.date']: `${start} 至 ${end}`,
startStr: start,
endStr: end
}, () => {
this.search()
}) })
}, },
...@@ -195,25 +210,29 @@ Page({ ...@@ -195,25 +210,29 @@ Page({
handleFilterReset() { handleFilterReset() {
this.setData({ this.setData({
filterObj: { filterObj: {
orderType: '', djOrderType: '',
orderStatus: '', auditStatus: '',
date: '' date: ''
} },
startStr: '',
endStr: ''
}, () => {
this.search()
}) })
}, },
// 选择订单类型 // 选择订单类型
handleOrderTypeFilter() { handleOrderTypeFilter() {
let { let {
filterObj, filterObj,
orderTypeList djOrderTypeList
} = this.data } = this.data
this.setData({ this.setData({
showSelectPopup: true, showSelectPopup: true,
selectOptions: orderTypeList, selectOptions: djOrderTypeList,
selectTitle: '订单类型', selectTitle: '订单类型',
selectMultiple: false, selectMultiple: false,
selectValue: [filterObj.orderType], selectValue: [filterObj.djOrderType],
selectType: 'orderType' selectType: 'djOrderType'
}) })
}, },
...@@ -221,15 +240,15 @@ Page({ ...@@ -221,15 +240,15 @@ Page({
handleOrderStatusFilter() { handleOrderStatusFilter() {
let { let {
filterObj, filterObj,
orderStatusList auditStatusList
} = this.data } = this.data
this.setData({ this.setData({
showSelectPopup: true, showSelectPopup: true,
selectOptions: orderStatusList, selectOptions: auditStatusList,
selectTitle: '订单状态', selectTitle: '订单状态',
selectMultiple: false, selectMultiple: false,
selectValue: [filterObj.orderStatus], selectValue: [filterObj.auditStatus],
selectType: 'orderStatus' selectType: 'auditStatus'
}) })
}, },
...@@ -237,7 +256,9 @@ Page({ ...@@ -237,7 +256,9 @@ 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.search()
}) })
this.hideSelectPopup() this.hideSelectPopup()
}, },
......
...@@ -149,4 +149,7 @@ page { ...@@ -149,4 +149,7 @@ page {
} }
} }
} }
.list-nothing {
padding: 0 0 50rpx;
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -4,19 +4,19 @@ ...@@ -4,19 +4,19 @@
<view class="search-box"> <view class="search-box">
<view class="search-input"> <view class="search-input">
<image src="/images/search.png" class="search-icon" /> <image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="员工姓名" class="input" value="{{ keyword }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" /> <input type="text" placeholder="员工姓名" class="input" value="{{ sellerName }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{ keyword }}"> <block wx:if="{{ sellerName }}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" /> <image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block> </block>
</view> </view>
</view> </view>
<view class="filter-box flex"> <view class="filter-box flex">
<view class="flex"> <view class="flex">
<view class="filter-item flex {{filterObj.orderType ? 'active': ''}}" bindtap="handleOrderTypeFilter"> <view class="filter-item flex {{filterObj.djOrderType ? 'active': ''}}" bindtap="handleOrderTypeFilter">
<text>{{orderTypeMap[filterObj.orderType]}}</text><image src="{{IMG_URL}}{{filterObj.orderType ? 'expand_icon_blue' : 'expand_icon'}}.png" mode=""/> <text>{{djOrderTypeMap[filterObj.djOrderType]}}</text><image src="{{IMG_URL}}{{filterObj.djOrderType ? 'expand_icon_blue' : 'expand_icon'}}.png" mode=""/>
</view> </view>
<view class="filter-item flex {{filterObj.orderStatus ? 'active': ''}}" bindtap="handleOrderStatusFilter"> <view class="filter-item flex {{filterObj.auditStatus ? 'active': ''}}" bindtap="handleOrderStatusFilter">
<text>{{orderStatusMap[filterObj.orderStatus].name}}</text><image src="{{IMG_URL}}{{filterObj.orderStatus ? 'expand_icon_blue' : 'expand_icon'}}.png" mode=""/> <text>{{auditStatusMap[filterObj.auditStatus]}}</text><image src="{{IMG_URL}}{{filterObj.auditStatus ? 'expand_icon_blue' : 'expand_icon'}}.png" mode=""/>
</view> </view>
<calendar id="calender" class="calendar" allowSameDay shortcut bindselect="rangeSelect" calenderColor="#347BFF" vertical dateType='range' minDate="2024-01-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': ''}}">
...@@ -55,17 +55,17 @@ ...@@ -55,17 +55,17 @@
<text>订单编号</text> <text>订单编号</text>
<text class="code-text">{{li.applyCode}}</text> <text class="code-text">{{li.applyCode}}</text>
</view> </view>
<view class="status text-center" style="color:{{ orderStatusMap[li.status].color }};background-color:{{orderStatusMap[li.status].background }};"> <view class="status text-center" style="color:{{ listAuditStatusMap[li.status].color }};background-color:{{listAuditStatusMap[li.status].background }};">
{{orderStatusMap[li.status].name }} {{listAuditStatusMap[li.status].name }}
</view> </view>
</view> </view>
<view class="order-list"> <view class="order-list">
<block wx:for="{{li.orderType == 5 ? errorOrderItems : orderItems }}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i"> <block wx:for="{{li.djOrderType == 5 ? errorOrderItems : orderItems }}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i">
<view class="order flex"> <view class="order flex">
<view class="order-label">{{i.label}}</view> <view class="order-label">{{i.label}}</view>
<view class="order-value"> <view class="order-value">
<block wx:if="{{ i.format }}"> <block wx:if="{{ i.format }}">
<text>{{orderTypeMap[li[i.key]]}}</text> <text>{{djOrderTypeMap[li[i.key]]}}</text>
</block> </block>
<block wx:else>{{li[i.key] || ''}}</block> <block wx:else>{{li[i.key] || ''}}</block>
</view> </view>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
</block> </block>
</view> </view>
<view class="btn-box flex"> <view class="btn-box flex">
<view><text class="label">总价</text><text class="unit">¥</text><text>{{li.allPrice}}</text></view> <view><text class="label">总价</text><text class="unit">¥</text><text>{{li.finalPrice}}</text></view>
<view bindtap="handleDetail" data-target="{{li}}" class="btn {{li.status == 1 ? 'primary' : ''}}">{{li.status == 1 ? '审核' : '查看'}}</view> <view bindtap="handleDetail" data-target="{{li}}" class="btn {{li.status == 1 ? 'primary' : ''}}">{{li.status == 1 ? '审核' : '查看'}}</view>
</view> </view>
</view> </view>
......
import api from '~/utils/request/request.js' import api from '~/utils/request/request.js'
const service = '/rop-dj-staff-miniprogram/router'
module.exports = { module.exports = {
// 获取绩效统计卡片 // 获取绩效统计卡片
getPerformanceStatistics(data) { getPerformanceStatistics(data) {
return api.post('dj.staff.api.perf.appraisal.statistics.card', data) return api.post('dj.staff.api.perf.appraisal.statistics.card', data, [], service)
}, },
// 获取月份绩效规则 // 获取月份绩效规则
getPerformanceRule(data) { getPerformanceRule(data) {
return api.post('dj.staff.api.perf.rule.config.get', data) return api.post('dj.staff.api.perf.rule.config.get', data, [], service)
}, },
// 获取绩效考核列表 // 获取绩效考核列表
getPerformanceList(data) { getPerformanceList(data) {
return api.post('dj.staff.api.perf.appraisal.list', data) return api.post('dj.staff.api.perf.appraisal.list', data, [], service)
}, },
// 自动检测规则结果 // 自动检测规则结果
autoDetectResult(data) { autoDetectResult(data) {
return api.post('dj.staff.api.perf.appraisal.auto.detect.result', data) return api.post('dj.staff.api.perf.appraisal.auto.detect.result', data, [], service)
}, },
// 绩效详情 // 绩效详情
performanceDetail(data) { performanceDetail(data) {
return api.post('dj.staff.api.perf.appraisal.detail', data) return api.post('dj.staff.api.perf.appraisal.detail', data, [], service)
}, },
// 单个提交规则评分 // 单个提交规则评分
singleSubmit(data) { singleSubmit(data) {
return api.post('dj.staff.api.perf.appraisal.single.submit', data) return api.post('dj.staff.api.perf.appraisal.single.submit', data, [], service)
}, },
// 批量提交规则评分 // 批量提交规则评分
batchSubmit(data) { batchSubmit(data) {
return api.post('dj.staff.api.perf.appraisal.batch.submit', data) return api.post('dj.staff.api.perf.appraisal.batch.submit', data, [], service)
} },
// 获取员工列表(过滤提交过两次的员工)
getStaffListAPI(data) {
return api.post('dj.staff.api.perf.staff.list', data, [], service)
},
// 获取批量员工的绩效详情数据
getBatchPerformanceInfo(data) {
return api.post('dj.staff.api.perf.appraisal.batch.detail', data, [], service)
},
// 获取算工资的时间节点
getPerformanceTimeCycle(data) {
return api.post(
'dj.staff.api.performance.time.cycle.list',
data,
[],
service
)
},
} }
\ No newline at end of file \ No newline at end of file
// packageWorkspace/pages/performanceRating/batchOperation/batchOperation.js // packageWorkspace/pages/performanceRating/batchOperation/batchOperation.js
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({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
IMG_URL,
selectedStaffList: [],
staffList: [],
batchConfigType: 1,
batchInfo: {
manualGradeCode: ''
},
levelList: levelList
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
this.setData({
pageQuery: options
}, () => {
// 获取员工列表
this.getStaffList()
// 获取当前月份的绩效配置规则
this.getRuleConfig()
})
}, },
/** /**
...@@ -29,6 +47,264 @@ Page({ ...@@ -29,6 +47,264 @@ Page({
}, },
getRuleConfig() {
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)
}
})
},
getStaffList() {
let { pageQuery } = this.data
wx.$util.showLoading()
api.getStaffListAPI({queryMonth: pageQuery.queryMonth}).then(res => {
wx.$util.hideLoading()
let { code, data, message } = res
if (code == 0) {
data?.forEach(val => {
val.levelCode = val.adoptType == 1 ? val.autoGradeCode : val.adoptType == 2 ? val.manualGradeCode : ''
})
this.setData({
staffList: data || []
})
} else {
wx.$util.showToast(message)
}
})
},
// 批量选择员工
handleSelectStaff() {
let {
selectedStaffList,
staffList
} = this.data
this.setData({
showSelectPopup: true,
selectOptions: staffList,
selectTitle: '选择员工',
selectMultiple: true,
selectValues: selectedStaffList?.map(val => { return val.mobilePhone }),
selectType: 'staff'
})
},
handlePopupConfirm(e) {
let { selectType, singleSelectIndex, batchSingleList } = this.data
if (selectType == 'staff') {
let { items } = e.detail
this.setData({
selectedStaffList: items
}, () => {
// 获取批量员工的绩效数据
this.getBatchStaffPerformance()
})
} else {
let { values } = e.detail
let { ruleConfigInfo, batchInfo, batchFlag } = this.data
const obj = ruleConfigInfo?.performanceLevelDetailDTOS?.find(val => val.levelCode == values[0])
if (batchFlag) { // 统一设置等级
this.setData({
'batchInfo.manualGradeCode': values[0],
'batchInfo.manualScoreSymbolValue': obj.scoreSymbolValue,
'batchInfo.manualRewardCoefficient': obj.rewardCoefficient
})
} else {
this.setData({
[`batchSingleList[${singleSelectIndex}].manualGradeCode`]: values[0],
[`batchSingleList[${singleSelectIndex}].manualScoreSymbolValue`]: obj.scoreSymbolValue,
[`batchSingleList[${singleSelectIndex}].manualRewardCoefficient`]: obj.rewardCoefficient
})
// 未输入手动维护绩效金额 根据评分等级系数计算绩效工资
if (((batchSingleList[singleSelectIndex].manualFinalPerformanceAmount ?? '') === '')) {
const performanceSalary = NP.times(NP.times(batchSingleList[singleSelectIndex].afterAttendanceTotalBasicSalary, 0.3), obj.rewardCoefficient)
this.setData({
[`batchSingleList[${singleSelectIndex}].performanceSalary`]: performanceSalary,
[`batchSingleList[${singleSelectIndex}].basicSalary`]: NP.plus(performanceSalary, batchSingleList[singleSelectIndex].baseSalary)
})
}
}
}
this.hideSelectPopup()
},
hideSelectPopup() {
this.setData({showSelectPopup: false})
},
getBatchStaffPerformance() {
let { selectedStaffList, pageQuery } = this.data
if (!selectedStaffList.length) return
api.getBatchPerformanceInfo({queryMonth: pageQuery.queryMonth, mobilePhoneList: selectedStaffList?.map(val => { return val.mobilePhone })}).then(res => {
let { code, data, message } = res
if (code == 0) {
data?.forEach(val => {
val.gradeCode = val.adoptType == 1 ? val.autoGradeCode : val.adoptType == 2 ? val.manualGradeCode : '',
val.performanceSalary = !((val.manualFinalPerformanceAmount ?? '') === '') ? val.manualFinalPerformanceAmount : val.performanceSalary // 最终绩效工资
val.rewardCoefficient = val.adoptType == 1 ? val.autoRewardCoefficient : val.adoptType == 2 ? val.manualRewardCoefficient : '' // 最终奖励系数
val.scoreSymbolValue = val.adoptType == 1 ? val.autoScoreSymbolValue : val.adoptType == 2 ? val.manualScoreSymbolValue : '' // 最终分数范围
})
this.setData({
batchSingleList: data || []
})
} else {
wx.$util.showToast(message)
}
})
},
changeRadio(e) {
let { value } = e.currentTarget.dataset
let { selectedStaffList } = this.data
if (value == 2 && !selectedStaffList.length) return wx.$util.showToast('请选择员工')
this.setData({
batchConfigType: value
})
},
// 手动评分选择绩效等级
selectLevelCode(e) {
let { batch, index } = e.currentTarget.dataset
let {
batchInfo,
levelList,
batchSingleList
} = this.data
this.setData({
showSelectPopup: true,
selectOptions: levelList,
selectTitle: '绩效',
selectMultiple: false,
selectValue: batch ? [batchInfo.manualGradeCode] : [batchSingleList[index].manualGradeCode],
batchFlag: batch,
selectType: 'level',
singleSelectIndex: !batch ? index : null
})
},
priceInput(e) {
let { value } = e.detail
let { index } = e.currentTarget.dataset
let { batchConfigType, batchSingleList } = 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
if (batchConfigType == 1) {
this.setData({
'batchInfo.manualFinalPerformanceAmount': value
})
} else {
// 计算绩效工资,没有手动维护金额按绩效等级系数进行计算
const computedValue = value || (batchSingleList[index]?.manualGradeCode ? NP.times(NP.times(batchSingleList[index]?.afterAttendanceTotalBasicSalary, 0.3), batchSingleList[index].manualRewardCoefficient) : 0)
this.setData({
[`batchSingleList[${index}].manualFinalPerformanceAmount`]: value,
[`batchSingleList[${index}].performanceSalary`]: computedValue,
[`batchSingleList[${index}].basicSalary`]: NP.plus(computedValue, batchSingleList[index]?.baseSalary)
})
}
},
handleHelpPopup() {
this.setData({
showHelpPopup: true
})
},
handleConfirm() {
const { batchConfigType, batchInfo, batchSingleList, selectedStaffList, pageQuery } = this.data
if (!selectedStaffList.length) {
return wx.$util.showToast('请选择员工')
}
const mapStaffToSubmitItem = (staff, source) => ({
mobilePhone: staff.mobilePhone,
evaluationMonth: pageQuery.queryMonth,
manualGradeCode: source.manualGradeCode,
manualRewardCoefficient: source.manualRewardCoefficient,
manualScoreSymbolValue: source.manualScoreSymbolValue,
manualFinalPerformanceAmount: source.manualFinalPerformanceAmount,
adoptType: 2,
amountCalculationType: !((source.manualFinalPerformanceAmount ?? '') === '') ? 2 : 1
})
let perfAppraisalSubmitReqDTO = []
if (batchConfigType === 1) {
// 批量统一设置
if (!batchInfo.manualGradeCode && !batchInfo.manualFinalPerformanceAmount) {
return wx.$util.showToast('请配置绩效评分')
}
perfAppraisalSubmitReqDTO = selectedStaffList.map(staff =>
mapStaffToSubmitItem(staff, batchInfo)
)
} else {
for (const staff of batchSingleList) {
const hasGrade = (staff.manualGradeCode ?? '') !== '';
const hasAmount = (staff.manualFinalPerformanceAmount ?? '') !== ''
if (!hasGrade && !hasAmount) {
wx.$util.showToast(`请配置【${staff.name}】的绩效评分`)
}
}
perfAppraisalSubmitReqDTO = batchSingleList.map(staff =>
mapStaffToSubmitItem(staff, staff)
)
}
if (this.data.confirmFlag) return
this.setData({ confirmFlag: true })
wx.$util.showLoading()
const params = {
evaluationMonth: pageQuery.queryMonth,
perfAppraisalSubmitReqDTO
}
api.batchSubmit(params)
.then(res => {
wx.$util.hideLoading();
this.setData({ confirmFlag: false })
const { code, message } = res
if (code == 0) {
wx.navigateBack()
} else {
wx.showModal({
title: '提示',
content: message,
showCancel: false,
confirmText: '我知道了',
confirmColor: '#222222'
})
}
})
.catch(() => {
wx.$util.hideLoading()
this.setData({ confirmFlag: false })
})
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
......
{ {
"usingComponents": {}, "usingComponents": {
"select-popup": "/packageWorkspace/components/selectPopup/selectPopup",
"help-popup": "../components/helpPopup/helpPopup"
},
"navigationBarTitleText": "批量操作" "navigationBarTitleText": "批量操作"
} }
\ No newline at end of file \ No newline at end of file
/* packageWorkspace/pages/performanceRating/batchOperation/batchOperation.wxss */ /* packageWorkspace/pages/performanceRating/batchOperation/batchOperation.wxss */
page {
background: #F2F3F7;
}
.blue {
color: #347BFF;
}
.page-container {
padding: 12rpx 24rpx;
.flex {
display: flex;
align-items: center;
}
.just-space {
justify-content: space-between;
}
.mar-l32 {
margin-left: 32rpx;
}
.content-box {
background: #FFFFFF;
border-radius: 32rpx;
padding: 32rpx 24rpx;
font-size: 28rpx;
margin-bottom: 24rpx;
.content-title {
font-weight: 500;
image {
width: 32rpx;
height: 32rpx;
}
.title-icon {
width: 6rpx;
height: 32rpx;
margin-right: 16rpx;
}
.nums {
font-weight: 400;
margin-right: 8rpx;
}
}
.tag-box {
margin-top: 32rpx;
display: flex;
flex-wrap: wrap;
gap: 8rpx;
.tag-item {
color: #2C66F7;
font-size: 24rpx;
font-weight: 500;
height: 52rpx;
padding: 0 16rpx;
border-radius: 4px;
background: #347bff1a;
max-width: calc(50% - 8rpx);
margin-bottom: 8rpx;
flex-wrap: nowrap;
.text-hidex {
flex-shrink: 0;
}
.level {
flex-shrink: 0;
.split {
margin: 0 6rpx;
}
}
}
}
.sub-title {
margin: 32rpx 0 16rpx 0;
font-weight: 500;
}
.radio-box {
.radio-item {
margin: 16rpx 0 24rpx;
padding: 10rpx 0;
&:last-child {
margin-bottom: 0;
}
.radio {
width: 28rpx;
height: 28rpx;
box-sizing: border-box;
padding: 4rpx;
flex-shrink: 0;
margin-right: 14rpx;
border-radius: 50%;
border: 2rpx solid #D0D2D6;
}
image {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
}
}
.salary-box {
margin-top: 16rpx;
.salary-item {
flex: 1;
.label {
color: #999999;
font-size: 24rpx;
margin-bottom: 4rpx;
}
.value {
color: #222222;
font-size: 26rpx;
}
}
}
.manual-box {
margin-top: 16rpx;
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;
}
}
.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;
}
}
.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
<!--packageWorkspace/pages/performanceRating/batchOperation/batchOperation.wxml--> <!--packageWorkspace/pages/performanceRating/batchOperation/batchOperation.wxml-->
<text>packageWorkspace/pages/performanceRating/batchOperation/batchOperation.wxml</text>
\ No newline at end of file \ No newline at end of file
<view class="page-container">
<view class="content-box">
<view class="content-title flex just-space">
<view class="flex">
<image class="title-icon" src="{{IMG_URL}}title_icon.png" mode=""/>
<text>当前选中</text>
</view>
<view class="flex" bindtap="handleSelectStaff">
<view class="nums">{{selectedStaffList.length}}位员工</view>
<image src="{{IMG_URL}}arrow-left.png" mode=""/>
</view>
</view>
<view class="tag-box" wx:if="{{selectedStaffList.length}}">
<block wx:for="{{selectedStaffList}}" wx:key="index">
<view class="tag-item flex"><view class="text-hide">{{item.name}}</view><view class="level" wx:if="{{item.levelCode}}"><text class="split">·</text>{{item.levelCode}}级</view></view>
</block>
</view>
</view>
<view class="content-box">
<view class="content-title flex">
<image class="title-icon" src="{{IMG_URL}}title_icon.png" mode=""/>
<text>批量操作类型</text>
</view>
<view class="sub-title">批量设置绩效等级</view>
<view class="radio-box">
<view class="radio-item flex" bindtap="changeRadio" data-value="1">
<image wx:if="{{batchConfigType == 1}}" src="{{IMG_URL}}radio-checked.png" mode=""/>
<view wx:else class="radio"></view>
<view class="label">统一设置相同等级</view>
</view>
<view class="radio-item flex" bindtap="changeRadio" data-value="2">
<image wx:if="{{batchConfigType == 2}}" src="{{IMG_URL}}radio-checked.png" mode=""/>
<view wx:else class="radio"></view>
<view class="label">手工单个调整评级</view>
</view>
</view>
</view>
<block wx:if="{{batchConfigType == 1}}">
<view class="content-box">
<view class="content-title flex">
<image class="title-icon" src="{{IMG_URL}}title_icon.png" mode=""/>
<text>统一评等级</text>
</view>
<view class="manual-box">
<view class="flex">
<view class="dot"></view>
<view>手动评分</view>
</view>
<view class="select flex just-space {{batchInfo.manualGradeCode ? '' : 'gary'}}" bindtap="selectLevelCode" data-batch="{{true}}">
{{batchInfo.manualGradeCode || '请选择等级'}}
<image src="{{IMG_URL}}expand_icon.png" mode=""/>
</view>
<view class="blue rate">
<text>评分:</text>
<text>{{batchInfo.manualScoreSymbolValue || 0}}分</text>
<text class="mar-l32">系数:</text>
<text>{{batchInfo.manualRewardCoefficient || '0.0'}}</text>
</view>
</view>
<view class="input-content flex">
<view>手动维护最终绩效金额</view>
<image src="{{IMG_URL}}caption-icon.png" class="help-icon" bindtap="handleHelpPopup" mode=""/>
<view class="input-box flex">
<input class='input' placeholder="请输入" value="{{batchInfo.manualFinalPerformanceAmount}}" placeholder-style="color: #999EA8;" bindinput="priceInput" type="digit"/>
<view>元</view>
</view>
</view>
<view class="input-tips">根据系数算出绩效,如觉得绩效金额不合适,可<text class="blue">手动输入</text>最终绩效金额</view>
</view>
</block>
<block wx:else>
<view class="content-box" wx:for="{{batchSingleList}}" wx:key="index">
<view class="content-title flex">
<image class="title-icon" src="{{IMG_URL}}note-icon.png" mode=""/>
<text>{{item.name}}</text><text wx:if="{{item.gradeCode}}">·{{item.gradeCode}}级</text>
</view>
<view class="salary-box flex">
<view class="salary-item">
<view class="label">绩效工资</view>
<view class="value">{{item.performanceSalary}}</view>
</view>
<view class="salary-item">
<view class="label">底薪</view>
<view class="value">{{item.baseSalary}}</view>
</view>
<view class="salary-item">
<view class="label">基本工资</view>
<view class="value">{{item.basicSalary}}</view>
</view>
</view>
<view class="manual-box">
<view class="flex">
<view class="dot"></view>
<view>手动评分</view>
</view>
<view class="select flex just-space {{item.manualGradeCode ? '' : 'gary'}}" bindtap="selectLevelCode" data-index="{{index}}">
{{item.manualGradeCode || '请选择等级'}}
<image src="{{IMG_URL}}expand_icon.png" mode=""/>
</view>
<view class="blue rate">
<text>评分:</text>
<text>{{item.manualScoreSymbolValue || 0}}分</text>
<text class="mar-l32">系数:</text>
<text>{{item.manualRewardCoefficient || '0.0'}}</text>
</view>
</view>
<view class="input-content flex">
<view>手动维护最终绩效金额</view>
<image src="{{IMG_URL}}caption-icon.png" class="help-icon" bindtap="handleHelpPopup" mode=""/>
<view class="input-box flex">
<input class='input' placeholder="请输入" value="{{item.manualFinalPerformanceAmount}}" data-index="{{index}}" placeholder-style="color: #999EA8;" bindinput="priceInput" type="digit"/>
<view>元</view>
</view>
</view>
<view class="input-tips">根据系数算出绩效,如觉得绩效金额不合适,可<text class="blue">手动输入</text>最终绩效金额</view>
</view>
</block>
<view class="btn-box">
<view class="btn confirm" bindtap="handleConfirm">提交</view>
</view>
</view>
<select-popup show="{{ showSelectPopup }}" height="{{selectType == 'staff' ? '75%' : '50%'}}" allowSearch="{{selectMultiple}}" options="{{ selectOptions }}" valueKey="{{selectType == 'staff' ? 'mobilePhone' : 'value'}}" 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
...@@ -10,7 +10,6 @@ Component({ ...@@ -10,7 +10,6 @@ Component({
type: Boolean, //目前接受的类型包括:String, Number, Boolean, Object, Array, null(表示任意类型) type: Boolean, //目前接受的类型包括:String, Number, Boolean, Object, Array, null(表示任意类型)
value: false, // 默认值 value: false, // 默认值
observer(newVal, oldVal) { observer(newVal, oldVal) {
console.log('222')
if (newVal) { if (newVal) {
this.createMaskAnimate(true) this.createMaskAnimate(true)
} else { } else {
......
...@@ -21,7 +21,7 @@ export const starCountObj = { ...@@ -21,7 +21,7 @@ export const starCountObj = {
export const levelMap = { export const levelMap = {
'': '绩效', '': '绩效',
'S': 'S', 'S': 'S',
'A': 'S', 'A': 'A',
'B+': 'B+', 'B+': 'B+',
'B': 'B', 'B': 'B',
'B-': 'B-', 'B-': 'B-',
...@@ -63,5 +63,5 @@ export const statusList = [{ ...@@ -63,5 +63,5 @@ export const statusList = [{
value: '1' value: '1'
}, { }, {
name: '未处理', name: '未处理',
value: '2' value: '0'
}] }]
\ 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 api from '~/packageWorkspace/pages/performanceRating/api'
import NP from 'number-precision' import dayjs from 'dayjs'
Page({ Page({
/** /**
...@@ -11,24 +10,6 @@ Page({ ...@@ -11,24 +10,6 @@ Page({
data: { data: {
IMG_URL, IMG_URL,
navBarHeight: 0, 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'
},
levelList: levelList,
pageQuery: {},
performanceList: []
}, },
navbarReady(e) { navbarReady(e) {
...@@ -38,10 +19,6 @@ Page({ ...@@ -38,10 +19,6 @@ Page({
}) })
}, },
back() {
wx.navigateBack()
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -50,14 +27,9 @@ Page({ ...@@ -50,14 +27,9 @@ Page({
pageQuery: options, pageQuery: options,
currentMobile: options.mobilePhone currentMobile: options.mobilePhone
}, () => { }, () => {
// 获取当前月份的绩效配置规则
this.getRuleConfig()
// 获取绩效评分详情 // 获取绩效评分详情
this.getDetail(options.mobilePhone) this.getDetail(options.mobilePhone)
// 获取全部员工绩效
this.getList()
}) })
}, },
/** /**
...@@ -74,145 +46,21 @@ Page({ ...@@ -74,145 +46,21 @@ 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) { 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 let { pageQuery } = this.data
api.performanceDetail({queryMonth: pageQuery.queryMonth, mobilePhone}).then(res => { api.performanceDetail({queryMonth: pageQuery.queryMonth, mobilePhone}).then(res => {
let {code, message, data} = res let {code, message, data} = res
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
info: data info: {
}) ...data,
} else { entryDate: dayjs(data?.entryDate).format('YYYY-MM-DD')
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
}
}, },
performanceInfo: {
getList() { levelCode: data?.adoptType == 1 ? data?.autoGradeCode : data?.adoptType == 2 ? data?.manualGradeCode : '',
let { pageQuery } = this.data rewardCoefficient: data?.adoptType == 1 ? data?.autoRewardCoefficient.toFixed(1) : data?.adoptType == 2 ? data?.manualRewardCoefficient.toFixed(1) : '',
const res = { scoreSymbolValue: data?.adoptType == 1 ? data?.autoScoreSymbolValue : data?.adoptType == 2 ? data?.manualScoreSymbolValue : ''
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 { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -221,137 +69,15 @@ Page({ ...@@ -221,137 +69,15 @@ Page({
}, },
handleHelpPopup() { handleHelpPopup() {
console.log('111111')
this.setData({ this.setData({
showHelpPopup: true showHelpPopup: true
}) })
}, },
// 手动评分选择绩效等级 back() {
selectLevelCode() { wx.navigateBack()
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() {
let { info, pageQuery } = this.data
wx.navigateTo({
url: `/packageWorkspace/pages/performanceRating/ruleNote/ruleNote?autoGradeType=${info.autoGradeType}&queryMonth=${pageQuery.queryMonth}`,
})
},
// 切换
changeRadio(e) {
let { value } = e.currentTarget.dataset
console.log(value)
this.setData({
'info.adoptType': value
})
}, },
// 提交
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", "level-rate": "../components/levelRate/levelRate",
"help-popup": "../components/helpPopup/helpPopup" "help-popup": "../components/helpPopup/helpPopup"
}, },
......
...@@ -80,124 +80,6 @@ page { ...@@ -80,124 +80,6 @@ page {
font-size: 22rpx; 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-box {
border-bottom: 2rpx solid #F2F3F5;
}
.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;
}
}
.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 { .label {
font-weight: 500; font-weight: 500;
} }
...@@ -280,22 +162,4 @@ page { ...@@ -280,22 +162,4 @@ 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
<!--packageWorkspace/pages/performanceRating/rateDetail/rateDetail.wxml--> <!--packageWorkspace/pages/performanceRating/rateDetail/rateDetail.wxml-->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back"> <navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back">
<view class="title">{{info.name}}绩效评分</view> <view class="title">{{info.name}}绩效评分详情</view>
</navigation-bar> </navigation-bar>
<view class="container" style="margin-top: {{navBarHeight}}px;"> <view class="container" style="margin-top: {{navBarHeight}}px;">
<view class="content-box top"> <view class="content-box top">
...@@ -12,79 +12,10 @@ ...@@ -12,79 +12,10 @@
</view> </view>
<view class="content-box"> <view class="content-box">
<view class="content-title flex"> <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">
<image class="title-icon" src="{{IMG_URL}}title_icon.png" mode=""/> <image class="title-icon" src="{{IMG_URL}}title_icon.png" mode=""/>
<view>绩效评分</view> <view>绩效评分</view>
<view class="tips">支持手动修改</view>
</view>
<view class="mar-t32">当前状态</view>
<view class="radio-box" style="padding-bottom: {{info.adoptType == 2 ? '16rpx' : ''}}">
<view class="radio-item flex" bindtap="changeRadio" data-value="1">
<image wx:if="{{info.adoptType == 1}}" src="{{IMG_URL}}radio-checked.png" mode=""/>
<view wx:else class="radio"></view>
<view class="label">系统自动设置</view>
<view style="margin-left: 8rpx;" wx:if="{{info.adoptType == 1 && info.autoGradeCode == 'D'}}"><level-rate info="{{autoInfo}}" hideStar="{{true}}" /></view>
</view> </view>
<view wx:if="{{info.adoptType == 1 && info.autoGradeCode != 'D'}}"><level-rate info="{{autoInfo}}" /></view> <level-rate info="{{performanceInfo}}" />
<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>
<block wx:if="{{info.adoptType == 2}}">
<view class="input-content flex">
<view>手动维护最终绩效金额</view>
<image src="{{IMG_URL}}caption-icon.png" class="help-icon" bindtap="handleHelpPopup" mode=""/>
<view class="input-box flex">
<input class='input' placeholder="请输入" value="{{info.manualFinalPerformanceAmount}}" placeholder-style="color: #999EA8;" bindinput="priceInput" type="digit"/>
<view>元</view>
</view>
</view>
<view class="input-tips">根据系数算出绩效,如觉得绩效金额不合适,可<text class="blue">手动输入</text>最终绩效金额</view>
</block>
</view> </view>
<view class="content-box"> <view class="content-box">
<view class="content-title flex"> <view class="content-title flex">
...@@ -121,11 +52,5 @@ ...@@ -121,11 +52,5 @@
<empty-data emptyText="总部运营-薪酬专员 未出工资条" /> <empty-data emptyText="总部运营-薪酬专员 未出工资条" />
</block> </block>
</view> </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>
<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}}" /> <help-popup show="{{showHelpPopup}}" />
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"select-popup": "/packageWorkspace/components/selectPopup/selectPopup",
"level-rate": "../components/levelRate/levelRate",
"help-popup": "../components/helpPopup/helpPopup"
},
"navigationStyle": "custom"
}
\ No newline at end of file \ 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;
}
.help-icon {
width: 28rpx;
height: 28rpx;
flex-shrink: 0;
margin-left: 8rpx;
}
.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;
.title-icon {
width: 6rpx;
height: 32rpx;
margin-right: 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-box {
border-bottom: 2rpx solid #F2F3F5;
}
.radio-item {
margin: 16rpx 0 24rpx;
padding: 10rpx 0;
.radio {
width: 28rpx;
height: 28rpx;
box-sizing: border-box;
padding: 4rpx;
flex-shrink: 0;
margin-right: 12rpx;
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;
}
}
.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 {
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;
}
}
.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
<!--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" wx:if="{{info.isAutoPerformance == 1}}">
<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.autoGradeCode}}级</text></view>
<view>奖励系数强制设为<text class="weight">{{resultInfo.autoRewardCoefficient}}</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>
<view class="mar-t32">当前状态</view>
<view class="radio-box" style="padding-bottom: {{info.adoptType == 2 ? '16rpx' : ''}}">
<view class="radio-item flex" bindtap="changeRadio" data-value="1" wx:if="{{info.isAutoPerformance == 1}}">
<image wx:if="{{info.adoptType == 1}}" src="{{IMG_URL}}radio-checked.png" mode=""/>
<view wx:else class="radio"></view>
<view class="label">系统自动设置</view>
<view style="margin-left: 8rpx;" wx:if="{{info.adoptType == 1 && info.autoGradeCode == 'D'}}"><level-rate info="{{autoInfo}}" hideStar="{{true}}" /></view>
</view>
<view wx:if="{{info.adoptType == 1 && info.autoGradeCode != 'D'}}"><level-rate info="{{autoInfo}}" /></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>
<block wx:if="{{info.adoptType == 2}}">
<view class="input-content flex">
<view>手动维护最终绩效金额</view>
<image src="{{IMG_URL}}caption-icon.png" class="help-icon" bindtap="handleHelpPopup" mode=""/>
<view class="input-box flex">
<input class='input' placeholder="请输入" value="{{info.manualFinalPerformanceAmount}}" placeholder-style="color: #999EA8;" bindinput="priceInput" type="digit"/>
<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 wx:else>
<empty-data emptyText="总部运营-薪酬专员 未出工资条" />
</block>
</view>
<view class="btn-box">
<view class="btn confirm" bindtap="handleConfirm">提交</view>
<view class="btn" bindtap="handleLast" wx:if="{{showLastBtn}}">上一位</view>
<view class="btn" bindtap="handleNext" wx:if="{{showNextBtn}}">下一位</view>
</view>
</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
...@@ -131,23 +131,22 @@ page { ...@@ -131,23 +131,22 @@ page {
} }
.list-box { .list-box {
margin: 24rpx; margin: 24rpx;
min-height: 100%;
.sticky-box { .sticky-box {
position: sticky; position: sticky;
top: 0; top: 0;
margin: -16rpx -24rpx 0; margin: -16rpx -24rpx 0;
padding: 16rpx 24rpx; padding: 16rpx 24rpx;
z-index: 99; z-index: 99;
background: #F2F3F7;
} }
.is-sticky { .is-sticky {
background: #FFFFFF; background: #FFFFFF;
transition: background 0.1s ease-in-out;
.search-input { .search-input {
background: #f7f8fa; background: #f7f8fa;
transition: background 0.1s ease-in-out;
} }
.filter-item { .filter-item {
background: #f7f8fa !important; background: #f7f8fa !important;
transition: background 0.1s ease-in-out;
} }
} }
.search-input { .search-input {
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<view class="search-box"> <view class="search-box">
<view class="search-input"> <view class="search-input">
<image src="/images/search.png" class="search-icon" /> <image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="员工姓名/手机号查询" class="input" value="{{ merchantAndStaffSearch }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" /> <input type="text" placeholder="门店/员工姓名" class="input" value="{{ merchantAndStaffSearch }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{ merchantAndStaffSearch }}"> <block wx:if="{{ merchantAndStaffSearch }}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" /> <image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block> </block>
...@@ -80,43 +80,31 @@ ...@@ -80,43 +80,31 @@
<view wx:if="{{isSticky}}" class="empty-box"></view> <view wx:if="{{isSticky}}" class="empty-box"></view>
<block wx:if="{{ list.length > 0 }}"> <block wx:if="{{ list.length > 0 }}">
<block wx:for="{{ list }}" wx:key="index"> <block wx:for="{{ list }}" wx:key="index">
<block wx:for="{{ item }}" wx:for-item="li" wx:for-index="ind" wx:key="ind"> <view class="item content">
<view
data-ind="{{ ind }}"
data-index="{{ index }}"
>
<view
class="item content"
data-ind="{{ ind }}"
data-index="{{ index }}"
data-item="{{ li }}"
>
<view class="item-top"> <view class="item-top">
<view class="name">{{li.name}}</view> <view class="name">{{item.name}}</view>
<view class="status text-center" style="color:{{ statusMap[li.handleStatus].color }};background-color:{{statusMap[li.handleStatus].background }};"> <view class="status text-center" style="color:{{ statusMap[item.handleStatus].color }};background-color:{{statusMap[item.handleStatus].background }};">
{{statusMap[li.handleStatus].name }} {{statusMap[item.handleStatus].name }}
</view> </view>
</view> </view>
<view class="list-item"> <view class="list-item">
<view class="label">入职门店</view> <view class="label">入职门店</view>
<view class="value">{{li.merchantName}}</view> <view class="value">{{item.merchantName}}</view>
</view> </view>
<view class="list-item"> <view class="list-item">
<view class="label">绩效分数</view> <view class="label">绩效分数</view>
<van-rate readonly value="{{ starCountObj[li.performanceLevel] }}" count="{{6}}" void-icon="star" size="16px" void-color="#DEE0E3" color="#FFB742" /> <van-rate readonly value="{{ starCountObj[item.performanceLevel] }}" count="{{6}}" void-icon="star" size="16px" void-color="#DEE0E3" color="#FFB742" />
<view class="score">{{li.symbolValue}}</view> <view class="score">{{item.symbolValue}}分</view>
</view> </view>
<view class="list-item"> <view class="list-item">
<view class="label">绩效等级</view> <view class="label">绩效等级</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 class="value"><text wx:if="{{item.performanceLevel}}">{{item.performanceLevel}}级</text><text wx:if="{{item.performanceLevel && item.coefficient}}" class="split">|</text><text wx:if="{{item.coefficient}}">系数{{item.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="{{item}}" class="btn">查看</view>
<view bindtap="handleDetail" data-target="{{li}}" class="btn primary">编辑{{(2 - li.submitCount)}}/2</view> <view bindtap="handleEdit" data-target="{{item}}" class="btn primary">编辑{{(2 - item.submitCount)}}/2</view>
</view> </view>
</view> </view>
</view>
</block>
</block> </block>
<block wx:if="{{ nothing }}"> <block wx:if="{{ nothing }}">
<view class="list-nothing">到底了~</view> <view class="list-nothing">到底了~</view>
......
...@@ -19,11 +19,6 @@ Page({ ...@@ -19,11 +19,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
// options = {
// autoGradeType: '3',
// 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'] ? '老员工绩效 · 规则详情' : '无启用自动评绩效规则详情'
...@@ -45,22 +40,7 @@ Page({ ...@@ -45,22 +40,7 @@ Page({
}, },
getAutoResult(data) { getAutoResult(data) {
const res = { api.getPerformanceRule({queryMonth: data.queryMonth}).then(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)) { if (['1', '2'].includes(data.autoGradeType)) {
this.setData({ this.setData({
ruleInfo: { ruleInfo: {
...@@ -83,11 +63,6 @@ Page({ ...@@ -83,11 +63,6 @@ Page({
} }
}) })
} }
return
api.getPerformanceRule({queryMonth: data.queryMonth}).then(res => {
this.setData({
ruleInfo: res.data || {}
})
}) })
}, },
......
...@@ -4,7 +4,8 @@ const IMG_URL = ...@@ -4,7 +4,8 @@ const IMG_URL =
import { import {
getWaitAuditCountAPI, getWaitAuditCountAPI,
waitstaffstateAPI, waitstaffstateAPI,
getStaffTemplate getStaffTemplate,
getOrderWaitForAudit
} from '~/api/api' } from '~/api/api'
Page({ Page({
/** /**
...@@ -171,7 +172,7 @@ Page({ ...@@ -171,7 +172,7 @@ Page({
path: "/packageWorkspace/pages/orderApprovalManage/orderApprovalList/orderApprovalList", path: "/packageWorkspace/pages/orderApprovalManage/orderApprovalList/orderApprovalList",
icon: "order_approval_icon", icon: "order_approval_icon",
trackingCode: 'regional-assistant-order-approval', trackingCode: 'regional-assistant-order-approval',
tipsNum: '' tipsNum: 0
}], }],
showReportPopup: false, showReportPopup: false,
reportTemplateList: [], reportTemplateList: [],
...@@ -299,8 +300,13 @@ Page({ ...@@ -299,8 +300,13 @@ Page({
getWaitAudit() { getWaitAudit() {
let { compensationMenus } = this.data let { compensationMenus } = this.data
let index = compensationMenus.findIndex(e => e.name == '订单审核') let index = compensationMenus.findIndex(e => e.name == '订单审核')
getOrderWaitForAudit({}).then(res => {
let { code, data } = res
if (code == 0) {
this.setData({ this.setData({
[`compensationMenus[${index}].tipsNum`]: 2 [`compensationMenus[${index}].tipsNum`]: data.waitAuditNum
})
}
}) })
}, },
...@@ -338,14 +344,14 @@ Page({ ...@@ -338,14 +344,14 @@ Page({
jumpTo(e) { jumpTo(e) {
let { url, query, trackingCode, params, path } = let { url, query, trackingCode, params, path } =
e.currentTarget.dataset.target e.currentTarget.dataset.target
let userInfo = wx.$util.getUserInfo()
// 埋点
wx.$track.setTrackData(0, trackingCode, {}, '', userInfo?.sceneType)
let item = e.currentTarget.dataset.target let item = e.currentTarget.dataset.target
if (item.url == 'packageWorkspace.supervisorDaily') { if (item.url == 'packageWorkspace.supervisorDaily') {
this.openWorkReportTemp(item) this.openWorkReportTemp(item)
return return
} }
let userInfo = wx.$util.getUserInfo()
// 埋点
wx.$track.setTrackData(0, trackingCode, {}, '', userInfo?.sceneType)
if (url == 'packageWorkspace.receptionRecords' && query) { if (url == 'packageWorkspace.receptionRecords' && query) {
return wx.navigateTo({ return wx.navigateTo({
url: '/packageWorkspace/pages/receptionRecords/receptionRecords?hideScore=1' url: '/packageWorkspace/pages/receptionRecords/receptionRecords?hideScore=1'
......
...@@ -215,7 +215,7 @@ export const getBusinessSchoolScene = () => { ...@@ -215,7 +215,7 @@ export const getBusinessSchoolScene = () => {
// 扫码进来的处理 // 扫码进来的处理
export const checkScene = options => { export const checkScene = options => {
if (getApp().globalData.isChoosingMedia) return // if (getApp().globalData.isChoosingMedia) return
// let query = options.query // let query = options.query
let { query } = options let { query } = options
...@@ -257,13 +257,16 @@ export const checkScene = options => { ...@@ -257,13 +257,16 @@ export const checkScene = options => {
upgradeStaffDaily: upgradeStaffDaily:
'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily', 'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily',
deliveryTarget: 'packageEquity/pages/deliveryTarget/deliveryTarget', deliveryTarget: 'packageEquity/pages/deliveryTarget/deliveryTarget',
aiDetail: 'packageEquity/pages/aiExcercise/ai/ai', 'aiDetail': 'packageEquity/pages/aiExcercise/ai/ai',
tabDateIndex: 'pages/tabDateIndex/pages/tabDateIndex', 'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex',
tabDateIndex: 'pages/tabDateIndex/pages/tabDateIndex', 'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex',
h5AuthPhone: 'pages/h5AuthPhone/h5AuthPhone', 'h5AuthPhone': 'pages/h5AuthPhone/h5AuthPhone',
mentorShipManage: 'mentorShipManage': 'tabWorkOrder/pages/mentorshipManage/mentorshipManage',
'tabWorkOrder/pages/mentorshipManage/mentorshipManage', 'refundApply': 'tabWorkOrder/pages/refundApply/refundApply',
refundApply: 'tabWorkOrder/pages/refundApply/refundApply' 'recruitDetail': 'packageEquity/pages/recruitManage/recruitDetail/recruitDetail',
'performanceRate': 'packageWorkspace/pages/performanceRating/rateList/retaList',
'validReferralCount': 'packageWorkspace/pages/validReferralCount/referralCountList/referralCountList',
'orderApprovalDetail': '/packageWorkspace/pages/orderApprovalManage/orderApprovalDetail/orderApprovalDetail'
} }
options.path = pagePath[query.page] options.path = pagePath[query.page]
} }
......
...@@ -63,9 +63,10 @@ const domain_items = { ...@@ -63,9 +63,10 @@ const domain_items = {
// dj: "http://192.168.1.169:8292", //蔡远明 // dj: "http://192.168.1.169:8292", //蔡远明
// dj: 'http://192.168.1.104:8292',//范富荣 // dj: 'http://192.168.1.104:8292',//范富荣
// dj: 'http://192.168.1.89:8292', //周杭 // dj: 'http://192.168.1.89:8292', //周杭
// dj: 'http://192.168.1.76:8292', //璐琦 dj: 'http://192.168.1.76:8292', //璐琦
// dj: 'http://192.168.1.111:8594',
// dj: 'http://192.168.1.227:8292',//陈希 // dj: 'http://192.168.1.227:8292',//陈希
dj: 'http://192.168.1.67:8292',//周立明 // dj: 'http://192.168.1.67:8292',//周立明
// dj: 'http://192.168.148.235:8292',// 熊正顺 // dj: 'http://192.168.148.235:8292',// 熊正顺
// dj: 'http://192.168.148.221:8292', // dj: 'http://192.168.148.221:8292',
// scrm: 'http://192.168.1.165:8292' // scrm: 'http://192.168.1.165:8292'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!