EDZ 3 éve
szülő
commit
3e1d2b3462

+ 4 - 0
src/api/api.js

@@ -8,6 +8,9 @@ const editRole = (params)=>putAction("/sys/role/edit",params);
 const checkRoleCode = (params)=>getAction("/sys/role/checkRoleCode",params);
 const queryall = (params)=>getAction("/sys/role/queryall",params);
 
+//考勤日报生成考勤月报
+const monthReport =  (params)=>putAction("/viewClockIn/viewClockIn/monthReport",params);
+
 //用户管理
 const addUser = (params)=>postAction("/sys/user/add",params);
 const editUser = (params)=>putAction("/sys/user/edit",params);
@@ -118,6 +121,7 @@ export {
   queryUserRole,
   getUserList,
   queryall,
+  monthReport,
   frozenBatch,
   checkOnlyUser,
   changePassword,

+ 3 - 3
src/components/layouts/UserLayout.vue

@@ -21,9 +21,9 @@
           <a href="https://github.com/zhangdaiscott/jeecg-boot" target="_blank">隐私</a>
           <a href="https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE" target="_blank">条款</a> -->
         </div>
-        <div class="copyright">
-          Copyright &copy; 2021 <a href="" target="_blank">萃颠</a> 出品
-        </div>
+        <!-- <div class="copyright"> -->
+          <!-- Copyright &copy; 2021 <a href="" target="_blank">萃颠</a> 出品 -->
+        <!-- </div> -->
       </div>
     </div>
   </div>

+ 2 - 2
src/components/tools/UserMenu.vue

@@ -26,11 +26,11 @@
     <!-- update-end author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 -->
     <!-- update-end author:sunjianlei date:20191220 for: 解决全局样式冲突的问题 -->
     <!-- update_end  author:zhaoxin date:20191129 for: 做头部菜单栏导航 -->
-    <span class="action">
+   <!-- <span class="action">
       <a class="logout_title" target="_blank" href="http://doc.jeecg.com">
         <a-icon type="question-circle-o"></a-icon>
       </a>
-    </span>
+    </span> -->
     <header-notice class="action"/>
     <a-dropdown>
       <span class="action action-full ant-dropdown-link user-dropdown-menu">

+ 9 - 4
src/views/system/modules/UserModal.vue

@@ -164,9 +164,14 @@
           <a-input placeholder="请输入紧急联系人电话" v-decorator="[ 'urgentPhone', validatorRules.urgentPhone]" />
         </a-form-item>
 
-        <a-form-item label="工作流引擎" :labelCol="labelCol" :wrapperCol="wrapperCol">
+       <!-- <a-form-item label="工作流引擎" :labelCol="labelCol" :wrapperCol="wrapperCol">
           <j-dict-select-tag  v-decorator="['activitiSync', {}]" placeholder="请选择是否同步工作流引擎" :type="'radio'" :triggerChange="true" dictCode="activiti_sync"/>
+        </a-form-item> -->
+        
+        <a-form-item label="同步信息" :labelCol="labelCol" :wrapperCol="wrapperCol">
+          <j-dict-select-tag  v-decorator="['infoSy', {}]" placeholder="请选择同步" :type="'radio'" :triggerChange="true" dictCode="info_sy"/>
         </a-form-item>
+        
 
       </a-form>
     </a-spin>
@@ -230,8 +235,8 @@
           password:{
             rules: [{
               required: true,
-              pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
-              message: '密码由8位数字、大小写字母和特殊符号组成!'
+              // pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
+              message: '请输入密码'//'密码由8位数字、大小写字母和特殊符号组成!'
             }, {
               validator: this.validateToNextPassword,
             }],
@@ -380,7 +385,7 @@
         that.visible = true;
         that.model = Object.assign({}, record);
         that.$nextTick(() => {
-          that.form.setFieldsValue(pick(this.model,'username','sex','realname','email','phone','activitiSync','workNo','telephone','post','egName','urgentName','urgentPhone'))
+          that.form.setFieldsValue(pick(this.model,'username','sex','realname','email','phone','activitiSync','workNo','telephone','post','egName','urgentName','urgentPhone','infoSy'))
         });
         //身份为上级显示负责部门,否则不显示
         if(this.model.userIdentity=="2"){

+ 188 - 0
src/views/system/schedulingInformation/BdClockinMonthList.vue

@@ -0,0 +1,188 @@
+<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.personName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="账号">
+              <a-input placeholder="请输入账号" v-model="queryParam.personId"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="日期">
+              <a-month-picker valueFormat="YYYY-MM"  @change="onChange" placeholder="请输入日期" v-model="queryParam.monthTime"></a-month-picker>
+            </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-row :gutter="24">
+          <a-col :md="6" :sm="8">
+            <a-form-item label="生成月报日期">
+              <a-month-picker format="YYYY-MM" placeholder="请输入生成月报日期" v-model="queryParam.nowDate" />
+            </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="monthReport" icon="reload" style="margin-left: 8px">生成当月考勤月报</a-button>
+            </span>
+          </a-col>
+        </a-row> -->
+      </a-form>
+    </div>
+
+
+    <!-- table区域-begin -->
+    <div>
+
+      <a-table class="j-table-force-nowrap" ref="table" size="middle" bordered rowKey="id" :columns="columns"
+        :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        @change="handleTableChange">
+
+        <span slot="latetimeState" slot-scope="text, record, index">
+          <a-tag color="pink" v-if="record.latetimeX > 0 || record.latetimeS > 0 ">异常</a-tag>
+          <a-tag color="#87d068" v-if="record.latetimeX <= 0 && record.latetimeS <= 0 ">正常</a-tag>
+        </span>
+
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <!-- <ViewClockIn-modal ref="modalForm" @ok="modalFormOk"></ViewClockIn-modal> -->
+  </a-card>
+</template>
+
+<script>
+  import {
+    JeecgListMixin
+  } from '@/mixins/JeecgListMixin'
+  import JDictSelectTag from '@/components/dict/JDictSelectTag'
+  import {
+    monthReport
+  } from '@/api/api'
+  import moment from 'moment';
+  import 'moment/locale/zh-cn';
+
+  export default {
+    name: 'ViewClockInList',
+    mixins: [JeecgListMixin],
+    components: {
+      JDictSelectTag
+    },
+    data() {
+      return {
+        moment,
+        description: '考勤月报',
+        // 表头
+        columns: [{
+            title: '行号',
+            dataIndex: '',
+            key: 'rowIndex',
+            width: 60,
+            align: 'center',
+            customRender: function(t, r, index) {
+              return parseInt(index) + 1
+            }
+          },
+          {
+            title: '日期',
+            align: 'center',
+            dataIndex: 'monthTime'
+          },
+          {
+            title: '人员姓名',
+            align: 'center',
+            dataIndex: 'personName'
+          },
+          {
+            title: '账号',
+            align: 'center',
+            dataIndex: 'personId'
+          },
+          {
+            title: '本月迟到分钟数',
+            align: 'center',
+            dataIndex: 'latetimeS'
+          },
+          {
+            title: '本月早退分钟数',
+            align: 'center',
+            dataIndex: 'latetimeX'
+          },
+          {
+            title: '本月加班时长',
+            align: 'center',
+            dataIndex: 'duration'
+          },
+          {
+            title: '本月请假时长',
+            align: 'center',
+            dataIndex: 'holidayTime'
+          }
+        ],
+        url: {
+          list: '/viewClockIn/bdClockinMonth/list'
+        },
+      }
+    },
+    computed: {
+      importExcelUrl: function() {
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+      }
+    },
+    methods: {
+      onChange(date, dateString) {
+            console.log(date, dateString);
+            // this.value = "2021-01-01"
+      },
+      monthReport() {
+        let sqp1 = this.getQueryParams();
+        if(sqp1['nowDate'] == 'undefined' || sqp1['nowDate'] == null || sqp1['nowDate'] == ''){
+          this.$message.warning('请选择生成月报日期!');
+          return false;
+        }
+        let nowDate = moment(sqp1['nowDate']).format('YYYY-MM');
+        let that = this;
+        that.$confirm({
+           title: "确认操作",
+           content: "是否生成" + nowDate + "月报?",
+           onOk: function () {
+             monthReport({nowDate:nowDate}).then((res) => {
+               if (res) {
+                 that.$message.success("已成功生成"+nowDate+"考勤月报");
+                 that.loadData();
+               } else {
+                 that.$message.warning(res);
+               }
+             });
+           }
+        });
+       
+       
+       
+       
+
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 2 - 2
src/views/system/schedulingInformation/BdWorkOverTimeList.vue

@@ -65,7 +65,7 @@
     <!-- table区域-end -->
 
     <!-- 表单区域 -->
-    <BdScheduling-modal ref="modalForm" @ok="modalFormOk"></BdScheduling-modal>
+    <!-- <BdScheduling-modal ref="modalForm" @ok="modalFormOk"></BdScheduling-modal> -->
   </a-card>
 </template>
 
@@ -81,7 +81,7 @@
     },
     data() {
       return {
-        description: '班信息',
+        description: '班信息',
         // 表头
         columns: [
           {

+ 270 - 0
src/views/system/schedulingInformation/ViewClockInList.vue

@@ -0,0 +1,270 @@
+<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.realname"></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>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="日期">
+              <a-date-picker valueFormat="YYYY-MM-DD"  @change="onChange" placeholder="请输入日期" v-model="queryParam.viewDate"></a-date-picker>
+            </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-row :gutter="24">
+          <a-col :md="6" :sm="8">
+            <a-form-item label="生成月报日期">
+              <a-month-picker format="YYYY-MM" placeholder="请输入生成月报日期" v-model="queryParam.nowDate" />
+              <!-- <a-input placeholder="请输入生成月报日期" v-model="queryParam.nowDate"></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="monthReport" icon="reload" style="margin-left: 8px">生成当月考勤月报</a-button>
+            </span>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+
+
+    <!-- table区域-begin -->
+    <div>
+
+      <a-table class="j-table-force-nowrap" ref="table" size="middle" bordered rowKey="id" :columns="columns"
+        :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+        @change="handleTableChange">
+
+        <span slot="latetimeState" slot-scope="text, record, index">
+          <a-tag color="pink" v-if="record.latetimeX > 0 || record.latetimeS > 0 ">异常</a-tag>
+          <a-tag color="#87d068" v-if="record.latetimeX <= 0 && record.latetimeS <= 0 ">正常</a-tag>
+        </span>
+
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <!-- <ViewClockIn-modal ref="modalForm" @ok="modalFormOk"></ViewClockIn-modal> -->
+  </a-card>
+</template>
+
+<script>
+  import {
+    JeecgListMixin
+  } from '@/mixins/JeecgListMixin'
+  import JDictSelectTag from '@/components/dict/JDictSelectTag'
+  import {
+    monthReport
+  } from '@/api/api'
+  import moment from 'moment';
+  import 'moment/locale/zh-cn';
+
+  export default {
+    name: 'ViewClockInList',
+    mixins: [JeecgListMixin],
+    components: {
+      JDictSelectTag
+    },
+    data() {
+      return {
+        moment,
+        description: '考勤日报',
+        // 表头
+        columns: [{
+            title: '行号',
+            dataIndex: '',
+            key: 'rowIndex',
+            width: 60,
+            align: 'center',
+            customRender: function(t, r, index) {
+              return parseInt(index) + 1
+            }
+          },
+          {
+            title: '日期',
+            align: 'center',
+            dataIndex: 'viewDate'
+          },
+          {
+            title: '人员',
+            align: 'center',
+            dataIndex: 'realname'
+          },
+          {
+            title: '账号',
+            align: 'center',
+            dataIndex: 'username'
+          },
+          {
+            title: '班次',
+            align: 'center',
+            dataIndex: 'name'
+          },
+          {
+            title: '上班时间',
+            align: 'center',
+            dataIndex: 'shiftTimeS'
+          },
+          {
+            title: '下班时间',
+            align: 'center',
+            dataIndex: 'shiftTimeX'
+          },
+          {
+            title: '上班打卡时间',
+            align: 'center',
+            dataIndex: 'gotoTime'
+          },
+          {
+            title: '下班打卡时间',
+            align: 'center',
+            dataIndex: 'closingTime'
+          }, {
+            title: '考勤状态',
+            align: 'center',
+            scopedSlots: {
+              customRender: 'latetimeState'
+            }
+          },
+          {
+            title: '迟到分钟',
+            align: 'center',
+            dataIndex: 'latetimeS',
+            customRender: function(t, r, index) {
+              if (t > 0) {
+                return t;
+              } else {
+                return 0;
+              }
+            }
+          },
+          {
+            title: '早退分钟',
+            align: 'center',
+            dataIndex: 'latetimeX',
+            customRender: function(t, r, index) {
+              if (t > 0) {
+                return t;
+              } else {
+                return 0;
+              }
+            }
+          },
+          {
+            title: '上班打卡',
+            align: 'center',
+            dataIndex: 'gotoState'
+          },
+          {
+            title: '下班打卡',
+            align: 'center',
+            dataIndex: 'closingState'
+          },
+          {
+            title: '加班开始时间',
+            align: 'center',
+            dataIndex: 'durationBeginDate'
+          },
+          {
+            title: '加班结束时间',
+            align: 'center',
+            dataIndex: 'durationEndDate'
+          },
+          {
+            title: '加班事由',
+            align: 'center',
+            dataIndex: 'demo'
+          },
+          {
+            title: '加班时长',
+            align: 'center',
+            dataIndex: 'duration'
+          },
+          {
+            title: '请假开始时间',
+            align: 'center',
+            dataIndex: 'holidayStartDate'
+          },
+          {
+            title: '请假结束时间',
+            align: 'center',
+            dataIndex: 'holidayEndDate'
+          },
+          {
+            title: '请假类型',
+            align: 'center',
+            dataIndex: 'holidayType'
+          }
+        ],
+        url: {
+          list: '/viewClockIn/viewClockIn/list'
+        },
+      }
+    },
+    computed: {
+      importExcelUrl: function() {
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+      }
+    },
+    methods: {
+      onChange(date, dateString) {
+            console.log(date, dateString);
+            // this.value = "2021-01-01"
+      },
+      monthReport() {
+        let sqp1 = this.getQueryParams();
+        if(sqp1['nowDate'] == 'undefined' || sqp1['nowDate'] == null || sqp1['nowDate'] == ''){
+          this.$message.warning('请选择生成月报日期!');
+          return false;
+        }
+        let nowDate = moment(sqp1['nowDate']).format('YYYY-MM');
+        let that = this;
+        that.$confirm({
+           title: "确认操作",
+           content: "是否生成" + nowDate + "月报?",
+           onOk: function () {
+             monthReport({nowDate:nowDate}).then((res) => {
+               if (res == 'true') {
+                 that.$message.success("已成功生成"+nowDate+"考勤月报");
+                 that.loadData();
+               } else {
+                 that.$message.warning(res);
+               }
+             });
+           }
+        });
+       
+       
+       
+       
+
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>