From 79dfb00c47b036fe346780762e3d1445b81f4e62 Mon Sep 17 00:00:00 2001 From: TS-QD1 Date: Wed, 12 Jul 2023 09:42:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BD=91=E6=A0=BC=E5=91=98?= =?UTF-8?q?=E8=AF=84=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/table/Wgy.vue | 40 +++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) 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({