Commit 754fb6ff by zhangxw

考勤明细合计天数添加单位

1 parent 4b8d80f0
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<el-table <el-table
v-if="item.tableData.length" v-if="item.tableData.length"
:data="item.tableData" :data="item.tableData"
height="500px" max-height="470px"
class="table_class" class="table_class"
border border
:header-cell-style="{ :header-cell-style="{
...@@ -207,12 +207,12 @@ export default { ...@@ -207,12 +207,12 @@ export default {
if (index === 1) { if (index === 1) {
const numberList = this.tabList[Number(this.activeName)]?.tableData.map((item) => !isNaN(item.deductionDays) ? item.deductionDays : 0) const numberList = this.tabList[Number(this.activeName)]?.tableData.map((item) => !isNaN(item.deductionDays) ? item.deductionDays : 0)
sums[index] = const total = (numberList.length
(numberList.length
? numberList.reduce((preVal, curVal) => { ? numberList.reduce((preVal, curVal) => {
return `${this.activeName == 2 ? '+' : ''}${new BigNumber(preVal || 0).plus(new BigNumber(curVal || 0)).toNumber()}` return `${new BigNumber(preVal || 0).plus(new BigNumber(curVal || 0)).toNumber()}`
}) })
: "0") : "0")
sums[index] = `${this.activeName == '2' && total > 0 ? '+' : ''}${Number(total)}天`
} }
}) })
return sums return sums
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!