mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化考勤
This commit is contained in:
parent
0edc3c6a54
commit
1f99b2e007
@ -1,7 +1,7 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
(function(vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
@ -19,28 +19,28 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
_initMethod: function() {
|
||||
vc.component._listMonthAttendances(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
let _date = new Date(new Date());
|
||||
$that.monthAttendanceManageInfo.conditions.date = _date.getFullYear() + "-" + (_date.getMonth() + 1);
|
||||
vc.initDateMonth('queryDate', function (_value) {
|
||||
vc.initDateMonth('queryDate', function(_value) {
|
||||
$that.monthAttendanceManageInfo.conditions.date = _value;
|
||||
})
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('monthAttendanceManage', 'listMonthAttendance', function (_param) {
|
||||
_initEvent: function() {
|
||||
vc.on('monthAttendanceManage', 'listMonthAttendance', function(_param) {
|
||||
vc.component._listMonthAttendances(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.on('pagination', 'page_event', function(_currentPage) {
|
||||
vc.component._listMonthAttendances(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listMonthAttendances: function (_page, _rows) {
|
||||
_listMonthAttendances: function(_page, _rows) {
|
||||
vc.component.monthAttendanceManageInfo.conditions.page = _page;
|
||||
vc.component.monthAttendanceManageInfo.conditions.row = _rows;
|
||||
let param = {
|
||||
params: vc.component.monthAttendanceManageInfo.conditions
|
||||
params: vc.deepClone($that.monthAttendanceManageInfo.conditions)
|
||||
};
|
||||
param.params.classesName = param.params.classesName.trim();
|
||||
param.params.date = param.params.date + "-01";
|
||||
@ -48,7 +48,7 @@
|
||||
//发送get请求
|
||||
vc.http.apiGet('/attendanceClass/getMonthAttendance',
|
||||
param,
|
||||
function (json, res) {
|
||||
function(json, res) {
|
||||
var _monthAttendanceManageInfo = JSON.parse(json);
|
||||
vc.component.monthAttendanceManageInfo.total = _monthAttendanceManageInfo.total;
|
||||
vc.component.monthAttendanceManageInfo.records = _monthAttendanceManageInfo.records;
|
||||
@ -58,23 +58,24 @@
|
||||
dataCount: vc.component.monthAttendanceManageInfo.total,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
//查询
|
||||
_queryMonthAttendanceMethod: function () {
|
||||
_queryMonthAttendanceMethod: function() {
|
||||
vc.component._listMonthAttendances(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
//重置
|
||||
_resetMonthAttendanceMethod: function () {
|
||||
_resetMonthAttendanceMethod: function() {
|
||||
vc.component.monthAttendanceManageInfo.conditions.classesName = "";
|
||||
vc.component.monthAttendanceManageInfo.conditions.departmentName = "";
|
||||
vc.component.monthAttendanceManageInfo.conditions.date = vc.dateFormat(new Date());
|
||||
vc.component._listMonthAttendances(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_moreCondition: function () {
|
||||
_moreCondition: function() {
|
||||
if (vc.component.monthAttendanceManageInfo.moreCondition) {
|
||||
vc.component.monthAttendanceManageInfo.moreCondition = false;
|
||||
} else {
|
||||
|
||||
@ -3,18 +3,14 @@
|
||||
<div class="col-md-2">
|
||||
<div class=" border-radius bg-white padding">
|
||||
<div class="margin-xs margin-bottom">
|
||||
<input type="text" :placeholder="vc.i18n('请选择月份','monthAttendanceManage')"
|
||||
v-model="staffAttendanceManageInfo.curDate" class=" form-control queryDate">
|
||||
<input type="text" :placeholder="vc.i18n('请选择月份','monthAttendanceManage')" v-model="staffAttendanceManageInfo.curDate" class=" form-control queryDate">
|
||||
</div>
|
||||
<div class="margin-xs margin-bottom">
|
||||
<input v-model="staffAttendanceManageInfo.orgName" readonly @focus="_staffAttendanceChangeOrg()"
|
||||
type="text" :placeholder="vc.i18n('填写组织','staffAttendanceManage')" class="form-control">
|
||||
<input v-model="staffAttendanceManageInfo.orgName" readonly @focus="_staffAttendanceChangeOrg()" type="text" :placeholder="vc.i18n('填写组织','staffAttendanceManage')" class="form-control">
|
||||
</div>
|
||||
<div class="margin-xs-r bg-white treeview attendance-staff">
|
||||
<ul class="list-group text-center border-radius">
|
||||
<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}">
|
||||
<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}">
|
||||
{{item.name}}
|
||||
</li>
|
||||
</ul>
|
||||
@ -23,10 +19,7 @@
|
||||
</div>
|
||||
<div class="col-md-10 ">
|
||||
<div class="row bg-white border-radius padding ">
|
||||
<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">
|
||||
<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">
|
||||
<div class="strip" v-if="_getDayAttendance(index) && _getDayAttendance(index).state != '30000'">
|
||||
<span @click="_replenishCheckIn(index)">补考勤</span>
|
||||
</div>
|
||||
@ -34,7 +27,7 @@
|
||||
<div>状态:
|
||||
<span v-html="_getAttendanceState(index)"></span>
|
||||
</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>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user