diff --git a/src/components/table/Wgy.vue b/src/components/table/Wgy.vue index 22b25fb..b0277e1 100644 --- a/src/components/table/Wgy.vue +++ b/src/components/table/Wgy.vue @@ -613,6 +613,17 @@ export default { return vueSelf.computeAE(row); } }, + { + align: 'center', + title: '评级', + key: 'AH', + keyName: 'evaluation', + fixed: 'right', + width: 100, + render(row, index) { + return vueSelf.computeAH(row); + } + }, { align: 'center', title: '应发绩效工资', @@ -621,8 +632,7 @@ export default { fixed: 'right', width: 100, render(row, index) { - return h('a', { - }, row.AF * row.gridCount) + return vueSelf.computeAF(row); } }, { @@ -633,7 +643,7 @@ export default { fixed: 'right', width: 100, render(row, index) { - return (vueSelf.computeAE(row) * (row.AF * row.gridCount) / 100).toFixed(2); + return (vueSelf.computeAE(row) * vueSelf.computeAF(row) / 100).toFixed(2); } } ], @@ -909,6 +919,28 @@ export default { result = Math.min(result, 100); return result < 0 ? 0 : result.toFixed(2); }, + computeAF(row) { + let score = this.computeAE(row); + if(score <= 100 && score >= 85) { + return 500 * row.gridCount; + } else if(score >= 75) { + return 333 * row.gridCount; + } else if(score >= 60) { + return 333 * row.gridCount; + } + return 0 + }, + computeAH(row) { + let score = this.computeAE(row); + if(score <= 100 && score >= 85) { + return '优'; + } else if(score >= 75) { + return '良'; + } else if(score >= 60) { + return '一般'; + } + return '差'; + }, onSearchClick() { this.listData(); }, @@ -917,7 +949,9 @@ export default { let tableDatas = []; vueSelf.table.data.forEach(item => { item.AE = vueSelf.computeAE(item); + item.AF = vueSelf.computeAF(item); item.AG = (item.AE * item.AF / 100).toFixed(2); + item.AH = vueSelf.computeAH(item); tableDatas.push({...item}); }) vueSelf.dialog.warning({