Commit 45e43894 by zhangxw

批量操作员工绩效bug修复

1 parent a1078d81
...@@ -199,26 +199,26 @@ Page({ ...@@ -199,26 +199,26 @@ Page({
let { batchConfigType, batchSingleList } = this.data let { batchConfigType, batchSingleList } = this.data
let cleanValue = value.replace(/[^\d.]/g, '') let cleanValue = value.replace(/[^\d.]/g, '')
const firstDotIndex = cleanValue.indexOf('.') const firstDotIndex = cleanValue.indexOf('.')
if (firstDotIndex !== -1) { if (firstDotIndex != -1) {
cleanValue = cleanValue.substring(0, firstDotIndex + 1) + cleanValue.substring(firstDotIndex + 1).replace(/\./g, '') cleanValue = cleanValue.substring(0, firstDotIndex + 1) + cleanValue.substring(firstDotIndex + 1).replace(/\./g, '')
} }
if (cleanValue === '.') { if (cleanValue == '.') {
cleanValue = '0.' cleanValue = '0.'
} }
if (cleanValue.length > 1 && cleanValue.startsWith('0') && !cleanValue.startsWith('0.')) { if (cleanValue.length > 1 && cleanValue.startsWith('0') && !cleanValue.startsWith('0.')) {
cleanValue = cleanValue.replace(/^0+/, '') cleanValue = cleanValue.replace(/^0+/, '')
if (cleanValue === '') { if (cleanValue == '') {
cleanValue = '0' cleanValue = '0'
} }
} }
const numericValue = parseFloat(cleanValue) const numericValue = parseFloat(cleanValue)
if (numericValue > 100000) { if (numericValue > 100000) {
cleanValue = '100000' cleanValue = '100000'
} else if (numericValue === 100000 && cleanValue.includes('.')) { } else if (numericValue == 100000 && cleanValue.includes('.')) {
cleanValue = '100000' cleanValue = '100000'
} }
const dotIndexAfterCheck = cleanValue.indexOf('.'); const dotIndexAfterCheck = cleanValue.indexOf('.');
if (dotIndexAfterCheck !== -1 && cleanValue.length > dotIndexAfterCheck + 3) { if (dotIndexAfterCheck != -1 && cleanValue.length > dotIndexAfterCheck + 3) {
cleanValue = cleanValue.substring(0, dotIndexAfterCheck + 3) cleanValue = cleanValue.substring(0, dotIndexAfterCheck + 3)
} }
value = cleanValue value = cleanValue
...@@ -259,7 +259,7 @@ Page({ ...@@ -259,7 +259,7 @@ Page({
amountCalculationType: !((source.manualFinalPerformanceAmount ?? '') === '') ? 2 : 1 amountCalculationType: !((source.manualFinalPerformanceAmount ?? '') === '') ? 2 : 1
}) })
let perfAppraisalSubmitReqDTO = [] let perfAppraisalSubmitReqDTO = []
if (batchConfigType === 1) { if (batchConfigType == 1) {
// 批量统一设置 // 批量统一设置
if (!batchInfo.manualGradeCode && !batchInfo.manualFinalPerformanceAmount) { if (!batchInfo.manualGradeCode && !batchInfo.manualFinalPerformanceAmount) {
return wx.$util.showToast('请配置绩效评分') return wx.$util.showToast('请配置绩效评分')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!