|
|
@@ -8,12 +8,17 @@
|
|
|
{{row.checkin_option.groupname}}
|
|
|
</template>
|
|
|
<!-- workdays -->
|
|
|
- <template slot-scope="{ row, index }" slot="workdays">
|
|
|
- <el-tag v-for="witem in row.checkin_option.checkindate[0].workdays">{{witem | showWd}}</el-tag>
|
|
|
+ <template slot-scope="{ row, index }" slot="checkin_time">
|
|
|
+ {{ showDate(row.checkin_time)}}
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row, index }" slot="checkin_type">
|
|
|
+ {{ row.type == 1?'上班打卡': '下班打卡'}}
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row, index }" slot="sch_checkin_time">
|
|
|
+ {{ showDate(row.sch_checkin_time)}}
|
|
|
</template>
|
|
|
<template slot-scope="{ row, index }" slot="status">
|
|
|
- <Icon type="md-checkmark" v-if="row.status === 1" color="#0092DC" size="14" />
|
|
|
- <Icon type="md-close" v-else color="#ed5565" size="14" />
|
|
|
+ {{ row.status == 1?'正常': (row.status == 2 ? '迟到': '早退')}}
|
|
|
</template>
|
|
|
<template slot-scope="{ row, index }" slot="time">
|
|
|
<!-- <span> {{row.add_time | formatDate}}</span> -->
|
|
|
@@ -55,7 +60,7 @@
|
|
|
}
|
|
|
},
|
|
|
showWd(day) {
|
|
|
- let str = ''
|
|
|
+ let str = '星期日'
|
|
|
if(day) {
|
|
|
switch (day*1){
|
|
|
case 1:
|
|
|
@@ -114,23 +119,34 @@
|
|
|
width: 80
|
|
|
},
|
|
|
{
|
|
|
- title: '班次名称',
|
|
|
+ title: '员工',
|
|
|
key: 'name',
|
|
|
minWidth: 150
|
|
|
},
|
|
|
+ {
|
|
|
+ title: '打卡类型',
|
|
|
+ slot: 'checkin_type',
|
|
|
+ minWidth: 20
|
|
|
+ },
|
|
|
{
|
|
|
title: '打卡奖励',
|
|
|
key: 'price',
|
|
|
minWidth: 80
|
|
|
},
|
|
|
{
|
|
|
- title: '打卡时段',
|
|
|
- slot: 'time',
|
|
|
+ title: '打卡时间',
|
|
|
+ slot: 'sch_checkin_time',
|
|
|
minWidth: 100
|
|
|
},
|
|
|
+ //sch_checkin_time
|
|
|
{
|
|
|
- title: '添加时间',
|
|
|
- key: 'create_time',
|
|
|
+ title: '实际打卡时间',
|
|
|
+ slot: 'checkin_time',
|
|
|
+ minWidth: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '打卡情况',
|
|
|
+ slot: 'status',
|
|
|
minWidth: 100
|
|
|
},
|
|
|
// {
|
|
|
@@ -166,13 +182,26 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ showDate(timestamp) {
|
|
|
+ var date = new Date(timestamp*1000);
|
|
|
+ var year = date.getFullYear();
|
|
|
+ var month = ("0" + (date.getMonth() + 1)).slice(-2);
|
|
|
+ var day = ("0" + date.getDate()).slice(-2);
|
|
|
+ var hours = ("0" + date.getHours()).slice(-2);
|
|
|
+ var minutes = ("0" + date.getMinutes()).slice(-2);
|
|
|
+ var seconds = ("0" + date.getSeconds()).slice(-2);
|
|
|
+
|
|
|
+ return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
// 列表
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
|
|
|
getCheckList(this.tableFrom).then(async res => {
|
|
|
let data = res.data
|
|
|
- this.tableList = data.list;
|
|
|
+ this.tableList = data.data;
|
|
|
this.total = res.data.count;
|
|
|
this.loading = false;
|
|
|
}).catch(res => {
|