|
@@ -237,11 +237,16 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="cardHours" :label="$t('workAttendance') + '(h)'" v-if="user.timeType.showCorpwxCardtime==1||user.timeType.showDdCardtime==1 || user.timeType.syncFanwei==1">
|
|
|
<template slot-scope="scope">
|
|
|
- <span :style="scope.row.cardHours != scope.row.reportTime?'color:red':''">
|
|
|
- <span>{{ scope.row.startTime }} ~ {{ scope.row.endTime }}</span>
|
|
|
- <span v-if="scope.row.cardHours">共 {{ scope.row.cardHours.toFixed(1) }} 小时</span>
|
|
|
- <span v-if="!scope.row.cardHours">-</span>
|
|
|
- </span>
|
|
|
+ <div style="display: flex;align-items: center;">
|
|
|
+ <span :style="scope.row.cardHours != scope.row.reportTime?'color:red':''">
|
|
|
+ <span>{{ scope.row.startTime }} ~ {{ scope.row.endTime }}</span>
|
|
|
+ <span v-if="scope.row.cardHours">共 {{ scope.row.cardHours.toFixed(1) }} 小时</span>
|
|
|
+ <span v-if="!scope.row.cardHours">-</span>
|
|
|
+ </span>
|
|
|
+ <div style="padding-left: 10px" v-if="user.dingdingUserid">
|
|
|
+ <el-button type="primary" size="mini" @click="refreshAttendance(scope.row)" :loading="refreshAttendanceLoading">刷新考勤</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
@@ -621,6 +626,7 @@
|
|
|
reason: ''
|
|
|
},
|
|
|
undoBathFormLoading: false,
|
|
|
+ refreshAttendanceLoading: false
|
|
|
};
|
|
|
},
|
|
|
filters: {
|
|
@@ -631,6 +637,39 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ refreshAttendance(row) {
|
|
|
+ console.log(row, '<=== scope.row')
|
|
|
+ const { userId, dateStr } = row
|
|
|
+ const url = `/dingding/refreshUserCardTime`
|
|
|
+ const prima = {
|
|
|
+ userId,
|
|
|
+ date: dateStr,
|
|
|
+ companyId: this.user.companyId
|
|
|
+ }
|
|
|
+ this.refreshAttendanceLoading = true
|
|
|
+ this.http.post(url, prima,
|
|
|
+ res => {
|
|
|
+ this.refreshAttendanceLoading = false;
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.$message({
|
|
|
+ message: `刷新成功`,
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.refreshAttendanceLoading = false;
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
showBatchRevocationVisable(row, index) {
|
|
|
console.log(row, '<===== 点击当前撤销')
|
|
|
this.batchRevocationList = row.membdateList || []
|