考勤明细添加数据同步页面
This commit is contained in:
parent
7b245359a3
commit
6f1e3c9872
|
|
@ -92,4 +92,74 @@ export function exportOutCountList(query) {
|
|||
})
|
||||
}
|
||||
|
||||
/*数据同步1*/
|
||||
export function ayscData(query) {
|
||||
return request({
|
||||
url: '/system/attDetails/getAttCountList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/*数据同步2*/
|
||||
export function ayscData2(query) {
|
||||
return request({
|
||||
url: '/system/attDetails/getAttCountList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/*数据同步3*/
|
||||
export function ayscData3(query) {
|
||||
return request({
|
||||
url: '/system/attDetails/getAttCountList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/*数据同步4*/
|
||||
export function ayscData4(query) {
|
||||
return request({
|
||||
url: '/system/attDetails/getAttCountList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/*数据同步5*/
|
||||
export function ayscData5(query) {
|
||||
return request({
|
||||
url: '/system/attDetails/getAttCountList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/*数据同步6*/
|
||||
export function ayscData6(query) {
|
||||
return request({
|
||||
url: '/system/attDetails/getAttCountList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/*数据同步7*/
|
||||
export function ayscData7(query) {
|
||||
return request({
|
||||
url: '/system/attDetails/getAttCountList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/*数据同步8*/
|
||||
export function ayscData8(query) {
|
||||
return request({
|
||||
url: '/system/attDetails/getAttCountList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,48 +2,29 @@
|
|||
<div class="app-container" id="attDetails">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="姓名" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.userName" placeholder="请输入姓名" clearable style="width: 240px"
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门" prop="orgId">
|
||||
<treeselect v-model="queryParams.orgId" :options="deptOptions" :normalizer="normalizer" placeholder="选择部门" style="width: 240px"/>
|
||||
<treeselect v-model="queryParams.orgId" :options="deptOptions" :normalizer="normalizer" placeholder="选择部门"
|
||||
style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="attStatus">
|
||||
<el-select
|
||||
v-model="queryParams.attStatus"
|
||||
placeholder="状态"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.att_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
<el-select v-model="queryParams.attStatus" placeholder="状态" clearable style="width: 240px">
|
||||
<el-option v-for="dict in dict.type.att_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
<el-date-picker v-model="dateRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange"
|
||||
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['att:attReport:export']">导出</el-button>
|
||||
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['att:attReport:abnormal']">异常数据导出</el-button>
|
||||
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['att:attReport:export']">导出</el-button>
|
||||
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['att:attReport:abnormal']">异常数据导出</el-button>
|
||||
<el-button type="primary" size="mini" @click="openDialog" v-hasPermi="['att:attReport:batch']">批量修改</el-button>
|
||||
|
||||
<el-button type="primary" size="mini" @click="openData" v-hasPermi="['att:attReport:syn']">数据同步</el-button>
|
||||
|
|
@ -79,16 +60,14 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="工作时间外出次数" align="center" prop="normalNum" width="180">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
@click="openOutCountList(scope.row)" style="color: #02a7f0; cursor: pointer">
|
||||
<div @click="openOutCountList(scope.row)" style="color: #02a7f0; cursor: pointer">
|
||||
{{ scope.row.outCount }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="打卡记录" align="center" prop="normalNum">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
@click="openAttCountList(scope.row)" style="color: #02a7f0; cursor: pointer">
|
||||
<div @click="openAttCountList(scope.row)" style="color: #02a7f0; cursor: pointer">
|
||||
{{ scope.row.attCount }}
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -112,20 +91,16 @@
|
|||
<el-table-column label="异常备注" align="center" prop="offWorkErrorRemake" :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<el-dialog title="批量修改" :visible.sync="open" width="1200px" append-to-body @close="cancel">
|
||||
<el-table v-loading="loading" :data="dialogList" width="100%" height="500px">
|
||||
<el-table-column label="序号" type="index" width="55" align="center" fixed />
|
||||
<el-table-column label="姓名" align="center" prop="userName" fixed />
|
||||
<el-table-column label="所属部门" align="center" prop="orgName" :show-overflow-tooltip="true" width="150" fixed />
|
||||
<el-table-column label="考勤日期" align="center" prop="attCurrentDay" :show-overflow-tooltip="true" width="180" fixed>
|
||||
<el-table-column label="考勤日期" align="center" prop="attCurrentDay" :show-overflow-tooltip="true" width="180"
|
||||
fixed>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ formatDate(scope.row.attCurrentDay) }}</span>
|
||||
</template>
|
||||
|
|
@ -135,10 +110,8 @@
|
|||
<span class="required-star">*</span> 修改上班时间
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
v-model="scope.row.toWorkAttCurrentTime" :clearable="false"
|
||||
type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 95%"
|
||||
placeholder="选择上班时间">
|
||||
<el-date-picker v-model="scope.row.toWorkAttCurrentTime" :clearable="false" type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" style="width: 95%" placeholder="选择上班时间">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -147,19 +120,15 @@
|
|||
<span class="required-star">*</span> 修改上班状态
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.toWorkAttStatus" @change="changeToWorkAttStatus"
|
||||
placeholder="修改后上班状态" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in dict.type.att_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
<el-select v-model="scope.row.toWorkAttStatus" @change="changeToWorkAttStatus" placeholder="修改后上班状态"
|
||||
style="width: 95%">
|
||||
<el-option v-for="dict in dict.type.att_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="打卡地址" align="center" prop="toWorkAttAddress" :show-overflow-tooltip="true" width="180"/>
|
||||
<el-table-column label="打卡地址" align="center" prop="toWorkAttAddress" :show-overflow-tooltip="true"
|
||||
width="180" />
|
||||
<el-table-column align="center" prop="toErrorRemake" width="200">
|
||||
<template slot="header">
|
||||
<span class="required-star">*</span> 原因说明
|
||||
|
|
@ -174,10 +143,8 @@
|
|||
<span class="required-star">*</span> 修改下班时间
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
v-model="scope.row.offWorkAttCurrentTime" :clearable="false"
|
||||
type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="width: 95%"
|
||||
placeholder="选择下班时间">
|
||||
<el-date-picker v-model="scope.row.offWorkAttCurrentTime" :clearable="false" type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" style="width: 95%" placeholder="选择下班时间">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -186,19 +153,14 @@
|
|||
<span class="required-star">*</span> 修改下班状态
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.offWorkAttStatus"
|
||||
placeholder="修改后下班状态" style="width: 95%">
|
||||
<el-option
|
||||
v-for="dict in dict.type.att_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
<el-select v-model="scope.row.offWorkAttStatus" placeholder="修改后下班状态" style="width: 95%">
|
||||
<el-option v-for="dict in dict.type.att_status" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="打卡地址" align="center" prop="offWorkAttAddress" :show-overflow-tooltip="true" width="180"></el-table-column>
|
||||
<el-table-column label="打卡地址" align="center" prop="offWorkAttAddress" :show-overflow-tooltip="true"
|
||||
width="180"></el-table-column>
|
||||
<el-table-column align="center" prop="offErrorRemake" width="200">
|
||||
<template slot="header">
|
||||
<span class="required-star">*</span> 原因说明
|
||||
|
|
@ -217,7 +179,8 @@
|
|||
|
||||
<!-- 外出次数查询 -->
|
||||
<el-dialog :title="title" :visible.sync="showOutCount" width="1200px" height="1000px" append-to-body>
|
||||
<el-form :model="queryRecord" ref="queryFormRecord" size="small" :inline="true" v-show="showSearch" label-width="110px">
|
||||
<el-form :model="queryRecord" ref="queryFormRecord" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="110px">
|
||||
<el-form-item>
|
||||
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExportOutCountList">导出</el-button>
|
||||
</el-form-item>
|
||||
|
|
@ -238,19 +201,15 @@
|
|||
<el-table-column label="打卡地址" align="center" prop="attAddress" sortable :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="totalTwo>0"
|
||||
:total="totalTwo"
|
||||
:page.sync="queryRecord.pageNum"
|
||||
:limit.sync="queryRecord.pageSize"
|
||||
@pagination="getOutCountList"
|
||||
/>
|
||||
<pagination v-show="totalTwo > 0" :total="totalTwo" :page.sync="queryRecord.pageNum"
|
||||
:limit.sync="queryRecord.pageSize" @pagination="getOutCountList" />
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!-- 打卡次数记录 -->
|
||||
<el-dialog :title="title" :visible.sync="showAttCount" width="1200px" height="1000px" append-to-body>
|
||||
<el-form :model="queryRecord" ref="queryFormRecord" size="small" :inline="true" v-show="showSearch" label-width="110px">
|
||||
<el-form :model="queryRecord" ref="queryFormRecord" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="110px">
|
||||
<el-form-item>
|
||||
<!-- <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>-->
|
||||
</el-form-item>
|
||||
|
|
@ -271,15 +230,36 @@
|
|||
<el-table-column label="打卡地址" align="center" prop="attAddress" sortable :show-overflow-tooltip="true" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="totalAttCount>0"
|
||||
:total="totalAttCount"
|
||||
:page.sync="queryAttCount.pageNum"
|
||||
:limit.sync="queryAttCount.pageSize"
|
||||
@pagination="getAttCountList"
|
||||
/>
|
||||
<pagination v-show="totalAttCount > 0" :total="totalAttCount" :page.sync="queryAttCount.pageNum"
|
||||
:limit.sync="queryAttCount.pageSize" @pagination="getAttCountList" />
|
||||
</el-dialog>
|
||||
|
||||
<!-- 数据同步对话框 -->
|
||||
<el-dialog :title="dataAyscTitle" :visible.sync="dataAyscOpen" width="500px" append-to-body>
|
||||
<el-form ref="form2" :model="form2" label-width="80px">
|
||||
<el-row>
|
||||
<el-form-item label="日期" prop="dateRange">
|
||||
<el-date-picker v-model="form2.dateRange" style="width: 100%" value-format="yyyy-MM-dd" type="daterange"
|
||||
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-button type="primary" plain @click="operMethod(1)">按钮</el-button>
|
||||
<el-button type="primary" plain @click="operMethod(2)">按钮2</el-button>
|
||||
<el-button type="primary" plain @click="operMethod(3)">按钮3</el-button>
|
||||
<el-button type="primary" plain @click="operMethod(4)">按钮4</el-button>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-button type="primary" plain @click="operMethod(5)">按钮5</el-button>
|
||||
<el-button type="primary" plain @click="operMethod(6)">按钮6</el-button>
|
||||
<el-button type="primary" plain @click="operMethod(7)">按钮7</el-button>
|
||||
<el-button type="primary" plain @click="operMethod(8)">按钮8</el-button>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dataAyscOpen = !dataAyscOpen">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -293,7 +273,15 @@
|
|||
listDept,
|
||||
getOutCountList,
|
||||
getAttCountList,
|
||||
exportOutCountList
|
||||
exportOutCountList,
|
||||
ayscData,
|
||||
ayscData2,
|
||||
ayscData3,
|
||||
ayscData4,
|
||||
ayscData5,
|
||||
ayscData6,
|
||||
ayscData7,
|
||||
ayscData8,
|
||||
} from "@/api/report/attReport";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
|
|
@ -362,7 +350,11 @@
|
|||
// 遮罩层
|
||||
loadingAttCount: false,
|
||||
tableDataAttCount: [],
|
||||
|
||||
dataAyscTitle: '数据同步',
|
||||
dataAyscOpen: false,
|
||||
form2: {
|
||||
dateRange:[this.getToday(),this.getToday()]
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -454,6 +446,60 @@
|
|||
}
|
||||
},
|
||||
openData() {
|
||||
this.dataAyscOpen = true;
|
||||
},
|
||||
getToday() {
|
||||
const date = new Date();
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
},
|
||||
operMethod(type){
|
||||
const query = {
|
||||
startDate:this.form2.dateRange[0],
|
||||
endDate:this.form2.dateRange[1],
|
||||
}
|
||||
let loading = this.$loading({
|
||||
lock: true,
|
||||
text: "数据同步中,请稍候...",
|
||||
background: 'rgba(0,0,0,0.2)'
|
||||
})
|
||||
if(type === 1){
|
||||
ayscData(query).then(res=>{
|
||||
loading.close();
|
||||
}).catch(err=>{});
|
||||
}else if(type === 2){
|
||||
ayscData2(query).then(res=>{
|
||||
loading.close();
|
||||
}).catch(err=>{});
|
||||
}else if(type === 3){
|
||||
ayscData3(query).then(res=>{
|
||||
loading.close();
|
||||
}).catch(err=>{});
|
||||
}else if(type === 4){
|
||||
ayscData4(query).then(res=>{
|
||||
loading.close();
|
||||
}).catch(err=>{});
|
||||
}else if(type === 5){
|
||||
ayscData5(query).then(res=>{
|
||||
loading.close();
|
||||
}).catch(err=>{});
|
||||
}else if(type === 6){
|
||||
ayscData6(query).then(res=>{
|
||||
loading.close();
|
||||
}).catch(err=>{});
|
||||
}else if(type === 7){
|
||||
ayscData7(query).then(res=>{
|
||||
loading.close();
|
||||
}).catch(err=>{});
|
||||
}else if(type === 8){
|
||||
ayscData8(query).then(res=>{
|
||||
loading.close();
|
||||
}).catch(err=>{});
|
||||
}
|
||||
},
|
||||
openData2() {
|
||||
if (this.dateRange && this.dateRange.length > 0) {
|
||||
this.queryParams.startDate = this.dateRange[0]
|
||||
this.queryParams.endDate = this.dateRange[1]
|
||||
|
|
|
|||
Loading…
Reference in New Issue