@@ -724,6 +735,7 @@ export default {
sTime: null,
eTime: null,
maxNum: null,
+ umax: null,
percentage: null,
state: null,
itemIds: null,
@@ -1194,6 +1206,18 @@ export default {
type: 'Danger'
})
}
+ if(row.typeId===1 && (!Vote.umax)){
+ flag = false;
+ this.$alert(`评优最大值不能为空!`, `提示`, {
+ type: 'Danger'
+ })
+ }
+ if(row.typeId===1 && (Vote.umax>this.pcSetUp.row.pcBkhdxs.length)){
+ flag = false;
+ this.$alert(`评优最大值不能大于被考核对象个数!`, `提示`, {
+ type: 'Danger'
+ })
+ }
if(row.typeId!==3 && (!Vote.percentage)){
flag = false;
this.$alert(`评分占比不能为空!`, `提示`, {
diff --git a/ruoyi-ui/src/views/votepage.vue b/ruoyi-ui/src/views/votepage.vue
index 7463efc..a8a085d 100644
--- a/ruoyi-ui/src/views/votepage.vue
+++ b/ruoyi-ui/src/views/votepage.vue
@@ -2,6 +2,7 @@
{{ vote.voteTitle }}
时间:{{ vote.sTime }} - {{ vote.eTime }}
+
评优最大值为 {{ vote.umax }}
{{ vote.vDescription }}
@@ -89,6 +90,7 @@ export default {
let voteEmpList = [];
let flag = true;
let bkhdxName = '';
+ let pyA = 0
if(this.vote.khitemTypeid===2 || this.vote.khitemTypeid===3){
this.voteList.forEach(item => {
voteEmpList.push({
@@ -114,7 +116,18 @@ export default {
flag = false;
bkhdxName += item.bkhdxName+','
}
- voteEmpList.push(obj)
+ if(item.option&&item.option==='optionA'){
+ pyA += 1;
+ }
+ voteEmpList.push(obj);
+ });
+ bkhdxName=bkhdxName.slice(0, -1);
+ }
+
+ if(pyA>this.vote.umax){
+ flag = false;
+ this.$alert(`评优数量不能超过评优最大值!`, `提示`, {
+ type: 'Danger'
})
}
if(flag){
@@ -135,8 +148,7 @@ export default {
type: 'Danger'
})
}
- }else {
- // bkhdxName
+ }else if(bkhdxName){
this.$alert(`【${ bkhdxName }】未评分,请去评分!`, `提示`, {
type: 'Danger'
})
@@ -160,7 +172,7 @@ export default {
color: #666666;
}
.time{
- padding: 10px;
+ padding: 5px;
color: #af5e5e;
}