4,评分环境 不等于 3.5 或3.75 评分说明 必填
6,绩效总分数 保留两位 四舍五入
This commit is contained in:
parent
b2beb5fd44
commit
bbf82e56ce
@ -11,7 +11,7 @@ import './style/index.less'
|
|||||||
import '@/icons'
|
import '@/icons'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
import VueCookie from 'vue-cookies'
|
import VueCookie from 'vue-cookies'
|
||||||
import { debounce, departGetForm, personlGetForm, handleInput, messageSuccess, loading, loadingClose, handleBlur } from '@/utils/common'
|
import { debounce, departGetForm, personlGetForm, handleInput, messageSuccess, loading, loadingClose, handleBlur, isStringEmpty } from '@/utils/common'
|
||||||
import { format } from '@/utils/dateFormat'
|
import { format } from '@/utils/dateFormat'
|
||||||
Vue.prototype._ = _
|
Vue.prototype._ = _
|
||||||
Vue.mixin(Mixin)
|
Vue.mixin(Mixin)
|
||||||
@ -27,7 +27,7 @@ Vue.prototype.$handleInputInt = handleInput
|
|||||||
|
|
||||||
Vue.prototype.$handleBlur = handleBlur
|
Vue.prototype.$handleBlur = handleBlur
|
||||||
Vue.prototype.$msg = messageSuccess
|
Vue.prototype.$msg = messageSuccess
|
||||||
|
Vue.prototype.$isStringEmpty = isStringEmpty
|
||||||
/* eslint-disable no-new */
|
/* eslint-disable no-new */
|
||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
|
|||||||
@ -136,3 +136,12 @@ export function getUrlParams () {
|
|||||||
}
|
}
|
||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 判断字符是否为空的方法
|
||||||
|
export function isStringEmpty (obj) {
|
||||||
|
if (typeof obj === 'undefined' || obj === null || obj === '') {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -343,8 +343,9 @@ export default {
|
|||||||
})
|
})
|
||||||
const arr = this.scoreList.filter(i => i.minScore <= result && i.maxScore > result)
|
const arr = this.scoreList.filter(i => i.minScore <= result && i.maxScore > result)
|
||||||
return {
|
return {
|
||||||
ScoreSimple: res.toFixed(3),
|
// ScoreSimple: res.toFixed(3),
|
||||||
Score: result.toFixed(3),
|
ScoreSimple: Math.round(res * 100) / 100.0,
|
||||||
|
Score: result.toFixed(res),
|
||||||
Level: arr.length > 0 ? arr[0].name : ''
|
Level: arr.length > 0 ? arr[0].name : ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -430,7 +431,8 @@ export default {
|
|||||||
const obj = { status: 1, menuName: this.tableInfo.result ? '提交了结果值' : '提交了评分' }
|
const obj = { status: 1, menuName: this.tableInfo.result ? '提交了结果值' : '提交了评分' }
|
||||||
const params = Object.assign({}, { resultRecordId: this.obj.id || '' }, obj)
|
const params = Object.assign({}, { resultRecordId: this.obj.id || '' }, obj)
|
||||||
if (!this.tableInfo.result) {
|
if (!this.tableInfo.result) {
|
||||||
let isScore = true
|
let isScore = true // false 有未评分
|
||||||
|
let isScoreComment = true // false 有分数等于3.5或3.75 但为评论
|
||||||
this.obj.recortModelDtos.map(i => {
|
this.obj.recortModelDtos.map(i => {
|
||||||
i.detailDtos.map(j => {
|
i.detailDtos.map(j => {
|
||||||
const obj = j.scoreDtos.find(k => k.approvalId === this.userInfo.userId)
|
const obj = j.scoreDtos.find(k => k.approvalId === this.userInfo.userId)
|
||||||
@ -439,16 +441,28 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
isScore = false
|
isScore = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 有分数等于3.5或3.75 但为评论
|
||||||
|
if ((obj.acquireScore !== 3.75 && obj.acquireScore !== 3.5) && this.$isStringEmpty(obj.scoreComment)) {
|
||||||
|
isScoreComment = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
if (!isScore) {
|
if (!isScore) {
|
||||||
this.loadingTi = false
|
this.loadingTi = false
|
||||||
return this.$message({
|
return this.$message({
|
||||||
message: '有未评分指标',
|
message: '有未评分指标',
|
||||||
type: 'info'
|
type: 'error'
|
||||||
|
})
|
||||||
|
} else if (!isScoreComment) {
|
||||||
|
this.loadingTi = false
|
||||||
|
return this.$message({
|
||||||
|
message: '评分不等于3.50或3.75的未填写评分说明',
|
||||||
|
type: 'error'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let rqPara = this.tableInfo.result ? Object.assign({}, this.obj, { lastScore: null, scoreLevel: null }) : Object.assign({}, this.obj, this.score)
|
let rqPara = this.tableInfo.result ? Object.assign({}, this.obj, { lastScore: null, scoreLevel: null }) : Object.assign({}, this.obj, this.score)
|
||||||
let res1 = await apiSaveDetail(rqPara)
|
let res1 = await apiSaveDetail(rqPara)
|
||||||
if (res1.code !== 200) {
|
if (res1.code !== 200) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user