ysh il y a 3 ans
Parent
commit
d4214bcfb6

+ 2 - 0
src/api/api.js

@@ -10,6 +10,7 @@ const queryall = (params)=>getAction("/sys/role/queryall",params);
 
 //考勤日报生成考勤月报
 const monthReport =  (params)=>putAction("/viewClockIn/viewClockIn/monthReport",params);
+const jiaozhun =  (params)=>putAction("/viewClockIn/viewClockIn/jiaozhun",params);
 
 //用户管理
 const addUser = (params)=>postAction("/sys/user/add",params);
@@ -122,6 +123,7 @@ export {
   getUserList,
   queryall,
   monthReport,
+  jiaozhun,
   frozenBatch,
   checkOnlyUser,
   changePassword,

+ 136 - 0
src/views/system/schedulingInformation/ReportOutDayList.vue

@@ -0,0 +1,136 @@
+<template>
+  <a-card :bordered="false">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+
+          <a-col :md="6" :sm="8">
+            <a-form-item label="加班人员">
+              <a-input placeholder="请输入加班人员" v-model="queryParam.name"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="审批编号">
+              <a-input placeholder="请输入审批编号" v-model="queryParam.name"></a-input>
+            </a-form-item>
+          </a-col>
+          
+          <a-col :md="6" :sm="8">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+
+   
+    <!-- table区域-begin -->
+    <div>
+      
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical"/>
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <!-- <BdScheduling-modal ref="modalForm" @ok="modalFormOk"></BdScheduling-modal> -->
+  </a-card>
+</template>
+
+<script>
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import JDictSelectTag from '@/components/dict/JDictSelectTag'
+
+  export default {
+    name: 'BdSchedulingList',
+    mixins: [JeecgListMixin],
+    components: {
+      JDictSelectTag
+    },
+    data() {
+      return {
+        description: '外勤打卡信息',
+        // 表头
+        columns: [
+          {
+            title: '行号',
+            dataIndex: '',
+            key: 'rowIndex',
+            width: 60,
+            align: 'center',
+            customRender: function (t, r, index) {
+              return parseInt(index) + 1
+            }
+          },
+          {
+            title: '人员',
+            align: 'center',
+            dataIndex: 'realname'
+          },
+          {
+            title: '日期',
+            align: 'center',
+            dataIndex: 'viewDate'
+          },
+          {
+            title: '最早打卡时间',
+            align: 'center',
+            dataIndex: 'maxDate'
+          },
+          {
+            title: '最晚打卡时间',
+            align: 'center',
+            dataIndex: 'minDate'
+          },
+          {
+            title: '打卡次数',
+            align: 'center',
+            dataIndex: 'attendanceCount'
+          }
+        ],
+        url: {
+          list: '/viewClockIn/reportOutDay/list'
+        },
+      }
+    },
+    computed: {
+      importExcelUrl: function () {
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 41 - 3
src/views/system/schedulingInformation/ViewClockInList.vue

@@ -11,6 +11,11 @@
               <a-input placeholder="请输入人员" v-model="queryParam.realname"></a-input>
             </a-form-item>
           </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="班次">
+              <a-input placeholder="请输入班次" v-model="queryParam.name"></a-input>
+            </a-form-item>
+          </a-col>
           <a-col :md="6" :sm="8">
             <a-form-item label="账号">
               <a-input placeholder="请输入账号" v-model="queryParam.username"></a-input>
@@ -44,6 +49,7 @@
               <a-button type="primary" @click="monthReport" icon="reload" style="margin-left: 8px">生成当月考勤月报</a-button>
             </span>
           </a-col>
+          
 
         </a-row>
       </a-form>
@@ -62,6 +68,10 @@
           <a-tag color="#87d068" v-if="record.latetimeX <= 0 && record.latetimeS <= 0 ">正常</a-tag>
         </span>
 
+      <span slot="action" slot-scope="text, record">
+          <a @click="jiaozhun(record)">校准</a>
+          
+        </span>
       </a-table>
     </div>
     <!-- table区域-end -->
@@ -77,7 +87,7 @@
   } from '@/mixins/JeecgListMixin'
   import JDictSelectTag from '@/components/dict/JDictSelectTag'
   import {
-    monthReport
+    monthReport,jiaozhun
   } from '@/api/api'
   import moment from 'moment';
   import 'moment/locale/zh-cn';
@@ -149,7 +159,7 @@
               customRender: 'latetimeState'
             }
           },
-          {
+          /* {
             title: '迟到分钟',
             align: 'center',
             dataIndex: 'latetimeS',
@@ -172,7 +182,7 @@
                 return 0;
               }
             }
-          },
+          }, */
           {
             title: '上班打卡',
             align: 'center',
@@ -217,6 +227,12 @@
             title: '请假类型',
             align: 'center',
             dataIndex: 'holidayType'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align: 'center',
+            scopedSlots: { customRender: 'action' },
           }
         ],
         url: {
@@ -233,6 +249,28 @@
       onChange(date, dateString) {
             console.log(date, dateString);
             // this.value = "2021-01-01"
+      },
+      jiaozhun(record) {
+        // alert(record.viewDate);
+        // alert(record.username);
+        let that = this;
+        this.$confirm({
+                title: '校准后原打卡时间将失效',
+                content: '上班打卡时间:'+record.shiftTimeS+'; 下班打卡时间:'+record.shiftTimeX,
+                onOk: function () {
+                  jiaozhun({shiftTimeS:record.shiftTimeS,shiftTimeX:record.shiftTimeX,viewDate:record.viewDate,username:record.username}).then((res) => {
+                    if (res == 'true') {
+                      that.$message.success("已成功校准");
+                      that.loadData();
+                    } else {
+                      that.$message.warning(res);
+                    }
+                  });
+                },
+                onCancel() {},
+              });
+        
+        
       },
       monthReport() {
         let sqp1 = this.getQueryParams();