Commit fb096215 authored by dll's avatar dll

考勤组

parent a46efbdd
......@@ -91,6 +91,9 @@ sub {
.mt10{
margin-top: 10px;
}
.ml10{
margin-left: 10px;
}
.ml20{
margin-left: 20px;
}
......
......@@ -210,3 +210,11 @@ export const findParentIds = (dataSource, nodeId) => {
return parentIds; // 返回所有父节点ID的数组
}
// 格式化
export const booleanToNum = (val) => {
if(val){
return 1
}else{
return 0
}
}
\ No newline at end of file
......@@ -17,3 +17,26 @@ export const timestampToTime = (timestamp) => {
var s = date.getSeconds();
return Y + M + D;
}
// 小时:分钟 ==》 转分钟
export const transFormMinut = (String) => {
if(typeof(String) === 'number'){
return
}
if(!String){
return 0
}
let arr = String.split(':')
let hour = arr[0].indexOf('0') === 0? arr[0].substring(1,arr[0].length):arr[0]
let minu = arr[1].indexOf('0') === 0? arr[1].substring(1,arr[1].length):arr[1]
return hour*60 + minu*1
}
// // 分钟 ==》 小时
export const transFormTime = (num) => {
if (typeof(num) != 'string' && num !== 0) {
return (Math.floor(num / 60)).toString() + ":" + (num % 60).toString()
}
else {
return "0:00";
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="班次名称" prop="className" v-model="form.className" placeholder="请输入班次名称"/>
<Field label="班次负责人" prop="classResponsiblePersonId" type="select"
<Field label="班次负责人" prop="classResponsiblePersonId" type="select" :enumData="dict.workManId"
v-model="form.classResponsiblePersonId" placeholder="请选择班次负责人"/>
</el-row>
<el-form-item label="上下班时间" prop="attendanceClassDetailList">
......@@ -72,7 +72,7 @@
style="width:150px"
class="ml20"
v-model="item.offWorkDateBefore"
value-format="HH:mm"
value-format="H:mm"
format="H小时mm分钟"
placeholder="未设置">
</el-time-picker>
......@@ -83,7 +83,7 @@
style="width:150px"
class="ml20"
v-model="item.offWorkDateAfter"
value-format="HH:mm"
value-format="H:mm"
format="H小时mm分钟"
placeholder="未设置">
</el-time-picker>
......@@ -92,7 +92,8 @@
</el-form-item>
</el-form>
<div class="dialog-footer ml20">
<el-button type="primary" size="mini" v-if="pageInfo.type !== 'view'" @click="submitForm">确 定</el-button>
<!-- submitForm -->
<el-button type="primary" size="mini" v-if="pageInfo.type !== 'view'" @click="formatData">确 定</el-button>
<el-button @click="cancel" size="mini">取 消</el-button>
</div>
</el-drawer>
......@@ -100,21 +101,13 @@
<script>
import form from "@/assets/mixins/formdialog";
import dialogShow from "./dialogshow";
import {transFormMinut,transFormTime} from '@/assets/utils/dateFormat.js'
export default {
mixins: [form],
components: {
dialogShow ,
},
data() {
var validteList = (rule, value, callback) => {
if (!value) {
return callback(new Error('请添加上班时间'))
}else if(!this.judgeStatus(value) ){
callback(new Error('请完成输入'))
}else{
callback()
}
}
return {
// 子表选中数据
checkedAttendanceClassDetail: [],
......@@ -137,26 +130,47 @@
{required: true,message: "请选择班次负责人" },
],
attendanceClassDetailList:[
{required: true,message: "请添加" },
{ validator:validteList,trigger:'change'}
{required: true,message: "请添加" }
]
},
currentIndex:0//当前索引值
};
}
},
created(){
// this.transFormMinut('09:03')
},
methods: {
// 时间转分钟
transFormMinut(String){
if(!String){
return 0
formatData(){
let value = true
if(this.attendanceClassDetailList.length < 1){
this.$message.error('请完整打卡时间填写')
value = false
return
}else{
console.log(this.attendanceClassDetailList.length,'执行了')
this.attendanceClassDetailList.forEach((item,index) => {
let valueres = this.judgeStatus(this.attendanceClassDetailList,index)
if(!valueres){
value = false
return
}
let arr = String.split(':')
let hour = arr[0].indexOf('0') === 0? arr[0].substring(1,arr[0].length):arr[0]
let minu = arr[1].indexOf('0') === 0? arr[1].substring(1,arr[1].length):arr[1]
return hour*60 + minu*1
})
}
if(value){
console.log('测试')
this.attendanceClassDetailList.forEach(item => {
item.goWorkDateBefore = transFormMinut(item.goWorkDateBefore)
item.goWorkDateAfter = transFormMinut(item.goWorkDateAfter)
item.offWorkDateBefore = transFormMinut(item.offWorkDateBefore)
item.offWorkDateAfter = transFormMinut(item.offWorkDateAfter)
})
this.submitForm()
}else{
this.$message.error('打卡时间填写有误')
}
},
/** 考勤班次详细信息序号 */
rowAttendanceClassDetailIndex({ row, rowIndex }) {
......@@ -164,13 +178,6 @@
},
/** 考勤班次详细信息添加按钮操作 */
handleAddAttendanceClassDetail() {
let value = this.judgeStatus(this.attendanceClassDetailList)
if(value){
if(this.attendanceClassDetailList.length == 0){
this.currentIndex = 0
}else{
this.currentIndex ++
}
let obj = {};
obj.goWorkDate = "";
obj.goWorkDateBefore = "";
......@@ -178,68 +185,75 @@
obj.offWorkDate = "";
obj.offWorkDateBefore = "";
obj.offWorkDateAfter = "";
obj.remark = "";
this.attendanceClassDetailList.push(obj);
}else{
this.$message.error("请完成当前设置再添加")
}
},
// 判断添加上下班时间
judgeStatus(arr){
judgeStatus(arr,index){
console.log(arr,index,'ces')
let status = true
if(arr.length == 0){
}else if(arr.length == 1){
console.log(arr[this.currentIndex])
for(let key in arr[this.currentIndex]){
if(!arr[this.currentIndex][key]){
}else{
if(arr[index].goWorkDate === ''){
this.$message.error('请选择上班时间')
status = false
return
}
if(arr[index].goWorkDateBefore === ''){
this.$message.error('请选择允许上班前打卡时间')
status = false
return
}
//比较下班和上班
let workTime = this.transFormMinut(arr[this.currentIndex].goWorkDate)+
this.transFormMinut(arr[this.currentIndex].goWorkDateAfter)
let offworkTime = this.transFormMinut(arr[this.currentIndex].offWorkDate)-
this.transFormMinut(arr[this.currentIndex].offWorkDateBefore)
if(offworkTime <= workTime){
this.$message.error('下班打卡时间不能小于上班打卡时间')
if(arr[index].goWorkDateAfter === ''){
this.$message.error('请选择允许上班后打卡时间')
status = false
return
}
if(arr[index].offWorkDate === ''){
this.$message.error('请选择下班时间')
status = false
return
}
else{
for(let key in arr[this.currentIndex]){
if(!this.arr[this.currentIndex][key]){
if(arr[index].offWorkDateBefore === ''){
this.$message.error('请选择允许下班前打卡时间')
status = false
return
}
if(arr[index].offWorkDateAfter === ''){
this.$message.error('请选择允许下班后打卡时间')
status = false
return
}
// 上一次比较
let lastworkTime = this.transFormMinut(arr[this.currentIndex-1].goWorkDate) +
this.transFormMinut(arr[this.currentIndex - 1 ].goWorkDateAfter)
let currentwokeTime = this.transFormMinut(arr[this.currentIndex].goWorkDate) -
this.transFormMinut(arr[this.currentIndex].goWorkDateBefore)
//当前比较下班和上班
let workTime = transFormMinut(arr[index].goWorkDate)+
transFormMinut(arr[index].goWorkDateAfter)
//当前
let workTime = this.transFormMinut(arr[this.currentIndex].goWorkDate)+
this.transFormMinut(arr[this.currentIndex].goWorkDateAfter)
let offworkTime = transFormMinut(arr[index].offWorkDate)-
transFormMinut(arr[index].offWorkDateBefore)
let offworkTime = this.transFormMinut(arr[this.currentIndex].offWorkDate)-
this.transFormMinut(arr[this.currentIndex].offWorkDateBefore)
if(currentwokeTime<=lastworkTime){
this.$message.error(`第${this.currentIndex}上班时间需大于第${this.currentIndex-1}上班时间`)
if(offworkTime <= workTime){
this.$message.error('下班打卡时间不能小于上班打卡时间')
status = false
return
}
if(offworkTime <= workTime){
this.$message.error('下班打卡时间不能小于上班打卡时间')
if(arr.length > 1 && index>0){
console.log(11111)
// 上一次比较
let lastoffTime = transFormMinut(arr[index-1].offWorkDate) +
transFormMinut(arr[index - 1 ].offWorkDateAfter)
let currentwokeTime = transFormMinut(arr[index].goWorkDate) -
transFormMinut(arr[index].goWorkDateBefore)
if(currentwokeTime <= lastoffTime){
this.$message.error(`第${index}上班时间需大于第${index-1}上班时间`)
status = false
return
}
}
}
return status
},
/** 考勤班次详细信息删除按钮操作 */
......@@ -276,6 +290,7 @@
this.getData();
this.pageInfo.type="edit"
this.title = "修改考勤班次信息";
},
/** 新增 */
add(row) {
......@@ -300,6 +315,17 @@
},
/**获取数据后弹框 */
afterRender(data) {
if(this.attendanceClassDetailList.length>0){
this.attendanceClassDetailList.forEach(item => {
item.goWorkDateBefore = transFormTime(item.goWorkDateBefore)
item.goWorkDateAfter = transFormTime(item.goWorkDateAfter)
item.offWorkDateBefore = transFormTime(item.offWorkDateBefore)
item.offWorkDateAfter = transFormTime(item.offWorkDateAfter)
})
this.currentIndex = this.attendanceClassDetailList.length - 1
this.form.classResponsiblePersonId = this.form.classResponsiblePersonId.toString()
console.log(this.currentIndex,'执行了')
}
this.open = true;
},
......
......@@ -53,15 +53,15 @@
return {
/** 子表列元素 */
columnSet:[
{prop:"goWorkDate",label:"上班打卡时间",width:100},
{prop:"goWorkDateBefore",label:"上班打卡前时间段,单位分钟",width:100},
{prop:"goWorkDateAfter",label:"上班打卡前时间段,单位分钟",width:100},
{prop:"offWorkDate",label:"下班打卡时间",width:100},
{prop:"offWorkDateBefore",label:"下班打卡前时间段,单位分钟",width:100},
{prop:"offWorkDateAfter",label:"下班打卡前时间段,单位分钟",width:100},
{prop:"remark",label:"备注",width:100},
{prop:"classId",label:"班次ID",width:100},
{prop:"className",label:"班次名称",width:100} ],
{prop:"goWorkDate",label:"上班打卡时间",width:150},
{prop:"goWorkDateBefore",label:"上班前打卡(分钟)",width:150},
{prop:"goWorkDateAfter",label:"上班后打卡(分钟)",width:150},
{prop:"offWorkDate",label:"下班打卡时间",width:150},
{prop:"offWorkDateBefore",label:"下班前打卡(分钟)",width:150},
{prop:"offWorkDateAfter",label:"下班后打卡(分钟)",width:150},
// {prop:"remark",label:"备注",width:150},
// {prop:"classId",label:"班次ID",width:150},
],
config: {
search: [
{
......@@ -75,11 +75,10 @@
columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
{label: "班次名称", prop: "className"},
// {label: "考勤时间", prop: "className"},
{label: "考勤班次详细信息",
width: 120,
width: 200,
prop: "subColumns",
formatter: (row) => {
let widthsize = this.columnSet.reduce((pre, cur) => {
......
<template>
<div class="mt20" v-if="isshow">
<el-table :data="classArr" border highlight-current-row ref="table"
@row-click="(row, column, event) => $rowClick(row,column, event, 'table')"
>
<el-table-column label="班次名称" prop="className" width="300px"></el-table-column>
<el-table-column label="考勤时间" prop="" fixed="right">
<template slot-scope="scope">
<div>
<el-tag class="ml10" v-for="(item,index) in scope.row.attendanceClassDetailList" :key="index">
{{item.goWorkDate}} ~ {{item.offWorkDate}}
</el-tag>
</div>
</template>
</el-table-column>
</el-table>
<div class="mt20">
<el-button type="primary" size="mini" @click="saveRowBanci">确定</el-button>
<el-button type="" size="mini" @click="cancelBanci">取消</el-button>
</div>
</div>
</template>
<script>
export default {
props:{
classArr:{
type:Array,
default:[]
},
currentArr:{
type:Object,
default:{}
},
isshow:{
type:Boolean,
default:false
}
},
watch:{
isshow:{
handler(newval){
if(newval){
this.selected = this.currentArr
this.$nextTick(() => {
let index = this.classArr.findIndex(item => item.id == this.selected.id)
this.$refs['table'].setCurrentRow(this.classArr[index],true)
})
}
}
}
},
data(){
return{
selected:{}
}
},
methods:{
saveRowBanci(){
this.$emit('saveRowBanci',this.selected)
},
cancelBanci(){
this.$emit('cancelBanci',null)
},
// 表格切换高亮点击
$rowClick (row, column, ev, ref) {
this.selected = row
const $table = this.$refs[ref]
// 因为不知道表格中包裹了多少层元素,所以需要通过查询点击元素的所有父级元素找到符合条件的类名进行判断
const haveHeightLight = [...ev.path].some(el => {
if (el.classList) return [...el.classList].indexOf('el-table__row') !== -1 && [...el.classList].indexOf('current-row') !== -1
})
try {
$table[0].setCurrentRow(haveHeightLight ? '' : row)
} catch (e) {
$table.setCurrentRow(haveHeightLight ? '' : row)
}
},
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<table class="table mt10">
<th class="heads flex flex-align-center flex-pack-justify">
<td class="selectTions">
<el-checkbox v-model="selectAll" @change="allhandler"></el-checkbox>
</td>
<td class="t1">工作日</td>
<td class="t2">班次时间段</td>
<td class="t1">操作</td>
</th>
<tr class="flex flex-align-center flex-pack-justify">
<td class="selectTions">
<el-checkbox :true-label="1" :false-label="0" v-model="setParams.monday" @change="judgeAll"></el-checkbox>
</td>
<td class="t1">周一</td>
<td class="t2">
<span>{{setParams.mondayClassId?setParams.mondayClassName:'未设置'}}</span>
<el-tag v-for="(item,index) in setParams.mondayClassTime.attendanceClassDetailList" :key="index" class="ml10">
{{item.goWorkDate}}~{{item.offWorkDate}}</el-tag>
</td>
<td class="t1">
<el-button type="text" @click="changebanci('monday')">更改班次</el-button>
</td>
</tr>
<tr class="flex flex-align-center flex-pack-justify">
<td class="selectTions">
<el-checkbox :true-label="1" :false-label="0" v-model="setParams.tuesday" @change="judgeAll"></el-checkbox>
</td>
<td class="t1">周二</td>
<td class="t2">
{{setParams.tuesdayClassId?setParams.tuesdayClassName:'未设置'}}
<el-tag class="ml10" v-for="(item,index) in setParams.tuesdayClassTime.attendanceClassDetailList" :key="index">{{item.goWorkDate}}~{{item.offWorkDate}}</el-tag>
</td>
<td class="t1">
<el-button type="text" @click="changebanci('tuesday')">更改班次</el-button>
</td>
</tr>
<tr class="flex flex-align-center flex-pack-justify">
<td class="selectTions">
<el-checkbox :true-label="1" :false-label="0" v-model="setParams.wednesday" @change="judgeAll"></el-checkbox>
</td>
<td class="t1">周三</td>
<td class="t2">
{{setParams.wednesdayClassId?setParams.wednesdayClassName:'未设置'}}
<el-tag class="ml10" v-for="(item,index) in setParams.wednesdayClassTime.attendanceClassDetailList" :key="index">{{item.goWorkDate}}~{{item.offWorkDate}}</el-tag>
</td>
<td class="t1">
<el-button type="text" @click="changebanci('wednesday')">更改班次</el-button>
</td>
</tr>
<tr class="flex flex-align-center flex-pack-justify">
<td class="selectTions">
<el-checkbox :true-label="1" :false-label="0" v-model="setParams.thursday" @change="judgeAll"></el-checkbox>
</td>
<td class="t1">周四</td>
<td class="t2">
{{setParams.thursdayClassId?setParams.thursdayClassName:'未设置'}}
<el-tag class="ml10" v-for="(item,index) in setParams.thursdayClassTime.attendanceClassDetailList" :key="index">{{item.goWorkDate}}~{{item.offWorkDate}}</el-tag>
</td>
<td class="t1">
<el-button type="text" @click="changebanci('thursday')">更改班次</el-button>
</td>
</tr>
<tr class="flex flex-align-center flex-pack-justify">
<td class="selectTions">
<el-checkbox :true-label="1" :false-label="0" v-model="setParams.friday" @change="judgeAll"></el-checkbox>
</td>
<td class="t1">周五</td>
<td class="t2">
{{setParams.fridayClassId?setParams.fridayClassName:'未设置'}}
<el-tag class="ml10" v-for="(item,index) in setParams.fridayClassTime.attendanceClassDetailList" :key="index">{{item.goWorkDate}}~{{item.offWorkDate}}</el-tag>
</td>
<td class="t1">
<el-button type="text" @click="changebanci('friday')">更改班次</el-button>
</td>
</tr>
<tr class="flex flex-align-center flex-pack-justify">
<td class="selectTions">
<el-checkbox :true-label="1" :false-label="0" v-model="setParams.saturday" @change="judgeAll"></el-checkbox>
</td>
<td class="t1">周六</td>
<td class="t2">
{{setParams.saturdayClassId?setParams.saturdayClassName:'休息'}}
<el-tag class="ml10" v-for="(item,index) in setParams.saturdayClassTime.attendanceClassDetailList" :key="index">{{item.goWorkDate}}~{{item.offWorkDate}}</el-tag>
</td>
<td class="t1">
<el-button type="text" @click="changebanci('saturday')">更改班次</el-button>
</td>
</tr>
<tr class="flex flex-align-center flex-pack-justify">
<td class="selectTions">
<el-checkbox :true-label="1" :false-label="0" v-model="setParams.sunday" @change="judgeAll"></el-checkbox>
</td>
<td class="t1">周日</td>
<td class="t2">
{{setParams.sundayClassId?setParams.sundayClassName:'休息'}}
<el-tag class="ml10" v-for="(item,index) in setParams.sundayClassTime.attendanceClassDetailList" :key="index">{{item.goWorkDate}}~{{item.offWorkDate}}</el-tag>
</td>
<td class="t1">
<el-button type="text" @click="changebanci('sunday')">更改班次</el-button>
</td>
</tr>
</table>
</template>
<script>
export default {
props:{
setParams:{
type:Object,
default:{}
}
},
data(){
return{
selectAll:false
}
},
mounted(){
// 判断全选
this.judgeAll()
},
methods:{
changebanci(from){
this.$emit('changebanci',from)
},
allhandler(){
if(this.selectAll){
this.setParams.monday = true
this.setParams.tuesday = true
this.setParams.wednesday = true
this.setParams.thursday = true
this.setParams.friday = true
this.setParams.saturday = true
this.setParams.sunday = true
}else{
this.setParams.monday = false
this.setParams.tuesday = false
this.setParams.wednesday = false
this.setParams.thursday = false
this.setParams.friday = false
this.setParams.saturday = false
this.setParams.sunday = false
}
},
judgeAll(){
if(!this.setParams.monday){
this.selectAll = false
return
}
if(!this.setParams.tuesday){
this.selectAll = false
return
}
if(!this.setParams.wednesday){
this.selectAll = false
return
}
if(!this.setParams.thursday){
this.selectAll = false
return
}
if(!this.setParams.friday){
this.selectAll = false
return
}
if(!this.setParams.saturday){
this.selectAll = false
return
}
if(!this.setParams.sunday){
this.selectAll = false
return
}
this.selectAll = true
}
}
}
</script>
<style lang="scss" scoped>
.table{
width: 90%;
.selectTions{
margin-right: 10px;
}
.heads{
background-color: #cae4fd;
height: 50px;
line-height: 50px;
padding: 0 20px;
}
tr{
height: 50px;
line-height: 50px;
padding: 0 20px;
}
.t1{
flex: 1
}
.t2{
flex: 2;
color:gray;
}
}
</style>
\ No newline at end of file
......@@ -15,15 +15,15 @@
<el-button type="text" class="ml20" @click="drawershow('drawer1')">设置</el-button>
</div>
<div class="flex flex-align-center mt10" style="color:#999;font-size:14px">
<div class="flex flex-align-center mt10" style="color:#999;font-size:14px" v-if="attendArr.length < 1">
<div>参与考勤人员</div>
<div class="ml20">未设置</div>
</div>
<div class="flex flex-align-center mt10" style="color:#999;font-size:14px">
<!-- <div class="flex flex-align-center mt10" style="color:#999;font-size:14px">
<div>无需考勤人员</div>
<div class="ml20">未设置</div>
</div>
</div> -->
<div style="height:20px"></div>
......@@ -32,29 +32,32 @@
<el-button type="text" class="ml20" @click="drawershow('drawer2')">设置</el-button>
</div>
<div class="flex flex-align-center mt10" style="color:#999;font-size:14px">
<div class="flex flex-align-center mt10" style="color:#999;font-size:14px" v-if="!setParams.groupResponsibleEntity.responsibleId">
<div>主负责人</div>
<div class="ml20">未设置</div>
</div>
<div class="flex flex-align-center mt10" style="color:#999;font-size:14px">
<!-- <div class="flex flex-align-center mt10" style="color:#999;font-size:14px">
<div>子负责人</div>
<div class="ml20">未设置</div>
</div>
<div class="flex flex-align-center mt10" style="color:#999;font-size:14px">
</div> -->
<!-- <div class="flex flex-align-center mt10" style="color:#999;font-size:14px">
<div>子负责人权限</div>
<div class="ml20">未设置</div>
</div>
</div> -->
<div style="height:20px"></div>
<div class="flex flex-align-center mt20">
<div>考勤时间</div>
<el-button type="text" class="ml20" @click="drawershow('drawer3')">设置</el-button>
</div>
<div class="flex flex-align-center mt10" style="color:#999;font-size:14px">
<div class="flex flex-align-center mt10" v-if="setParams.type === ''" style="color:#999;font-size:14px">
<div>考勤类型</div>
<div class="ml20">未设置</div>
</div>
<div class="flex flex-align-center mt10" style="color:#999;font-size:14px">
<div class="flex flex-align-center mt10" style="color:#999;font-size:14px" v-if="setParams.type === ''">
<div>工作日设置</div>
<div class="ml20">未设置</div>
</div>
......@@ -67,37 +70,44 @@
</div>
<div class="flex flex-align-center mt10" style="color:#999;font-size:14px"
v-if="setParams.attendanceType.length == 0">
v-if="setParams.attendanceType == ''">
<div>考勤方式</div>
<div class="ml20">未设置</div>
</div>
<div class="mt20">
<el-button type="primary">保存设置</el-button>
<el-button>全部重置</el-button>
<el-button type="primary" @click="saveSetform">保存设置</el-button>
<el-button @click="allReset">全部重置</el-button>
</div>
</el-card>
<!-- 设置考勤人员 -->
<el-drawer
title="考勤人员"
size="70%"
:beforeClose="closedrawer"
:visible.sync="drawer"
direction="rtl">
<div style="padding:20px">
<!-- 考勤人员 -->
<div v-if="drawer1">
<div>参与考勤人员(0)</div>
<el-input @focus="selectGroup()" style="width:220px" size="mini" placeholder="请选择"></el-input>
</div>
<div class="mt10" v-if="drawer1">
<div>无需考勤人员(0)</div>
<el-input @focus="selectGroup()" style="width:220px" size="mini" placeholder="请选择"></el-input>
<div>参与考勤人员({{this.attendArr.length}})</div>
<el-input @focus="selectGroup(true)" type="textarea"
v-model="persons" style="width:80%" size="mini" placeholder="请选择">
</el-input>
</div>
<!-- 考勤组 -->
<div class="mt10" v-if="drawer2">
<div>考勤组负责人:</div>
<el-select></el-select>
<el-select v-model="setParams.groupResponsibleEntity.responsibleId">
<el-option
v-for="($label, $value) in responsiableList"
:key="$value"
:label="$label"
:value="$value"
></el-option>
</el-select>
</div>
<div class="mt10" v-if="drawer2">
<!-- <div class="mt10" v-if="drawer2">
<div>主负责人:</div>
<el-select></el-select>
</div>
......@@ -110,7 +120,8 @@
<el-select>
<el-option></el-option>
</el-select>
</div>
</div> -->
<!-- 考勤时间 -->
<div class="mt20" v-if="drawer3">
<el-radio-group v-model="setParams.type" @change="changeRadio">
......@@ -126,21 +137,13 @@
<!-- 固定班次设置 -->
<div v-if="setParams.type == 1">
<div>工作日设置:</div>
<div class="mt10">
<!-- <div class="mt10">
<el-tag type="primary">快捷设置班次</el-tag>
<span class="ml20">班次名称:</span>
<el-button type="text" @click="changeBanci('1')">更改班次</el-button>
</div>
<!-- 班次表 -->
<el-table :data="weekList">
<el-table-column label="工作日"></el-table-column>
<el-table-column label="班次时间段"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" @click="changeBanci(scope.row)">更改班次</el-button>
</template>
</el-table-column>
</el-table>
</div> -->
<!-- 固定班次表 -->
<banci-table :setParams="groupFixedworkEntity" @changebanci="changeBanci"></banci-table>
</div>
......@@ -148,138 +151,466 @@
<div v-if="setParams.type == 3">
<div class="mt20">工作日</div>
<div class="mt10">
<el-checkbox-group v-model="week">
<el-checkbox label="">周一</el-checkbox>
<el-checkbox label="">周二</el-checkbox>
<el-checkbox label="">周三</el-checkbox>
<el-checkbox label="">周四</el-checkbox>
<el-checkbox label="">周五</el-checkbox>
<el-checkbox label="">周六</el-checkbox>
<el-checkbox label="">周日</el-checkbox>
</el-checkbox-group>
<el-checkbox v-model="attendanceGroupFreeworkEntity.monday" :true-label="1" :false-label="0">周一</el-checkbox>
<el-checkbox v-model="attendanceGroupFreeworkEntity.tuesday" :true-label="1" :false-label="0">周二</el-checkbox>
<el-checkbox v-model="attendanceGroupFreeworkEntity.wednesday" :true-label="1" :false-label="0">周三</el-checkbox>
<el-checkbox v-model="attendanceGroupFreeworkEntity.thursday" :true-label="1" :false-label="0">周四</el-checkbox>
<el-checkbox v-model="attendanceGroupFreeworkEntity.friday" :true-label="1" :false-label="0">周五</el-checkbox>
<el-checkbox v-model="attendanceGroupFreeworkEntity.saturday" :true-label="1" :false-label="0">周六</el-checkbox>
<el-checkbox v-model="attendanceGroupFreeworkEntity.sunday" :true-label="1" :false-label="0">周日</el-checkbox>
</div>
<div class="mt20">工作时长</div>
<div class="mt10">
<el-input style="width:100px"></el-input>
<el-input style="width:100px" v-model="attendanceGroupFreeworkEntity.workTime" minlength="5"></el-input>
<span class="ml20">小时</span>
</div>
</div>
<div v-if="setParams.type != 2">
<div class="mt10">
<el-checkbox>法定节假日自动排休</el-checkbox>
<el-checkbox v-model="holidays" :true-label="1" :false-label="0">法定节假日自动排休</el-checkbox>
</div>
<div class="mt10">
<div>特殊日期</div>
</div>
<div class="mt10">
<el-button @click="mustDaka = true">+新增必须打卡的日期</el-button>
<el-button @click="setMustTimes('must',attendanceGroupFixedworkSpecialList[0],0)">
+新增必须打卡的日期
</el-button>
<div class="el-tag ml20" type="primary" size="mini" plain
v-if="attendanceGroupFixedworkSpecialList[0].specialTime">
{{attendanceGroupFixedworkSpecialList[0].specialTime?
attendanceGroupFixedworkSpecialList[0].specialTime:'未设置'}}
</div>
</div>
<div class="mt10">
<el-button @click="noneedDaka = true">+新增无需打卡的日期</el-button>
<el-button @click="setMustTimes('noneed',attendanceGroupFixedworkSpecialList[1],1)">
+新增无需打卡的日期
</el-button>
<div class="el-tag ml20" type="primary" size="mini" plain v-if="attendanceGroupFixedworkSpecialList[1].specialTime">
{{attendanceGroupFixedworkSpecialList[1].specialTime}}
</div>
<div class="el-tag ml20" v-else-if="attendanceGroupFixedworkSpecialList[1].specialStartTime">
{{attendanceGroupFixedworkSpecialList[1].specialStartTime}}{{attendanceGroupFixedworkSpecialList[1].specialEndTime}}</div>
</div>
</div>
</div>
<div class="mt20" v-if="drawer4">
<div>考勤方式</div>
<el-checkbox-group v-model="setParams.attendanceType">
<el-radio-group v-model="setParams.attendanceType">
<div class="mt10" v-for="(item,index) in attendanceType" :key="index">
<el-checkbox :label="item.value">{{item.label}}</el-checkbox>
<el-radio :label="item.value">{{item.label}}</el-radio>
</div>
</el-checkbox-group>
</el-radio-group>
</div>
</div>
</el-drawer>
<!-- 选择成员 -->
<el-dialog :visible.sync="isshowgroup" title="选择人员">
<el-dialog :visible.sync="isshowgroup" title="选择人员" width="80%" :show-close="false">
<div>
<el-row type="flex">
<!-- 左1 -->
<el-col :span="16">
<el-row type="flex">
<el-col :span="12">
<div class="titles">选择部门</div>
<el-scrollbar style="height: 100%">
<el-scrollbar style="height: 50vh">
<el-tree
size="mini"
ref="siteTree"
:data="areaData"
id="el-tree"
node-key="id"
indent="4"
:props="treeProps"
:load="loadNode"
highlight-current
default-expand-all
:expand-on-click-node="false"
:render-content="renderContent"
@node-click="handleNodeClick"
@node-click="handleNodeClickBumen"
>
</el-tree>
</el-scrollbar>
</el-col>
<el-col :span="12">
<div class="titles">人员列表</div>
<el-scrollbar style="height: 50vh">
<div v-if="currentSelect.length>0">
<el-checkbox label="0" v-model="CurrentAllchecked" @change="currentChangeAll">全部</el-checkbox>
</div>
<el-checkbox-group v-model="allSelectId" v-if="currentSelect.length>0">
<el-checkbox :label="item.staffId" @change="changegroupId"
v-for="(item,index) in currentSelect" :key="index">
{{item.staffName}}</el-checkbox>
</el-checkbox-group>
<div v-else class="tips mt10">
该部门没有可选择员工,请选择其他文件
</div>
</el-scrollbar>
</el-col>
</el-row>
</el-col>
<!-- 右1 -->
<el-col :span="8">
<div style="border-left:1px dotted #eee;padding-left:20px">
<div class="titles">已选择</div>
<el-scrollbar style="height: 50vh">
<div class="el-tag ml10 mt10" :key="index"
v-for="(item,index) in allSelect">
<span class="tags">{{item.staffName}}</span>
<i class="el-icon-close" @click="deleteOne(index)"></i>
</div>
</el-scrollbar>
</div>
</el-col>
</el-row>
</div>
<div class="mt20">
<el-button type="primary" size="mini" @click="saveBtnchoice">确定</el-button>
<el-button size="mini" @click="cancelChoice">取消</el-button>
</div>
</el-dialog>
<!-- 选择班次 -->
<el-dialog :visible.sync="isshowBanci" title="选择班次">
<div>
<el-dialog :visible.sync="isshowBanci" title="选择班次" :show-close="false">
选择班次
</div>
<banci-select :classArr="classArr" :currentArr="currentselectBanciRow" :isshow="isshowBanci"
@saveRowBanci="saveRowBanci" @cancelBanci="cancelBanci"></banci-select>
</el-dialog>
<!-- 新增必须打卡时间 -->
<el-dialog :visible.sync="mustDaka" title="新增必须打卡日期">
<el-dialog :visible.sync="mustDaka" title="新增必须打卡日期" :show-close="false">
<div>
<span>选择日期</span>
<el-date-picker type="date" placeholder="年/月/日"></el-date-picker>
<el-date-picker type="date" placeholder="年/月/日" class="ml10" value-format="yyyy-MM-dd"
v-model="currentParams.specialTime"></el-date-picker>
</div>
<div>
选择班次
<!-- 选择日期 -->
<banci-select :classArr="classArr" :currentArr="currentselectBanciRow" :isshow="mustDaka"
@saveRowBanci="saveCurrentSpecial" @cancelBanci="cancelSpecial"></banci-select>
</div>
</el-dialog>
<!-- 新增无需打卡时间 -->
<el-dialog :visible.sync="noneedDaka" title="新增无需打卡日期">
<el-dialog :visible.sync="noneedDaka" title="新增无需打卡日期" :show-close="false">
<div>
<span>选择添加方式</span>
<el-radio-group class="ml20">
<el-radio label="">单个日期</el-radio>
<el-radio label="">时间段</el-radio>
<el-radio-group class="ml20" v-model="currentParams.addWay" @change="currentParams.specialTime = ''">
<el-radio :label="0">单个日期</el-radio>
<el-radio :label="1">时间段</el-radio>
</el-radio-group>
</div>
<div>
<div v-if="currentParams.addWay === 0" class="mt20">
<span>选择日期</span>
<!-- 单个日期 -->
<el-date-picker type="date" class="ml20"></el-date-picker>
<el-date-picker type="date" class="ml20" value-format="yyyy-MM-dd"
v-model="currentParams.specialTime"></el-date-picker>
</div>
<div v-else-if="currentParams.addWay === 1" class="mt20">
<!-- 日期段 -->
<el-date-picker
v-model="noneedRange"
@change="changeneedRange"
type="daterange"
class="ml20"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
</div>
<div class="mt20">
<el-button type="primary" size="mini" @click="saveNoneed">确定</el-button>
<el-button size="mini" @click="cancelSpecial">取消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import tabPane from '@/components/tabPane.vue'
import banciTable from './banciTable/index'
import banciSelect from './banciSelect/index.vue'
import {booleanToNum} from '@/assets/utils/common.js'
export default {
components: {
tabPane
tabPane,
banciTable,
banciSelect
},
created(){
this.getdata()
this.getresponsiable()
},
methods: {
changeRadio(value){
console.log(value)
// ---- 班次选择 -------
// 当前班次选择
saveRowBanci(val){
this.groupFixedworkEntity[this.currentWorkName+'ClassId'] = val.id//存储班次id
this.groupFixedworkEntity[this.currentWorkName+'ClassName'] = val.className//存储班次名称
this.groupFixedworkEntity[this.currentWorkName+'ClassTime'] = val
this.cancelBanci()
},
// 固定班制 ---- 触发班次选择
changeBanci(row){
console.log(row)
this.currentWorkName = row
this.currentselectBanciRow = this.groupFixedworkEntity[this.currentWorkName+'ClassTime']
this.isshowBanci = true
},
selectGroup(){
// 置空
cancelBanci(){
this.isshowBanci = false
this.currentselectBanciRow = null
},
// ----end ----
// ----- 特殊日期选择 ----
// 新增必须打卡 --- 触发班次
setMustTimes(from,item,index){
this.currentParams = JSON.parse(JSON.stringify(item))
if(from == 'must'){
this.mustDaka = true
this.currentselectBanciRow = this.currentParams.classArr
}else{
this.noneedRange = [this.currentParams.specialStartTime,this.currentParams.specialEndTime]
this.noneedDaka = true
}
},
// 保存必须打卡
saveCurrentSpecial(val){
this.currentParams.classArr = val
this.currentParams.classId = val.id
if(!this.currentParams.specialTime){
this.$message.error('请选择日期')
return
}
if(!this.currentParams.classId){
this.$message.error('请选择班次')
return
}
if(this.attendanceGroupFixedworkSpecialList[1].specialTime === this.currentParams.specialTime){
this.$message.error('该日期已设置为无需打卡日,请重新选择')
return
}
if(this.attendanceGroupFixedworkSpecialList[1]){
let timeStart = Date.parse(this.attendanceGroupFixedworkSpecialList[1].specialStartTime)//无需开始时间戳
let timeEnd = Date.parse(this.attendanceGroupFixedworkSpecialList[1].specialEndTime)//无需结束时间戳
let mustTime = Date.parse(this.currentParams.specialTime)//必须时间戳
if(mustTime >= timeStart && mustTime <= timeEnd){
this.$message.error('必须打卡日期不能设置在无需打卡时间段内,请重新选择')
return false
}
}
this.attendanceGroupFixedworkSpecialList[0] = JSON.parse(JSON.stringify(this.currentParams))
this.cancelSpecial()
},
// 取消当前特殊日期设置
cancelSpecial(){
this.currentParams = {}
this.noneedRange = []
this.mustDaka = false
this.noneedDaka = false
this.currentselectBanciRow = null
},
// 无需时间段
changeneedRange(){
if(this.noneedRange){
this.currentParams.specialStartTime = this.noneedRange[0]
this.currentParams.specialEndTime = this.noneedRange[1]
}else{
this.currentParams.specialStartTime = ''
this.currentParams.specialEndTime = ''
}
},
// 保存 无需打卡
saveNoneed(){
if(this.currentParams.addWay === 0 && this.currentParams.specialTime == ''){
this.$message.error('请选择日期')
return
}
if(this.currentParams.addWay === 1 && this.currentParams.specialStartTime == ''){
this.$message.error('请选择时间段')
return
}
if(this.attendanceGroupFixedworkSpecialList[0].specialTime === this.currentParams.specialTime &&
this.attendanceGroupFixedworkSpecialList[0].specialTime != ''){
this.$message.error('该日期已设置为必须打卡日,请重新选择')
return
}
if(this.attendanceGroupFixedworkSpecialList[0]){
let timeStart = Date.parse(this.currentParams.specialStartTime)//无需开始时间戳
let timeEnd = Date.parse(this.currentParams.specialEndTime)//无需结束时间戳
let mustTime = Date.parse(this.attendanceGroupFixedworkSpecialList[0].specialTime)//必须时间戳
if(mustTime >= timeStart && mustTime <= timeEnd){
this.$message.error('无需打卡时间段内不能含有[必须打卡日期],请重新选择')
return false
}
}
this.attendanceGroupFixedworkSpecialList[1] = JSON.parse(JSON.stringify(this.currentParams))
this.cancelSpecial()
},
// ---- end -------
// ---- 部门-人员选择 ------
// 触发部门选择
selectGroup(from){
this.selectTyep = from
if(this.selectTyep){
this.allSelect = this.attendArr
this.allSelectId = this.attendArrId
}else{
this.allSelect = this.noattendArr
this.allSelectId = this.attendArrId
}
this.isshowgroup = true
},
// 取消选择
cancelChoice(){
this.isshowgroup = false
this.currentSelect = []
this.allSelect = []
this.allSelectId = []
this.CurrentAllchecked = false
},
// 确定当前选择
saveBtnchoice(){
this.CurrentAllchecked = false
if(this.selectTyep){
this.attendArr = this.allSelect
this.attendArrId = this.allSelectId
// 参与考勤
}else{
// 不参与考勤
this.noattendArr = this.allSelect
this.attendArrId = this.allSelectId
}
this.cancelChoice()
},
// 单独选择
changegroupId(val){
let value
if(val){
// id
value = this.allSelectId.filter(item1 => !this.allSelect.some(item2 => item2.staffId === item1))
let obj = this.currentSelect.find(item => item.staffId === value[0])
this.allSelect.push(obj)
}else{
// 对象
value = this.allSelect.filter(item1 => !this.allSelectId.some(item2 => item2 === item1.staffId))
let index = this.allSelect.findIndex(item => item.staffId == value[0].staffId)
this.allSelect.splice(index,1)
}
this.CurrentAllchecked = this.currentSelect.every(val => this.allSelectId.includes(val.staffId))
console.log(value,'当前选择值')
},
// 点击触发
handleNodeClickBumen(val){
if(this.selectTyep){
}else{
}
this.currentSelect = val.personList//人员信息
// 判断当前是不是全选
this.CurrentAllchecked = this.currentSelect.every(val => this.allSelectId.includes(val.staffId))
},
// 全选操作
currentChangeAll(){
if(this.CurrentAllchecked){
// 当前全选
let arr1 = this.currentSelect.filter(item => !this.allSelect.some(item2 => item2 === item))
this.allSelect = [...this.allSelect,...arr1]//渲染列表
let arr2 = this.currentSelect.filter(item1 => !this.allSelectId.some(item2 => item2 === item1.staffId))
this.allSelectId = [...this.allSelectId,...arr2.map(item=>item.staffId)]//id信息
}else{
//取消当前全选
this.allSelect = this.allSelect.filter(item1 => !this.currentSelect.some(item2 => item2 === item1))
this.allSelectId = this.allSelectId.filter(item1 => !this.currentSelect.some(item2 => item2.staffId === item1))
}
},
// 删除某个选择
deleteOne(index){
this.allSelect.splice(index,1)
this.allSelectId.splice(index,1)
this.CurrentAllchecked = this.currentSelect.every(val => this.allSelectId.includes(val.staffId)) //判断全选
},
// ---- end -------
// 考勤方式发生改变 -置空其他类别选项
changeRadio(val){
// 固定班次
if(val == 1){
// 自由工时置空
for(let key in this.attendanceGroupFreeworkEntity){
this.attendanceGroupFreeworkEntity[key] = 0
}
this.attendanceGroupFreeworkEntity['workTime'] = ''
this.attendanceGroupFreeworkEntity['attendanceGroupFreeworkSpecialList'] = []
}else if(val == 2){
// 自由工时置空
for(let key in this.attendanceGroupFreeworkEntity){
this.attendanceGroupFreeworkEntity[key] = 0
}
this.attendanceGroupFreeworkEntity['workTime'] = ''
this.attendanceGroupFreeworkEntity['attendanceGroupFreeworkSpecialList'] = []
// 固定班制置空
for(let key in this.groupFixedworkEntity){
this.groupFixedworkEntity[key] = ''
}
this.groupFixedworkEntity['monday'] = 0
this.groupFixedworkEntity['tuesday'] = 0
this.groupFixedworkEntity['wednesday'] = 0
this.groupFixedworkEntity['thursday'] = 0
this.groupFixedworkEntity['friday'] = 0
this.groupFixedworkEntity['saturday'] = 0
this.groupFixedworkEntity['sunday'] = 0
this.groupFixedworkEntity['mondayClassTime'] = []
this.groupFixedworkEntity['tuesdayClassTime'] = []
this.groupFixedworkEntity['wednesdayClassTime'] = []
this.groupFixedworkEntity['thursdayClassTime'] = []
this.groupFixedworkEntity['fridayClassTime'] = []
this.groupFixedworkEntity['saturdayClassTime'] = []
this.groupFixedworkEntity['sundayClassTime'] = []
}
},
// 触发对应流程设置
drawershow(from){
switch(from){
case 'drawer1':
......@@ -302,6 +633,7 @@
break;
}
},
// 关闭流程设置
closedrawer(){
this.drawer = false
this.drawer1 = false
......@@ -309,12 +641,149 @@
this.drawer3 = false
this.drawer4 = false
},
// 全部置空
allReset(){
// 置空无关项
this.changeRadio('1')
this.changeRadio('2')
this.changeRadio('3')
// 先大概处理
for(let key in this.setParams){
this.setParams[key] = ''
}
this.setParams.attendanceGroupStaffList = []
this.attendArr = []
this.attendArrId = []
this.allSelectId = []
this.allSelect = []
this.currentSelect = []
},
// 提交保存
saveSetform(){
// 校验 考勤组名称、参与考勤人员、考勤组负责人、
// 考勤时间 固定班制 -- 校验 排班是否设置 排班id 日期是否参与考勤
// 自由时间 -- 是否参与考勤 工作时长
// 排班制 -- 不确定
// ---- 基础判断 ---
if(this.setParams.groupName === ''){
this.$message.error('请输入考勤组名称')
return
}
if(this.attendArr.length<1){
this.$message.error('请设置参与考勤人员')
return
}
if(this.setParams.groupResponsibleEntity.responsibleId == ''){
this.$message.error('请设置考勤负责人')
return
}
if(this.setParams.type === ''){
this.$message.error('请设置考勤方式')
return
}
if(this.setParams.attendanceType === ''){
this.$message.error('请设置打卡方式')
return false
}
// -----end ---
// ---- 根据类型判断 ---
// 固定班制
if(this.setParams.type == 1){
if(this.groupFixedworkEntity.monday && !this.groupFixedworkEntity.mondayClassId){
this.$message.error('周一考勤班次未设置')
return false
}
if(this.groupFixedworkEntity.tuesday && !this.groupFixedworkEntity.tuesdayClassId){
this.$message.error('周二考勤班次未设置')
return false
}
if(this.groupFixedworkEntity.wednesday && !this.groupFixedworkEntity.wednesdayClassId){
this.$message.error('周三考勤班次未设置')
return false
}
if(this.groupFixedworkEntity.thursday && !this.groupFixedworkEntity.thursdayClassId){
this.$message.error('周四考勤班次未设置')
return false
}
if(this.groupFixedworkEntity.friday && !this.groupFixedworkEntity.fridayClassId){
this.$message.error('周五考勤班次未设置')
return false
}
if(this.groupFixedworkEntity.saturday && !this.groupFixedworkEntity.saturdayClassId){
this.$message.error('周六考勤班次未设置')
return false
}
if(this.groupFixedworkEntity.sunday && !this.groupFixedworkEntity.sundayClassId){
this.$message.error('周日考勤班次未设置')
return false
}
}
if(this.setParams.type == 3){
if(this.attendanceGroupFreeworkEntity.workTime = '' ){
this.$message.error('请设置工作时长')
return false
}
}
// ---- 处理数据 ----
if(this.attendArr.length > 0){
this.setParams.attendanceGroupStaffList = this.attendArr.map(item => {
return{
staffId:item.staffId,
staffName:item.staffName
}
})
}
if(this.setParams.groupResponsibleEntity.responsibleId){
// 给负责人进行赋值
this.setParams.groupResponsibleEntity.responsibleName = this.responsiableList[this.setParams.groupResponsibleEntity.responsibleId]
}
// 删操作值
// delete this.groupFixedworkEntity.mondayClassTime
// delete this.groupFixedworkEntity.tuesdayClassName
// delete this.groupFixedworkEntity.wednesdayClassTime
// delete this.groupFixedworkEntity.thursdayClassTime
// delete this.groupFixedworkEntity.fridayClassTime
// delete this.groupFixedworkEntity.saturdayClassTime
// delete this.groupFixedworkEntity.sundayClassTime
// delete this.attendanceGroupFixedworkSpecialList[0]['classArr']
// delete this.attendanceGroupFixedworkSpecialList[1]['classArr']
// 固定工时
if(this.setParams.type == 1){
this.groupFixedworkEntity.attendanceGroupFixedworkSpecialList = this.attendanceGroupFixedworkSpecialList
this.setParams.groupFixedworkEntity = this.groupFixedworkEntity
}
// 自由工时
if(this.setParams.type == 3){
this.attendanceGroupFreeworkEntity.attendanceGroupFixedworkSpecialList = this.attendanceGroupFixedworkSpecialList
this.setParams.attendanceGroupFreeworkEntity = this.attendanceGroupFreeworkEntity
}
this.$post('/attendance/group/save',this.setParams).then(res => {
if(res.code === 1){
this.$router.back()
}
})
},
// 参数和公共字典
getdata(){
this.$post('/attendance/group/add').then(res => {
if(res.code == 1){
// 打卡类型
this.attendanceType = []
let data = res.data.dict//字典函数
this.classArr = data.classId
this.responsiableList = data.workMan
this.areaData = data.deptId
for(let key in data.attendanceType){
let obj = {
label:data.attendanceType[key],
......@@ -322,6 +791,7 @@
}
this.attendanceType.push(obj)
}
// 类型
let type = []
for(let key in data.type){
......@@ -339,24 +809,19 @@
}
})
console.log(this.paibanType)
}
})
},
},
computed:{
persons(){
let arrName = this.attendArr.map(item => item.staffName)
return arrName.join(',')
}
},
data() {
return {
size:"small",
column:2,
toString:[
"type",
],
toArrays: [
],
toDate: [
],
activeName:'/attendance/group/view',
thirdList:[
{
......@@ -364,30 +829,6 @@
path:'/attendance/group/view'
}
],
drawer1:false,
drawer2:false,
drawer3:false,
drawer4:false,
setParams:{
groupName:'',
personNum:'',
responsiblePerson:'',
type:'',//考勤方式
attendanceTime:'',
remark:'',
attendanceType:[]//打卡类型
},
drawer:false,
weekList:[],
isshowBanci:false,//班次展示
isshowgroup:false,//人员选择
mustDaka:false,//必须打卡设置
noneedDaka:false,//无需打卡
areaData:[],
type:[],
week:[],
reqForm:{},
attendanceType:[],
paibanType:[
{
label:'固定班制(固定时间上下班)',
......@@ -404,7 +845,131 @@
value:'3',
des:'上下班时间不固定,可随时打卡,适用于销售以及装修、家政等计时工'
}
]
],
classArr:[],//公共字典 - 班次选择
attendanceType:[],//打卡类型 - 公共字典
areaData:[],//部门信息 - 公共字典
responsiableList:[],//负责人选择 -公共字典
// 当前选择员工
currentSelect:[],
// 员工总表
allSelect:[],//选择的列表
allSelectId:[],//选择的id
CurrentAllchecked:false,
// 存储当前参与考勤人员
attendArr:[],
attendArrId:[],
// 存储当前不参与考勤人员
noattendArr:[],
noattendArrIc:[],
selectTyep:'',//选择人员类型 true参与考勤人员//false不参与考勤人员
drawer1:false,
drawer2:false,
drawer3:false,
drawer4:false,
drawer:false,
isshowBanci:false,//班次展示
isshowgroup:false,//人员选择
mustDaka:false,//必须打卡设置
noneedDaka:false,//无需打卡
setParams:{
groupName:'',//考勤名称
// 负责人信息
groupResponsibleEntity:{
responsibleId:'',//考勤负责人
responsibleName:''//考勤负责人姓名
},
attendanceGroupStaffList:[],//参与考勤人员
type:'',//考勤方式
attendanceType:'',//打卡类型
},
type:[],
currentselectBanciRow:'',//当前班次
// 当前工作日名称
currentWorkName:'',
noneedRange:[],//时间段选择
// 当前特殊日期
currentParams:{},
// 自由工时配置
attendanceGroupFreeworkEntity:{
monday:0,
tuesday:0,
wednesday:0,
thursday:0,
friday:0,
saturday:0,
sunday:0,
holidays:0,
workTime:'',
attendanceGroupFreeworkSpecialList:[]
},
//固定班制
groupFixedworkEntity:{
monday:0,//是否考勤(0.否,1,是)
mondayClassId:'',
mondayClassName:'',
mondayClassTime:[],//便于选择-传参删除
tuesday:0,//是否考勤(0.否,1,是)
tuesdayClassId:'',
tuesdayClassName:'',
tuesdayClassTime:[],//便于选择-传参删除
wednesday:0,//是否考勤(0.否,1,是)
wednesdayClassId:'',
wednesdayClassName:'',
wednesdayClassTime:[],//便于选择-传参删除
thursday:0,//是否考勤(0.否,1,是)
thursdayClassId:'',
thursdayClassName:'',
thursdayClassTime:[],
friday:0,//是否考勤(0.否,1,是)
fridayClassId:'',
fridayClassName:'',
fridayClassTime:'',//便于选择-传参删除
saturday:0,//是否考勤(0.否,1,是)
saturdayClassId:'',
saturdayClassName:'',
saturdayClassTime:[],//便于选择-传参删除
sunday:0,//是否考勤(0.否,1,是)
sundayClassId:'',
sundayClassName:'',
sundayClassTime:[],//便于选择-传参删除
attendanceGroupFixedworkSpecialList:[],
holidays:""
},
holidays:0,// 假期排休 法定节假日自动排休(0.否,1.是)
// 公共 - 特殊日期设置
attendanceGroupFixedworkSpecialList:[
{
must:1,//必需打卡
specialStartTime:'',//时间段
specialEndTime:'',//
specialTime:'',//必须打卡日期
addWay:0,//日期还是时间段
classId:'',
classArr:{}
},
{
must:0,//无需打卡
specialStartTime:'',//时间段
specialEndTime:'',//
specialTime:'',//必须打卡日期
addWay:0,//日期还是时间段
classId:'',
classArr:{}
}
],
}
}
}
......@@ -422,6 +987,7 @@
color: #606266;
background-color: #FFF;
}
.contentClass{
width: 600px;
}
......
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