瀏覽代碼

考勤管理

jingbb 1 年之前
父節點
當前提交
4275939762

+ 22 - 3
src/views/oa/salary_management/Attendance/attendanceManagement.vue

@@ -67,6 +67,9 @@
   
       <!-- 表单区域 -->
       <AttendancelDetail ref="AttendancelDetail"></AttendancelDetail>
+      <OvertimeDetail ref="OvertimeDetail"></OvertimeDetail>
+      <AnnualLeave ref="AnnualLeave"></AnnualLeave>
+      <uploadModal ref="uploadModal"></uploadModal>
     </a-card>
   </template>
   
@@ -76,11 +79,17 @@
     import { getAction } from '@/api/manage'
     import moment from 'moment'
     import AttendancelDetail from './modules/AttendancelDetail.vue'
+    import OvertimeDetail from './modules/OvertimeDetail.vue'
+    import AnnualLeave from './modules/AnnualLeave.vue'
+    import uploadModal from './modules/uploadModal.vue'
     export default {
       name: "attendanceManagement",
       mixins: [JeecgListMixin],
       components: {
-        AttendancelDetail
+        AttendancelDetail,
+        AnnualLeave,
+        OvertimeDetail,
+        uploadModal
       },
       data () {
         return {
@@ -107,7 +116,7 @@
             {
               title: '类型',
               align:"center",
-              dataIndex: 'yearMonth', 
+              dataIndex: 'type', 
             },
             {
               title: '名称   ',
@@ -162,10 +171,20 @@
           })
         },
         UploadAttendanceSheet(){
-
+          this.$refs.uploadModal.visible = true
         },
         handleDetail(record){
+          if(record.type=='考勤表'){
             this.$refs.AttendancelDetail.visible = true
+            this.$refs.AttendancelDetail.getTableList(record.id)         
+          }else if(record.type=='加班表'){
+            this.$refs.OvertimeDetail.visible = true
+            this.$refs.OvertimeDetail.getTableList(record.id)       
+          }else if(record.type=='年休表'){
+            this.$refs.AnnualLeave.visible = true
+            this.$refs.AnnualLeave.getTableList(record.id)       
+          }
+            
         },
         handleDownload(record){
 

+ 293 - 0
src/views/oa/salary_management/Attendance/modules/AnnualLeave.vue

@@ -0,0 +1,293 @@
+<template>
+    <div class="reply" ref = "replyModal">
+      <a-modal
+        title="年休明细"
+        width="85%"
+        :visible="visible"
+        :confirmLoading="loading"
+        :getContainer ='()=>$refs.replyModal'
+        @cancel="handleCancel"
+        destroyOnClose
+       >
+            <template #footer>
+                <a-button  @click="handleCancel" style="margin-left: 8px;">取消</a-button>
+            </template>
+            <div class="table-page-search-wrapper">
+                <a-form-model layout="inline" ref="form" :model="formState" >
+                    <a-row :gutter="24">
+                        <a-col :md="6" :sm="8">
+                            <a-form-model-item label="组织"  prop="name">
+                                <a-input  v-model="formState.orgName" />
+                            </a-form-model-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-model-item label="考勤时间"  prop="totalNum">
+                                <a-input placeholder="" v-model="formState.DateTime" />
+                            </a-form-model-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-model-item label="版本" >
+                                <a-input placeholder="请输入" v-model="formState.version"  />
+                            </a-form-model-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-model-item label="姓名"  >
+                                <a-input placeholder="请输入" v-model="formState.name" />
+                            </a-form-model-item>
+                        </a-col>
+                    </a-row>
+                    <a-row :gutter="24">
+                        <a-col :md="18" :sm="8"> 
+                            <a-form-model-item label="备注" >
+                                <a-input  placeholder="请输入" v-model="formState.remarks" />
+                            </a-form-model-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-model-item label=""  >
+                                <a-button type="primary" icon="search" @click="searchSonList">查询</a-button>
+                            </a-form-model-item>
+                        </a-col>
+                    </a-row>
+                </a-form-model>
+                <a-table
+                    bordered
+                    :columns="columns"
+                    :data-source="dataSource"
+                    :loading="loading"
+                    :scroll="{x: 3500 ,y:300}"
+                    :pagination="false"
+                >
+                </a-table>
+            </div>
+      </a-modal>
+    </div>
+</template>
+<script>
+    
+      import moment from 'moment'
+      import pick from 'lodash.pick'
+      import { FormTypes } from '@/utils/JEditableTableUtil'
+      import { putAction,getAction } from '@/api/manage'
+      export default {
+        name: 'AnnualLeave',
+        components: {
+            moment,
+        },
+        data() {
+          return {
+              formState:{},
+              dataSource: [{}],
+              visible:false,
+              loading:false,
+              columns: [
+                {
+                    title: '编号',
+                    align: "center",
+                    dataIndex: 'code',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '姓名',
+                    align: "center",
+                    dataIndex: 'name',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '组织',
+                    align: "center",
+                    dataIndex: 'orgName',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '工资卡号',
+                    align: "center",
+                    dataIndex: 'cardNo',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '单双休',
+                    align: "center",
+                    dataIndex: 'restMode',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '工时/天',
+                    align: "center",
+                    dataIndex: 'workingHours',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '出勤天数',
+                    align: "center",
+                    dataIndex: 'attendanceDays',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '话费补贴',
+                    align: "center",
+                    dataIndex: 'phoneBill',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '午餐补贴',
+                    align: "center",
+                    dataIndex: 'lunch',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '住房补贴',
+                    align: "center",
+                    dataIndex: 'housingSubsidies',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '交通补贴',
+                    align: "center",
+                    dataIndex: 'transportation',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '全勤奖',
+                    align: "center",
+                    dataIndex: 'fullAttendance',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '养老保险',
+                    align: "center",
+                    dataIndex: 'endowmentInsurance',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '失业保险',
+                    align: "center",
+                    dataIndex: 'unemploymentInsurance',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '医疗保险',
+                    align: "center",
+                    dataIndex: 'medicalInsurance',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '公积金',
+                    align: "center",
+                    dataIndex: 'accumulationFund',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '工资抵扣',
+                    align: "center",
+                    dataIndex: 'deduction',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '迟到次数',
+                    align: "center",
+                    dataIndex: 'latenessTimes',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '迟到扣费',
+                    align: "center",
+                    dataIndex: 'latenessCost',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '事假时间',
+                    align: "center",
+                    dataIndex: 'personalLeave',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '病假时间',
+                    align: "center",
+                    dataIndex: 'sickLeave',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '婚假时间',
+                    align: "center",
+                    dataIndex: 'marriageLeave',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '丧假时间',
+                    align: "center",
+                    dataIndex: 'funeralLeave',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '年假时间',
+                    align: "center",
+                    dataIndex: 'yearLeave',
+                    ellipsis: true,
+                    width:'4%'
+                },
+             ]
+          }
+        },
+        created(){
+        },
+        watch: {
+        },
+        methods: {
+            handleCancel(){
+                this.visible = false
+            },
+            getTableList(id){
+                getAction('/salary/salaryAttendance/querySalaryAttendanceDetailByMainId',{id:id}).then(res=>{
+                    if(res.success){
+                        this.dataSource =res.result
+                    }else{
+                        this.$message.error(res.message);
+                    }
+                })
+            },
+            searchSonList(){
+
+            }
+        }
+    }
+    </script>
+    
+    <style scoped lang="less">
+    /deep/ .nresume .ant-input{
+      height: 100px !important;
+    }
+
+    /deep/ .ant-select{
+      width: 100%;
+    }
+    .form-table-heard:before {
+          content: '*';
+          color: red;
+    }
+    /deep/ .ant-calendar-picker{
+      width: 113px !important;
+    }
+    </style>

+ 25 - 8
src/views/oa/salary_management/Attendance/modules/AttendancelDetail.vue

@@ -17,29 +17,34 @@
                     <a-row :gutter="24">
                         <a-col :md="6" :sm="8">
                             <a-form-model-item label="组织"  prop="name">
-                                <a-input  v-model="formState.orgName" disabled/>
+                                <a-input  v-model="formState.orgName" />
                             </a-form-model-item>
                         </a-col>
                         <a-col :md="6" :sm="8">
                             <a-form-model-item label="考勤时间"  prop="totalNum">
-                                <a-input placeholder="" v-model="formState.DateTime" disabled/>
+                                <a-input placeholder="" v-model="formState.DateTime" />
                             </a-form-model-item>
                         </a-col>
                         <a-col :md="6" :sm="8">
                             <a-form-model-item label="版本" >
-                                <a-input placeholder="请输入" v-model="formState.version" disabled />
+                                <a-input placeholder="请输入" v-model="formState.version"  />
                             </a-form-model-item>
                         </a-col>
                         <a-col :md="6" :sm="8">
                             <a-form-model-item label="姓名"  >
-                                <a-input placeholder="请输入" v-model="formState.name" disabled/>
+                                <a-input placeholder="请输入" v-model="formState.name" />
                             </a-form-model-item>
                         </a-col>
                     </a-row>
                     <a-row :gutter="24">
-                        <a-col :md="24" :sm="8"> 
-                            <a-form-model-item label="备注"  class="nresume" style="height:100px !important">
-                                <a-input type="textarea" placeholder="请输入" v-model="formState.remarks" disabled/>
+                        <a-col :md="18" :sm="8"> 
+                            <a-form-model-item label="备注" >
+                                <a-input  placeholder="请输入" v-model="formState.remarks" />
+                            </a-form-model-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-model-item label=""  >
+                                <a-button type="primary" icon="search" @click="searchSonList">查询</a-button>
                             </a-form-model-item>
                         </a-col>
                     </a-row>
@@ -64,7 +69,7 @@
       import { FormTypes } from '@/utils/JEditableTableUtil'
       import { putAction,getAction } from '@/api/manage'
       export default {
-        name: 'PayrollDetail',
+        name: 'AttendancelDetail',
         components: {
             moment,
         },
@@ -253,6 +258,18 @@
         methods: {
             handleCancel(){
                 this.visible = false
+            },
+            getTableList(id){
+                getAction('/salary/salaryAttendance/querySalaryAttendanceDetailByMainId',{id:id}).then(res=>{
+                    if(res.success){
+                        this.dataSource =res.result
+                    }else{
+                        this.$message.error(res.message);
+                    }
+                })
+            },
+            searchSonList(){
+
             }
         }
     }

+ 293 - 0
src/views/oa/salary_management/Attendance/modules/OvertimeDetail.vue

@@ -0,0 +1,293 @@
+<template>
+    <div class="reply" ref = "replyModal">
+      <a-modal
+        title="加班明细"
+        width="85%"
+        :visible="visible"
+        :confirmLoading="loading"
+        :getContainer ='()=>$refs.replyModal'
+        @cancel="handleCancel"
+        destroyOnClose
+       >
+            <template #footer>
+                <a-button  @click="handleCancel" style="margin-left: 8px;">取消</a-button>
+            </template>
+            <div class="table-page-search-wrapper">
+                <a-form-model layout="inline" ref="form" :model="formState" >
+                    <a-row :gutter="24">
+                        <a-col :md="6" :sm="8">
+                            <a-form-model-item label="组织"  prop="name">
+                                <a-input  v-model="formState.orgName" />
+                            </a-form-model-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-model-item label="考勤时间"  prop="totalNum">
+                                <a-input placeholder="" v-model="formState.DateTime" />
+                            </a-form-model-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-model-item label="版本" >
+                                <a-input placeholder="请输入" v-model="formState.version"  />
+                            </a-form-model-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-model-item label="姓名"  >
+                                <a-input placeholder="请输入" v-model="formState.name" />
+                            </a-form-model-item>
+                        </a-col>
+                    </a-row>
+                    <a-row :gutter="24">
+                        <a-col :md="18" :sm="8"> 
+                            <a-form-model-item label="备注" >
+                                <a-input  placeholder="请输入" v-model="formState.remarks" />
+                            </a-form-model-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-model-item label=""  >
+                                <a-button type="primary" icon="search" @click="searchSonList">查询</a-button>
+                            </a-form-model-item>
+                        </a-col>
+                    </a-row>
+                </a-form-model>
+                <a-table
+                    bordered
+                    :columns="columns"
+                    :data-source="dataSource"
+                    :loading="loading"
+                    :scroll="{x: 3500 ,y:300}"
+                    :pagination="false"
+                >
+                </a-table>
+            </div>
+      </a-modal>
+    </div>
+</template>
+<script>
+    
+      import moment from 'moment'
+      import pick from 'lodash.pick'
+      import { FormTypes } from '@/utils/JEditableTableUtil'
+      import { putAction,getAction } from '@/api/manage'
+      export default {
+        name: 'OvertimeDetail',
+        components: {
+            moment,
+        },
+        data() {
+          return {
+              formState:{},
+              dataSource: [{}],
+              visible:false,
+              loading:false,
+              columns: [
+                {
+                    title: '编号',
+                    align: "center",
+                    dataIndex: 'code',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '姓名',
+                    align: "center",
+                    dataIndex: 'name',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '组织',
+                    align: "center",
+                    dataIndex: 'orgName',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '工资卡号',
+                    align: "center",
+                    dataIndex: 'cardNo',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '单双休',
+                    align: "center",
+                    dataIndex: 'restMode',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '工时/天',
+                    align: "center",
+                    dataIndex: 'workingHours',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '出勤天数',
+                    align: "center",
+                    dataIndex: 'attendanceDays',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '话费补贴',
+                    align: "center",
+                    dataIndex: 'phoneBill',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '午餐补贴',
+                    align: "center",
+                    dataIndex: 'lunch',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '住房补贴',
+                    align: "center",
+                    dataIndex: 'housingSubsidies',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '交通补贴',
+                    align: "center",
+                    dataIndex: 'transportation',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '全勤奖',
+                    align: "center",
+                    dataIndex: 'fullAttendance',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '养老保险',
+                    align: "center",
+                    dataIndex: 'endowmentInsurance',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '失业保险',
+                    align: "center",
+                    dataIndex: 'unemploymentInsurance',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '医疗保险',
+                    align: "center",
+                    dataIndex: 'medicalInsurance',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '公积金',
+                    align: "center",
+                    dataIndex: 'accumulationFund',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '工资抵扣',
+                    align: "center",
+                    dataIndex: 'deduction',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '迟到次数',
+                    align: "center",
+                    dataIndex: 'latenessTimes',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '迟到扣费',
+                    align: "center",
+                    dataIndex: 'latenessCost',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '事假时间',
+                    align: "center",
+                    dataIndex: 'personalLeave',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '病假时间',
+                    align: "center",
+                    dataIndex: 'sickLeave',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '婚假时间',
+                    align: "center",
+                    dataIndex: 'marriageLeave',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '丧假时间',
+                    align: "center",
+                    dataIndex: 'funeralLeave',
+                    ellipsis: true,
+                    width:'4%'
+                },
+                {
+                    title: '年假时间',
+                    align: "center",
+                    dataIndex: 'yearLeave',
+                    ellipsis: true,
+                    width:'4%'
+                },
+             ]
+          }
+        },
+        created(){
+        },
+        watch: {
+        },
+        methods: {
+            handleCancel(){
+                this.visible = false
+            },
+            getTableList(id){
+                getAction('/salary/salaryAttendance/querySalaryAttendanceDetailByMainId',{id:id}).then(res=>{
+                    if(res.success){
+                        this.dataSource =res.result
+                    }else{
+                        this.$message.error(res.message);
+                    }
+                })
+            },
+            searchSonList(){
+
+            }
+        }
+    }
+    </script>
+    
+    <style scoped lang="less">
+    /deep/ .nresume .ant-input{
+      height: 100px !important;
+    }
+
+    /deep/ .ant-select{
+      width: 100%;
+    }
+    .form-table-heard:before {
+          content: '*';
+          color: red;
+    }
+    /deep/ .ant-calendar-picker{
+      width: 113px !important;
+    }
+    </style>

+ 109 - 0
src/views/oa/salary_management/Attendance/modules/uploadModal.vue

@@ -0,0 +1,109 @@
+<template>
+    <div class="reply" ref = "replyModal">
+      <a-modal
+        title="上传考勤表"
+        width="25%"
+        :visible="visible"
+        :confirmLoading="loading"
+        :getContainer ='()=>$refs.replyModal'
+        @cancel="handleCancel"
+        destroyOnClose
+       >
+            <template #footer>
+                <a-button  @click="handleCancel" style="margin-left: 8px;">取消</a-button>
+                <a-button  @click="handleOk" type="primary" style="margin-left: 8px;">确认</a-button>
+            </template>
+            <div class="table-page-search-wrapper">
+                <a-form-model layout="inline" ref="form" :model="formState" >
+                    <a-row :gutter="24">
+                        <a-col :md="24" >
+                            <a-form-model-item label="年月"  prop="name">
+                                <a-month-picker placeholder="请选择" v-model="formState.yearMonth" @change="onChange" style="width:100% !important"/>
+                            </a-form-model-item>
+                        </a-col>
+                        <a-col :md="24">
+                            <a-form-model-item label="类型"  prop="totalNum">
+                                <a-select  v-model="formState.type">
+                                    <a-select-option value="考勤表">考勤表</a-select-option>
+                                    <a-select-option value="加班表">加班表</a-select-option>
+                                    <a-select-option value="年休表">年休表</a-select-option>
+                                </a-select>
+                            </a-form-model-item>
+                        </a-col>
+                        <a-col :md="24">
+                            <a-form-model-item label="文件" >
+                                <a-upload name="file" :multiple="false"  action="https://www.mocky.io/v2/5cc8019d300000980a055e76"  :headers="headers"   @change="handleChange" >
+                                    <a-button> <a-icon type="upload" /> 上  传 </a-button>
+                                </a-upload>
+                            </a-form-model-item>
+                        </a-col>
+                    </a-row>
+                </a-form-model>
+            </div>
+      </a-modal>
+    </div>
+</template>
+<script>
+    
+      import moment from 'moment'
+      import pick from 'lodash.pick'
+      import { FormTypes } from '@/utils/JEditableTableUtil'
+      import { putAction,getAction } from '@/api/manage'
+      export default {
+        name: 'uploadModal',
+        components: {
+            moment,
+        },
+        data() {
+          return {
+              formState:{},
+              dataSource: [{}],
+              visible:false,
+              loading:false,
+              headers: {
+                authorization: 'authorization-text',
+             },
+            
+          }
+        },
+        created(){
+        },
+        watch: {
+        },
+        methods: {
+            handleCancel(){
+                this.visible = false
+            },
+            handleOk(){
+
+            },
+            onChange(data){
+                console.log(this.formState.yearMonth);
+                debugger
+            },
+            handleChange(){
+
+            }
+        }
+    }
+    </script>
+    
+    <style scoped lang="less">
+    /deep/ .nresume .ant-input{
+      height: 100px !important;
+    }
+
+    /deep/ .ant-select{
+      width: 100%;
+    }
+    .form-table-heard:before {
+          content: '*';
+          color: red;
+    }
+    /deep/ .ant-calendar-picker{
+      width: 113px !important;
+    }
+    /deep/.ant-modal-root>.ant-modal-wrap>.ant-modal {
+      min-width: 0 !important;
+    }
+    </style>