月底工时核算

This commit is contained in:
Vergil
2020-02-25 17:15:36 +08:00
parent 5197b52e4f
commit 00a2116efe

View File

@@ -12,7 +12,7 @@
style="width:250px;margin-left: 5px;margin-top: 10px;margin-bottom: 10px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button size="small" type="primary" icon="el-icon-search" style="margin-left: 5px" plain @click="searchTable()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-search" style="margin-left: 5px" plain @click="pageCurrent=1;pageSize=50;searchTable()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-download" plain @click="exportExcel">导出</el-button>
</el-card>
<el-card>
@@ -82,7 +82,7 @@
{{ scope.row.操作时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注" width="100px">
<el-table-column align="center" label="备注" width="200px" show-overflow-tooltip="">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
@@ -122,7 +122,7 @@
{{ scope.row.设计者 }}
</template>
</el-table-column>
<el-table-column align="center" label="材料" width="100px">
<el-table-column align="center" label="材料" width="150px">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
@@ -189,9 +189,10 @@ export default {
this.loading = true
searchTable(this.startTime[0], this.startTime[1], this.orderName, this.order, this.pageCurrent, this.pageSize).then(response => {
response.data.rows.map(v => {
this.$set(v, '工时比值', v.计划工时 === 0 ? 0 : Math.round(v.扫码工时 / v.计划工时 * 100) / 100.00)
this.$set(v, '工时比值', parseInt(v.计划工时) === 0 ? 0 : (Math.round(parseInt(v.扫码工时) / parseInt(v.计划工时) * 100) / 100.00))
})
this.tableData = response.data.rows
console.log(this.tableData)
this.total = response.data.total
this.loading = false
})