|
@@ -31,7 +31,7 @@
|
|
|
:dataSource="dataSource"
|
|
|
:pagination="ipagination"
|
|
|
:loading="loading"
|
|
|
- @change="handleTableChange">
|
|
|
+ @change="handleTableChange" :scroll="{ x: 1000, y: 650 }">
|
|
|
|
|
|
<span slot="ShiftTime" slot-scope="text, record, index">
|
|
|
{{record.shiftRealTimeS}} - {{record.shiftRealTimeX}}
|
|
@@ -41,29 +41,42 @@
|
|
|
</span>
|
|
|
|
|
|
<span slot="customDuration" slot-scope="text, record, index">
|
|
|
- <a-tag @click="workInfo(record)" color="pink" v-if="record.workOvertime != null && record.workOvertime > 0 ">
|
|
|
+ <!-- <a-tag @click="workInfo(record)" color="pink" v-if="record.workOvertime != null && record.workOvertime > 0 ">
|
|
|
{{text}}
|
|
|
</a-tag>
|
|
|
- <a @click="workInfo(record)" v-else>{{text}}</a>
|
|
|
+ <a @click="workInfo(record)" v-else>{{text}}</a> -->
|
|
|
+ <span v-if="record.setInfo > 0 ">
|
|
|
+ <a-tag title="点击查看加班详情" @click="workInfo(record)" color="pink" >{{text}}</a-tag>
|
|
|
+ </span>
|
|
|
+ <span v-if="record.setInfo == 0 ">
|
|
|
+ <a-tag title="点击查看加班详情" @click="workInfo(record)" color="#87d068" >{{text}}</a-tag>
|
|
|
+ </span>
|
|
|
</span>
|
|
|
|
|
|
- <span slot="shiftType" slot-scope="text, record, index">
|
|
|
+ <a-badge slot="shiftType" slot-scope="text, record, index">
|
|
|
<!-- ruleType 上班类型 1.固定时间上下班,2.按班次上下班,3.自由上下班 -->
|
|
|
|
|
|
<a-tag color="pink" v-if="record.latetimeS < 0 || record.latetimeX > 0
|
|
|
|| (record.ifwork !=0 && record.attendanceCount < 2 && record.name != null)
|
|
|
|| (record.ifwork !=0 && record.name != null && record.name != '' && (record.gotoTime == null || record.gotoTime == ''))
|
|
|
|| record.duration != null
|
|
|
- && (record.setInfo == '' || record.setInfo == null)">
|
|
|
+ && (record.setInfo > 0 ) && (record.errorState != 0 )">
|
|
|
异常
|
|
|
</a-tag>
|
|
|
<a-tag color="#87d068" v-else>正常</a-tag>
|
|
|
- <a>{{record.setInfo}}</a>
|
|
|
- </span>
|
|
|
+
|
|
|
+ <a-icon title="该员工在未排班或休息班打卡" v-if="(record.name == null || record.shiftRealTimeS == null) && record.gotoTime != null && record.gotoTime != '' && (record.setInfo > 0 )" slot="count" v-else type="exclamation" style="color: #f57301" />
|
|
|
+
|
|
|
+ <!-- <a>{{record.setInfo}}</a> -->
|
|
|
+ </a-badge>
|
|
|
|
|
|
<span slot="action" slot-scope="text, record">
|
|
|
- <a v-has="'viewClockUserInfo:jiaozhun'" @click="handleEdit(record)">校准</a>
|
|
|
-
|
|
|
+ <!-- <a v-has="'viewClockUserInfo:jiaozhun'" @click="handleEdit(record)">校准</a> -->
|
|
|
+ <a v-has="'viewClockUserInfo:jiaozhun'" @click="showModal(record)">校准</a>
|
|
|
+ <!-- <a-popconfirm v-has="'viewClockUserInfo:jiaozhun'" title="确定忽略此异常吗?" @confirm="() => errorInfo(record)">
|
|
|
+ <a>校准</a>
|
|
|
+ </a-popconfirm>-->
|
|
|
+
|
|
|
<a-divider type="vertical"/>
|
|
|
|
|
|
<a-dropdown v-has="'viewClockUserInfo:more'">
|
|
@@ -73,17 +86,17 @@
|
|
|
</a>
|
|
|
<a-menu slot="overlay">
|
|
|
<a-menu-item>
|
|
|
- <a-popconfirm title="确定付薪吗?" @confirm="() => fuXinInfo('1',record)">
|
|
|
+ <a-popconfirm title="确定付薪吗?" @confirm="() => fuXinInfo('2','1',record)">
|
|
|
<a>付薪</a>
|
|
|
</a-popconfirm>
|
|
|
</a-menu-item>
|
|
|
<a-menu-item>
|
|
|
- <a-popconfirm title="确定累计调休吗?" @confirm="() => fuXinInfo('2',record)">
|
|
|
+ <a-popconfirm title="确定累计调休吗?" @confirm="() => fuXinInfo('2','2',record)">
|
|
|
<a>累计调休</a>
|
|
|
</a-popconfirm>
|
|
|
</a-menu-item>
|
|
|
<a-menu-item>
|
|
|
- <a-popconfirm title="确定忽略吗?" @confirm="() => fuXinInfo('3',record)">
|
|
|
+ <a-popconfirm title="确定忽略吗?" @confirm="() => fuXinInfo('2','3',record)">
|
|
|
<a>忽略</a>
|
|
|
</a-popconfirm>
|
|
|
</a-menu-item>
|
|
@@ -103,19 +116,52 @@
|
|
|
<a-modal width="1200px"
|
|
|
v-model="modal2Visible" title="加班信息详情" :footer="null"
|
|
|
centered @ok="() => (modal2Visible = false)" >
|
|
|
- <!-- <p>加班申请时间 : {{durationCommitDate}}</p>
|
|
|
- <p>加班开始时间 : {{durationBeginDate}}</p>
|
|
|
- <p>加班结束时间 : {{durationEndDate}}</p>
|
|
|
- <p>加班时长 : {{duration}}</p>
|
|
|
- <p>加班事由 : {{demo}}</p> -->
|
|
|
- <a-table :columns="columns2" :data-source="data" rowKey="id"></a-table>
|
|
|
+ <a-table :columns="columns2" :data-source="data" rowKey="id">
|
|
|
+
|
|
|
+ <span slot="action" slot-scope="text, record">
|
|
|
+
|
|
|
+ <a-dropdown v-has="'viewClockUserInfo:more'">
|
|
|
+
|
|
|
+ <a class="ant-dropdown-link">
|
|
|
+ 更多 <a-icon type="down"/>
|
|
|
+ </a>
|
|
|
+ <a-menu slot="overlay">
|
|
|
+ <a-menu-item>
|
|
|
+ <a-popconfirm title="确定付薪吗?" @confirm="() => fuXinInfo('1','1',record)">
|
|
|
+ <a>付薪</a>
|
|
|
+ </a-popconfirm>
|
|
|
+ </a-menu-item>
|
|
|
+ <a-menu-item>
|
|
|
+ <a-popconfirm title="确定累计调休吗?" @confirm="() => fuXinInfo('1','2',record)">
|
|
|
+ <a>累计调休</a>
|
|
|
+ </a-popconfirm>
|
|
|
+ </a-menu-item>
|
|
|
+ <a-menu-item>
|
|
|
+ <a-popconfirm title="确定忽略吗?" @confirm="() => fuXinInfo('1','3',record)">
|
|
|
+ <a>忽略</a>
|
|
|
+ </a-popconfirm>
|
|
|
+ </a-menu-item>
|
|
|
+ </a-menu>
|
|
|
+ </a-dropdown>
|
|
|
+ </span>
|
|
|
+ </a-table>
|
|
|
+ </a-modal>
|
|
|
+
|
|
|
+ <a-modal
|
|
|
+ title="校准忽略本次异常"
|
|
|
+ :visible="visible"
|
|
|
+ :confirm-loading="confirmLoading"
|
|
|
+ @ok="handleOk"
|
|
|
+ @cancel="handleCancel"
|
|
|
+ >
|
|
|
+ <a-input placeholder="请填写忽略原因" v-model="errorText"></a-input>
|
|
|
</a-modal>
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
|
|
|
- import {getAction, postAction, deleteAction} from '@/api/manage'
|
|
|
+ import {getAction, postAction, deleteAction,putAction} from '@/api/manage'
|
|
|
import SelectUserModal from '../modules/SelectUserModal'
|
|
|
import JiaoZhunModal from './JiaoZhunModal'
|
|
|
import DeptRoleUserModal from '../modules/DeptRoleUserModal'
|
|
@@ -125,32 +171,6 @@
|
|
|
fuXinInfo
|
|
|
} from '@/api/api'
|
|
|
|
|
|
- const data = [
|
|
|
- {
|
|
|
- key: '1',
|
|
|
- durationCommitDate: 'John Brown',
|
|
|
- durationBeginDate: 32,
|
|
|
- durationEndDate: 'New York No. 1 Lake Park',
|
|
|
- duration: ['nice', 'developer'],
|
|
|
- demo:'11111111'
|
|
|
- },
|
|
|
- {
|
|
|
- key: '2',
|
|
|
- durationCommitDate: 'John Brown',
|
|
|
- durationBeginDate: 32,
|
|
|
- durationEndDate: 'New York No. 1 Lake Park',
|
|
|
- duration: ['nice', 'developer'],
|
|
|
- demo:'11111111'
|
|
|
- },{
|
|
|
- key: '3',
|
|
|
- durationCommitDate: 'John Brown',
|
|
|
- durationBeginDate: 32,
|
|
|
- durationEndDate: 'New York No. 1 Lake Park',
|
|
|
- duration: ['nice', 'developer'],
|
|
|
- demo:'11111111'
|
|
|
- },
|
|
|
- ];
|
|
|
-
|
|
|
export default {
|
|
|
name: "DeptUserInfo",
|
|
|
mixins: [JeecgListMixin],
|
|
@@ -161,6 +181,12 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ errorViewDate:'',
|
|
|
+ errorSt:'',
|
|
|
+ errorUserId:'',
|
|
|
+ errorText: '',//校准弹框属性
|
|
|
+ visible: false,//校准弹框属性
|
|
|
+ confirmLoading: false,//校准弹框属性
|
|
|
durationCommitDate:'',//加班申请时间
|
|
|
durationBeginDate:'',//加班开始时间
|
|
|
durationEndDate:'',//加班结束时间
|
|
@@ -175,28 +201,19 @@
|
|
|
headMonth:'',//标题选择月份
|
|
|
newMonth:'',//更改时选择的月份
|
|
|
currentDeptId: '',
|
|
|
- data : [
|
|
|
- {
|
|
|
- key: '1',
|
|
|
- durationCommitDate: '2022-01-02 11:00:21',
|
|
|
- durationBeginDate: '2022-01-02 11:00:21',
|
|
|
- durationEndDate: '2022-01-02 21:00:21',
|
|
|
- duration: '10',
|
|
|
- demo:'测试'
|
|
|
- }
|
|
|
- ],
|
|
|
+ data : [],//加班信息弹框
|
|
|
columns2:[{
|
|
|
title: '加班申请时间',
|
|
|
align: "center",
|
|
|
- dataIndex: 'durationCommitDate'
|
|
|
+ dataIndex: 'commitDate'
|
|
|
},{
|
|
|
title: '加班开始时间',
|
|
|
align: "center",
|
|
|
- dataIndex: 'durationBeginDate'
|
|
|
+ dataIndex: 'beginDate'
|
|
|
},{
|
|
|
title: '加班结束时间',
|
|
|
align: "center",
|
|
|
- dataIndex: 'durationEndDate'
|
|
|
+ dataIndex: 'endDate'
|
|
|
},{
|
|
|
title: '加班时长',
|
|
|
align: "center",
|
|
@@ -205,7 +222,18 @@
|
|
|
title: '加班事由',
|
|
|
align: "center",
|
|
|
dataIndex: 'demo'
|
|
|
- }],
|
|
|
+ },{
|
|
|
+ title: '处理方式',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'setInfo'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ scopedSlots: {customRender: 'action'},
|
|
|
+ align: "center",
|
|
|
+ width: 120
|
|
|
+ }],
|
|
|
// 表头
|
|
|
columns: [{
|
|
|
title: '日期',
|
|
@@ -255,12 +283,12 @@
|
|
|
align: "center",
|
|
|
dataIndex: 'attendanceCount'
|
|
|
},
|
|
|
- {
|
|
|
- title: '加班申请',
|
|
|
- align: "center",
|
|
|
- dataIndex: 'demo',
|
|
|
- width: 200
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // title: '加班申请',
|
|
|
+ // align: "center",
|
|
|
+ // dataIndex: 'demo',
|
|
|
+ // width: 200
|
|
|
+ // },
|
|
|
{
|
|
|
title: '加班时间',
|
|
|
align: "center",
|
|
@@ -278,6 +306,8 @@
|
|
|
width: 120
|
|
|
}],
|
|
|
url: {
|
|
|
+ errorInfo: '/viewClockIn/viewClockIn/errorInfo',
|
|
|
+ getJiaBan: '/workOvertime/workOvertime/getJiaBan',
|
|
|
list: '/viewClockIn/viewClockIn/list',
|
|
|
// list: "/sys/user/departUserList",
|
|
|
edit: "/sys/user/editSysDepartWithUser",
|
|
@@ -294,6 +324,41 @@
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ showModal(record) {
|
|
|
+ this.errorViewDate = record.viewDate;
|
|
|
+ this.errorUserId = record.userId;
|
|
|
+ this.errorSt = record.errorState;
|
|
|
+ this.errorText = record.errorText;
|
|
|
+ this.visible = true;
|
|
|
+ },
|
|
|
+ handleOk(e) {
|
|
|
+ if(this.errorSt == 0){
|
|
|
+ this.$message.warning("已校准过,无需再次校准");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(this.errorText == null || this.errorText == ''){
|
|
|
+ this.$message.warning("请填写忽略原因");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let that = this;
|
|
|
+ this.confirmLoading = true;
|
|
|
+ putAction(this.url.errorInfo, {viewDate:this.errorViewDate,userId:this.errorUserId,errorText:this.errorText}).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ that.$message.success("操作成功");
|
|
|
+ that.loadData();
|
|
|
+ } else {
|
|
|
+ that.$message.warning(res.message);
|
|
|
+ that.loadData();
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.confirmLoading = false;
|
|
|
+ this.visible = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleCancel(e) {
|
|
|
+ console.log('Clicked cancel button');
|
|
|
+ this.visible = false;
|
|
|
+ },
|
|
|
onDateChange: function (value, dateString) {
|
|
|
this.newMonth = dateString;
|
|
|
this.$emit('clearSelectedDepartKeys');
|
|
@@ -482,35 +547,60 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- fuXinInfo(st,record){
|
|
|
- // 1付薪,2累计调休,3忽略
|
|
|
- if(record.setInfo != '' && record.setInfo != null){
|
|
|
- this.$message.warning("已设置过,不能再次设置");
|
|
|
- return;
|
|
|
- }
|
|
|
- if(record.demo == '' || record.demo == null){
|
|
|
- this.$message.warning("该员工当日没有加班申请信息");
|
|
|
- return;
|
|
|
+ errorInfo(record){//校准
|
|
|
+ if(record.errorState == 0){
|
|
|
+ this.$message.warning("已校准过,无需再次校准");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let that = this;
|
|
|
+ putAction(this.url.errorInfo, {viewDate:record.viewDate,userId:record.userId}).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ that.$message.success("操作成功");
|
|
|
+ that.loadData();
|
|
|
+ } else {
|
|
|
+ that.$message.warning(res.message);
|
|
|
+ that.loadData();
|
|
|
}
|
|
|
+ }).finally(() => {
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ fuXinInfo(w,st,record){//薪资操作
|
|
|
+
|
|
|
+ // w 1:弹框中方法,2列表中方法
|
|
|
+ // st 1付薪,2累计调休,3忽略
|
|
|
+ // if(record.setInfo != '' && record.setInfo != null){
|
|
|
+ // this.$message.warning("已设置过,不能再次设置");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // if(record.demo == '' || record.demo == null){
|
|
|
+ // this.$message.warning("该员工当日没有加班申请信息");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+
|
|
|
let that = this;
|
|
|
- fuXinInfo({viewDate:record.viewDate,userId:record.userId,st:st}).then((res) => {
|
|
|
- if (res == 'true') {
|
|
|
+ fuXinInfo({viewDate:record.viewDate,viewDate1:record.beginDate,userId:record.userId,pkId:record.id,st:st,w:w}).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
that.$message.success("已成功设置");
|
|
|
that.loadData();
|
|
|
} else {
|
|
|
- that.$message.warning(res);
|
|
|
+ that.$message.warning(res.message);
|
|
|
that.loadData();
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+ that.modal2Visible = false;
|
|
|
},
|
|
|
- workInfo(record){
|
|
|
- this.modal2Visible = true;
|
|
|
- this.durationCommitDate = record.commitDate;//加班申请时间
|
|
|
- this.durationBeginDate = record.durationBeginDate;//加班开始时间
|
|
|
- this.durationEndDate = record.durationEndDate;//加班结束时间
|
|
|
- this.duration = record.duration;//加班时长
|
|
|
- this.demo = record.demo;//加班事由
|
|
|
+ workInfo(record){//点击加班时间事件
|
|
|
+
|
|
|
+ let that = this;
|
|
|
+
|
|
|
+ putAction(this.url.getJiaBan, {viewDate:record.viewDate,username:record.username}).then((res) => {
|
|
|
+ that.data = res;
|
|
|
+ }).finally(() => {
|
|
|
+ that.modal2Visible = true;
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|