lockRecord

This commit is contained in:
shijing 2022-10-13 09:36:21 +08:00
parent f34770181c
commit 38a03bcdf8
1 changed files with 18 additions and 27 deletions

View File

@ -16,9 +16,6 @@
<view class="item-wrap" v-for="(val,index) in lists" :key="val.id"> <view class="item-wrap" v-for="(val,index) in lists" :key="val.id">
<view class="clock_in_-item"> <view class="clock_in_-item">
<view class="center-info"> <view class="center-info">
<view class="info-details">打卡人员{{val.detail.personName}} </view>
<view class="info-details">所在岗位{{val.employee_.post_name}}</view>
<view class="info-details">所在部门{{val.detail.deptName}}</view>
<view class="info-details">触发模式{{val.detail.openTypeStr}}</view> <view class="info-details">触发模式{{val.detail.openTypeStr}}</view>
<view class="info-details">打卡类型<text v-if="val.type==10">上班打卡</text><text v-else>下班打卡</text></view> <view class="info-details">打卡类型<text v-if="val.type==10">上班打卡</text><text v-else>下班打卡</text></view>
<view class="info-details">其他信息{{val.detail.deviceName}}</view> <view class="info-details">其他信息{{val.detail.deviceName}}</view>
@ -91,48 +88,42 @@
}, },
methods: { methods: {
bindDateChange(e){ bindDateChange(e){
this.date = e.target.value; let that = this;
that.date = e.target.value;
this.params.month = this.date.split('-')[1]; that.params.month = that.date.split('-')[1];
this.params.year = this.date.split('-')[0]; that.params.year = that.date.split('-')[0];
let current = this.currentYear+'-'+this.currentMonth; let current = that.currentYear+'-'+that.currentMonth;
if(this.date==current){ if(that.date==current){
this.activeIndex=true; that.activeIndex=true;
}else{ }else{
this.activeIndex=false; that.activeIndex=false;
} }
this.lists = []; that.params.pageNum = 1;
this.getLists(); that.lists = [];
that.getLists();
}, },
getLists() { getLists() {
let that = this; let that = this;
that.$u.api.hrmClockRecord(that.params).then(res => { that.$u.api.hrmClockRecord(that.params).then(res => {
that.lists = that.lists.concat(res.results); that.lists = that.lists.concat(res.results);
this.totalNum = res.count; that.totalNum = res.count;
}) })
}, },
changeList(index){ changeList(index){
let that = this; let that = this;
that.activeIndex = index; that.activeIndex = index;
that.resetSearch(); that.params.month = that.currentMonth;
that.params.year = that.currentYear;
that.params.pageNum = 1;
that.lists = [];
that.getLists();
}, },
goBack() { goBack() {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
}, },
searchHandle() {
this.params.pageNum = 1;
this.lists = [];
this.getLists()
},
resetSearch() {
this.params.pageNum = 1;
this.params.search = "";
this.lists = [];
this.getLists();
},
} }
} }
</script> </script>