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 @@ ...@@ -38,7 +38,7 @@
type="primary" type="primary"
size="mini" size="mini"
@click.prevent.stop="editSch(item)" @click.prevent.stop="editSch(item)"
:disabled="item.can_update"> :disabled="!item.can_update">
<i class="fa fa-edit animated"></i>说明 <i class="fa fa-edit animated"></i>说明
</el-button> </el-button>
</span> </span>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
v-click-outside="lmClose" v-click-outside="lmClose"
ref="leaveMessage" ref="leaveMessage"
:lmTemplate="lmTemplate" :lmTemplate="lmTemplate"
:type="9"> :type="16">
</leave-message> </leave-message>
<Pagenation <Pagenation
@update:pager="pager => {updatePage(pager)}" @update:pager="pager => {updatePage(pager)}"
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
</Pagenation> </Pagenation>
</div> </div>
</div> </div>
<FormModal ref="formModal"></FormModal>
</section> </section>
</template> </template>
...@@ -63,7 +62,6 @@ ...@@ -63,7 +62,6 @@
import SearchHeader from '../common/searchHeader' import SearchHeader from '../common/searchHeader'
import SearchForm from '../common/SearchForm' import SearchForm from '../common/SearchForm'
import Item from './punchItem' import Item from './punchItem'
import LeaveMessage from '../common/leaveMessage'
import Pagenation from './punchPagenation' import Pagenation from './punchPagenation'
import clickOutside from '@/lib/bind' import clickOutside from '@/lib/bind'
import SetParams from '../common/setParams' import SetParams from '../common/setParams'
...@@ -82,7 +80,6 @@ export default { ...@@ -82,7 +80,6 @@ export default {
SearchHeader, SearchHeader,
SearchForm, SearchForm,
Item, Item,
LeaveMessage,
Pagenation, Pagenation,
singleRadioTool, singleRadioTool,
countArr countArr
...@@ -97,41 +94,22 @@ export default { ...@@ -97,41 +94,22 @@ export default {
currKey: 'punch', currKey: 'punch',
lmTemplate: [ lmTemplate: [
{ {
name: '客户名称', name: '日期',
value: 'client.name', value: 'edate'
default: '未设置'
}, },
{ {
name: '内容', name: '考勤人',
value: 'description' value: 'user.name'
}, },
{ {
name: '待办时间', name: '上班',
value: 'schedule_week_display' value: 'in_at',
default: '(未设置)'
}, },
{ {
name: '状态', name: '下班',
value: 'schedule_status_display' value: 'out_at',
}, default: '(未设置)'
{
name: '开始时间',
value: 'start_at'
},
{
name: '结束时间',
value: 'end_at'
},
{
name: '重复',
value: 'repeat_type_display'
},
{
name: '负责人',
value: 'scheduleCreator.name'
},
{
name: '创建时间',
value: 'created_at'
} }
], ],
filter: [], filter: [],
...@@ -247,16 +225,6 @@ export default { ...@@ -247,16 +225,6 @@ export default {
this.getList(ret) this.getList(ret)
}, },
// 6.1新增
addSch () {
this.$refs.formModal.show()
},
// 6.2编辑
editEvent (item) {
this.$refs.formModal.show(item)
},
// 7.操作 // 7.操作
// 修改密码 // 修改密码
changePasswordEvent () {}, changePasswordEvent () {},
...@@ -280,12 +248,12 @@ export default { ...@@ -280,12 +248,12 @@ export default {
// 8.留言 // 8.留言
leaveMessageSch (item) { leaveMessageSch (item) {
this.$refs.leaveMessage.isShow(item) this.$refs.leaveMessage.btnShow(item)
}, },
lmClose () { lmClose () {
this.$refs.leaveMessage && this.$refs.leaveMessage &&
this.$refs.leaveMessage.isClose() this.$refs.leaveMessage.btnClose()
} }
} }
} }
......
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
<el-col :span="20" :xs="24" class="obear-schedule-right"> <el-col :span="20" :xs="24" class="obear-schedule-right">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<span>考勤状态:</span> <span>考勤状态:</span><span class="color-dc3545">{{ in_out_status ? '' : '未出勤' }}</span>
</el-col> </el-col>
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<span>打卡设备:</span> <span>打卡设备:</span>
</el-col> </el-col>
<el-col :span="6" :xs="24"> <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>
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<span>图片:</span><span>{{ item.native_place }}</span> <span>图片:</span><span>{{ item.native_place }}</span>
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
<div> <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>
<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> </div>
</el-col> </el-col>
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
...@@ -81,6 +81,10 @@ export default { ...@@ -81,6 +81,10 @@ export default {
computed: { computed: {
userRolesText () { userRolesText () {
return this.item.userRoles.map(item => item.display_name) || [] 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