处理问题

This commit is contained in:
TS-QD1 2023-07-06 14:23:55 +08:00
parent 9138e9cc34
commit 1a6b33da4a
4 changed files with 55 additions and 8 deletions

View File

@ -5,6 +5,7 @@
</template> </template>
<script> <script>
import {h} from 'vue';
import { import {
NSpace, NSpace,
NDataTable, NDataTable,
@ -57,7 +58,16 @@ export default {
key: 'isSignin', key: 'isSignin',
width: 60, width: 60,
render(row, index) { render(row, index) {
return row.isSignin === 0 ? '否' : '是'; return row.isSignin === 0 ? h('span', {
style: {
color: 'red'
}
}, '否') : h('span', {
style: {
fontWeight: 'bold',
color: 'green'
}
}, '是');
} }
}, },
{ {
@ -66,7 +76,16 @@ export default {
key: 'isSigninLate', key: 'isSigninLate',
width: 60, width: 60,
render(row, index) { render(row, index) {
return row.isSigninLate === 0 ? '否' : '是'; return row.isSigninLate === 0 ? h('span', {
style: {
color: 'red'
}
}, '否') : h('span', {
style: {
fontWeight: 'bold',
color: 'green'
}
}, '是');
} }
}, },
{ {
@ -75,7 +94,16 @@ export default {
key: 'isSignout', key: 'isSignout',
width: 60, width: 60,
render(row, index) { render(row, index) {
return row.isSignout === 0 ? '否' : '是'; return row.isSignout === 0 ? h('span', {
style: {
color: 'red'
}
}, '否') : h('span', {
style: {
fontWeight: 'bold',
color: 'green'
}
}, '是');
} }
}, },
{ {
@ -84,7 +112,16 @@ export default {
key: 'isEarly', key: 'isEarly',
width: 60, width: 60,
render(row, index) { render(row, index) {
return row.isSignoutEarly === 0 ? '否' : '是'; return row.isSignoutEarly === 0 ? h('span', {
style: {
color: 'red'
}
}, '否') : h('span', {
style: {
fontWeight: 'bold',
color: 'green'
}
}, '是');
} }
}, },
{ {

View File

@ -619,7 +619,11 @@ export default {
key: 'AF', key: 'AF',
keyName: 'shouldPay', keyName: 'shouldPay',
fixed: 'right', fixed: 'right',
width: 100 width: 100,
render(row, index) {
return h('a', {
}, row.AF * row.gridCount)
}
}, },
{ {
align: 'center', align: 'center',
@ -629,7 +633,7 @@ export default {
fixed: 'right', fixed: 'right',
width: 100, width: 100,
render(row, index) { render(row, index) {
return (vueSelf.computeAE(row) * row.AF / 100).toFixed(2); return (vueSelf.computeAE(row) * (row.AF * row.gridCount) / 100).toFixed(2);
} }
} }
], ],

View File

@ -325,7 +325,7 @@ export default {
fixed: 'right', fixed: 'right',
width: 60, width: 60,
render(row, index) { render(row, index) {
return (vueSelf.computeM(row) * row.N / 100).toFixed(2); return (vueSelf.computeM(row) * row.N / 100 + row.F).toFixed(2);
} }
} }
], ],

View File

@ -300,7 +300,7 @@ export default {
fixed: 'right', fixed: 'right',
width: 60, width: 60,
render(row, index) { render(row, index) {
return vueSelf.computeN(row) * row.O / 100; return vueSelf.computeN(row) * row.O / 100 + row.F;
} }
} }
], ],
@ -384,6 +384,12 @@ export default {
this.modal.scoring.userName = row.B; this.modal.scoring.userName = row.B;
this.modal.scoring.title = '督察案件'; this.modal.scoring.title = '督察案件';
}, },
computeL(row) {
return Math.max(row.G - row.H - row.J - row.K + row.L + row.M, 0);
},
computeM(row) {
return Math.max(row.G - row.H - row.J - row.K + row.L + row.M, 0);
},
computeN(row) { computeN(row) {
return Math.max(row.G - row.H - row.J - row.K + row.L + row.M, 0); return Math.max(row.G - row.H - row.J - row.K + row.L + row.M, 0);
}, },