优化考勤

This commit is contained in:
java110 2022-12-13 03:29:53 +08:00
parent 0edc3c6a54
commit 1f99b2e007
2 changed files with 20 additions and 26 deletions

View File

@ -40,7 +40,7 @@
vc.component.monthAttendanceManageInfo.conditions.page = _page; vc.component.monthAttendanceManageInfo.conditions.page = _page;
vc.component.monthAttendanceManageInfo.conditions.row = _rows; vc.component.monthAttendanceManageInfo.conditions.row = _rows;
let param = { let param = {
params: vc.component.monthAttendanceManageInfo.conditions params: vc.deepClone($that.monthAttendanceManageInfo.conditions)
}; };
param.params.classesName = param.params.classesName.trim(); param.params.classesName = param.params.classesName.trim();
param.params.date = param.params.date + "-01"; param.params.date = param.params.date + "-01";
@ -58,7 +58,8 @@
dataCount: vc.component.monthAttendanceManageInfo.total, dataCount: vc.component.monthAttendanceManageInfo.total,
currentPage: _page currentPage: _page
}); });
}, function (errInfo, error) { },
function(errInfo, error) {
console.log('请求失败处理'); console.log('请求失败处理');
} }
); );

View File

@ -3,18 +3,14 @@
<div class="col-md-2"> <div class="col-md-2">
<div class=" border-radius bg-white padding"> <div class=" border-radius bg-white padding">
<div class="margin-xs margin-bottom"> <div class="margin-xs margin-bottom">
<input type="text" :placeholder="vc.i18n('请选择月份','monthAttendanceManage')" <input type="text" :placeholder="vc.i18n('请选择月份','monthAttendanceManage')" v-model="staffAttendanceManageInfo.curDate" class=" form-control queryDate">
v-model="staffAttendanceManageInfo.curDate" class=" form-control queryDate">
</div> </div>
<div class="margin-xs margin-bottom"> <div class="margin-xs margin-bottom">
<input v-model="staffAttendanceManageInfo.orgName" readonly @focus="_staffAttendanceChangeOrg()" <input v-model="staffAttendanceManageInfo.orgName" readonly @focus="_staffAttendanceChangeOrg()" type="text" :placeholder="vc.i18n('填写组织','staffAttendanceManage')" class="form-control">
type="text" :placeholder="vc.i18n('填写组织','staffAttendanceManage')" class="form-control">
</div> </div>
<div class="margin-xs-r bg-white treeview attendance-staff"> <div class="margin-xs-r bg-white treeview attendance-staff">
<ul class="list-group text-center border-radius"> <ul class="list-group text-center border-radius">
<li class="list-group-item node-orgTree " <li class="list-group-item node-orgTree " v-for="(item,index) in staffAttendanceManageInfo.staffs" @click="swatchStaff(item)" :class="{'vc-node-selected':staffAttendanceManageInfo.curStaffId==item.userId}">
v-for="(item,index) in staffAttendanceManageInfo.staffs" @click="swatchStaff(item)"
:class="{'vc-node-selected':staffAttendanceManageInfo.curStaffId==item.userId}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
@ -23,10 +19,7 @@
</div> </div>
<div class="col-md-10 "> <div class="col-md-10 ">
<div class="row bg-white border-radius padding "> <div class="row bg-white border-radius padding ">
<div class="col-md-2 text-center border padding-lg labeling-strip" <div class="col-md-2 text-center border padding-lg labeling-strip" v-for="index in staffAttendanceManageInfo.maxDay" :key="index" :style="{'background-color': _getBgColor(index)}" style="border-radius: 5px;cursor:pointer">
v-for="index in staffAttendanceManageInfo.maxDay" :key="index"
:style="{'background-color': _getBgColor(index)}"
style="border-radius: 5px;cursor:pointer">
<div class="strip" v-if="_getDayAttendance(index) && _getDayAttendance(index).state != '30000'"> <div class="strip" v-if="_getDayAttendance(index) && _getDayAttendance(index).state != '30000'">
<span @click="_replenishCheckIn(index)">补考勤</span> <span @click="_replenishCheckIn(index)">补考勤</span>
</div> </div>
@ -34,7 +27,7 @@
<div>状态: <div>状态:
<span v-html="_getAttendanceState(index)"></span> <span v-html="_getAttendanceState(index)"></span>
</div> </div>
<div v-for="(item,detailIndex) in _getAttendanceDetail(index)">{{item.specName}}{{item.stateName}} <div v-for="(item,detailIndex) in _getAttendanceDetail(index)">{{item.specCd=='1001'?'上班':'下班'}}{{item.stateName}}
<span v-if="item.checkTime">({{item.checkTime}})</span> <span v-if="item.checkTime">({{item.checkTime}})</span>
</div> </div>
<div> <div>