Commit 44730865 authored by daywrite's avatar daywrite

联调考勤记录

parent 5815b208
.punch-app {}
.punch-app {
.color-dc3545 {
color: #dc3545;
}
.border-dc3545 {
border-color: #dc3545;
color: #dc3545;
}
}
......@@ -38,7 +38,7 @@
type="primary"
size="mini"
@click.prevent.stop="editSch(item)"
:disabled="item.can_update">
:disabled="!item.can_update">
<i class="fa fa-edit animated"></i>说明
</el-button>
</span>
......@@ -47,7 +47,7 @@
v-click-outside="lmClose"
ref="leaveMessage"
:lmTemplate="lmTemplate"
:type="9">
:type="16">
</leave-message>
<Pagenation
@update:pager="pager => {updatePage(pager)}"
......@@ -55,7 +55,6 @@
</Pagenation>
</div>
</div>
<FormModal ref="formModal"></FormModal>
</section>
</template>
......@@ -63,7 +62,6 @@
import SearchHeader from '../common/searchHeader'
import SearchForm from '../common/SearchForm'
import Item from './punchItem'
import LeaveMessage from '../common/leaveMessage'
import Pagenation from './punchPagenation'
import clickOutside from '@/lib/bind'
import SetParams from '../common/setParams'
......@@ -82,7 +80,6 @@ export default {
SearchHeader,
SearchForm,
Item,
LeaveMessage,
Pagenation,
singleRadioTool,
countArr
......@@ -97,41 +94,22 @@ export default {
currKey: 'punch',
lmTemplate: [
{
name: '客户名称',
value: 'client.name',
default: '未设置'
name: '日期',
value: 'edate'
},
{
name: '内容',
value: 'description'
name: '考勤人',
value: 'user.name'
},
{
name: '待办时间',
value: 'schedule_week_display'
name: '上班',
value: 'in_at',
default: '(未设置)'
},
{
name: '状态',
value: 'schedule_status_display'
},
{
name: '开始时间',
value: 'start_at'
},
{
name: '结束时间',
value: 'end_at'
},
{
name: '重复',
value: 'repeat_type_display'
},
{
name: '负责人',
value: 'scheduleCreator.name'
},
{
name: '创建时间',
value: 'created_at'
name: '下班',
value: 'out_at',
default: '(未设置)'
}
],
filter: [],
......@@ -247,16 +225,6 @@ export default {
this.getList(ret)
},
// 6.1新增
addSch () {
this.$refs.formModal.show()
},
// 6.2编辑
editEvent (item) {
this.$refs.formModal.show(item)
},
// 7.操作
// 修改密码
changePasswordEvent () {},
......@@ -280,12 +248,12 @@ export default {
// 8.留言
leaveMessageSch (item) {
this.$refs.leaveMessage.isShow(item)
this.$refs.leaveMessage.btnShow(item)
},
lmClose () {
this.$refs.leaveMessage &&
this.$refs.leaveMessage.isClose()
this.$refs.leaveMessage.btnClose()
}
}
}
......
......@@ -18,13 +18,13 @@
<el-col :span="20" :xs="24" class="obear-schedule-right">
<el-row :gutter="10">
<el-col :span="6" :xs="24">
<span>考勤状态:</span>
<span>考勤状态:</span><span class="color-dc3545">{{ in_out_status ? '' : '未出勤' }}</span>
</el-col>
<el-col :span="6" :xs="24">
<span>打卡设备:</span>
</el-col>
<el-col :span="6" :xs="24">
<span>情况说明:</span><span>{{ item.id_number }}</span>
<span class="obear-schedule-right__content border-dc3545">情况说明</span><span>{{ item.id_number }}</span>
</el-col>
<el-col :span="6" :xs="24">
<span>图片:</span><span>{{ item.native_place }}</span>
......@@ -33,10 +33,10 @@
<el-row :gutter="10">
<el-col :span="6" :xs="24">
<div>
<span>上班:</span><span>{{ item.in_at }}</span>
<span>上班:</span><span class="color-dc3545">{{ !item.in_at ? item.in_status_display : item.in_at }}</span>
</div>
<div>
<span>下班:</span><span>{{ item.out_at }}</span>
<span>下班:</span><span class="color-dc3545">{{ !item.out_at ? item.out_status_display : item.out_at }}</span>
</div>
</el-col>
<el-col :span="6" :xs="24">
......@@ -81,6 +81,10 @@ export default {
computed: {
userRolesText () {
return this.item.userRoles.map(item => item.display_name) || []
},
in_out_status () {
return !!this.item.in_at && !!this.item.out_at
}
},
......
<template>
<section class="pull-right">
<el-pagination v-if="total > 0" class="mb20 mt20"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pager.thispage"
:page-sizes="[10, 20, 40, 60, 80, 100]"
:page-size="pager.pagesize"
layout="total, prev, pager, next, jumper"
:total="total">
</el-pagination>
</section>
</template>
<script>
export default {
props: {
total: {
type: Number,
default: 0
}
},
data () {
return {
pager: {
thispage: 1,
pagesize: 20,
totalcount: 0
}
}
},
created () {
this.$emit('update:pager', this.pager)
},
methods: {
handleSizeChange (val) {
this.pager.thispage = 1
this.pager.pagesize = val
this.pager.totalcount = this.total
this.$emit('update:pager', this.pager)
},
handleCurrentChange (val) {
this.pager.thispage = val
this.pager.totalcount = this.total
this.$emit('update:pager', this.pager)
}
}
}
</script>
<style scoped>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment