ysh 3 년 전
부모
커밋
01b6b252bc

+ 3 - 2
src/views/system/schedulingInformation/BdClockinMonthList.vue

@@ -41,7 +41,7 @@
           <a-col :md="6" :sm="8">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="syMonthReport" icon="reload" style="margin-left: 8px">同步至U8</a-button>
-
+              <a-button type="primary" icon="download" style="margin-left: 8px" @click="handleExportXls('考勤月报')">导出</a-button>
             </span>
           </a-col>
           <a-col :md="6" :sm="8">
@@ -120,7 +120,7 @@
             dataIndex: 'personName'
           },
           {
-            title: '号',
+            title: '号',
             align: 'center',
             dataIndex: 'personId'
           },
@@ -162,6 +162,7 @@
           }
         ],
         url: {
+          exportXlsUrl: '/viewClockIn/bdClockinMonth/exportXls',
           getCloseDate:'/viewClockIn/bdClockinMonth/getCloseDate',
           closeDateUrl:'/viewClockIn/bdClockinMonth/closeDate',
           list: '/viewClockIn/bdClockinMonth/list',

+ 32 - 8
src/views/system/schedulingInformation/ViewClockInList.vue

@@ -17,10 +17,14 @@
           </a-col>
           <a-col :md="6" :sm="8">
             <a-form-item label="部门">
+             <a-input @click="openModal" placeholder="请点击选择部门" v-model="departNames" readOnly >
+               <a-icon slot="prefix" type="cluster" title="部门选择控件"/>
+               <a-icon v-if="queryParam.departIds!=null&&queryParam.departIds!=''" slot="suffix" type="close-circle" @click="handleEmpty" title="清空"/>
+             </a-input>
               <!-- <a-input placeholder="请输入部门" v-model="queryParam.departNames"></a-input> -->
-              <j-tree-select v-model="queryParam.departIds" dict="sys_depart,depart_name,id"
+              <!-- <j-tree-select v-model="queryParam.departIds" dict="sys_depart,depart_name,id"
                 pid-field="parent_id" placeholder="请选择部门">
-              </j-tree-select>
+              </j-tree-select> -->
             </a-form-item>
           </a-col>
           
@@ -65,9 +69,10 @@
           <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" icon="download" style="margin-left: 8px" @click="handleExportXls('考勤日报')">导出</a-button>
               <!-- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> -->
-
             </span>
+            
           </a-col>
 
         </a-row>
@@ -84,7 +89,6 @@
               <a-button type="primary" @click="monthReport" icon="reload" style="margin-left: 8px">生成当月考勤月报</a-button>
             </span>
           </a-col>
-          
 
         </a-row>
       </a-form>
@@ -137,7 +141,7 @@
       </a-table>
     </div>
     <!-- table区域-end -->
-
+    <depart-window ref="departWindow" @ok="modalFormOks"></depart-window>
     <!-- 表单区域 -->
     <!-- <ViewClockIn-modal ref="modalForm" @ok="modalFormOk"></ViewClockIn-modal> -->
   </a-card>
@@ -160,16 +164,17 @@
   } from '@/api/api'
   import moment from 'moment';
   import 'moment/locale/zh-cn';
-
+  import departWindow from './../modules/DepartWindow'
   export default {
     name: 'ViewClockInList',
     mixins: [JeecgListMixin],
     components: {
-      JDictSelectTag
+      JDictSelectTag, departWindow
     },
     data() {
       return {
         moment,
+        departNames:'',
         shiftlist: null,
         description: '考勤日报',
         // 表头
@@ -336,7 +341,8 @@
         ],
         url: {
           list: '/viewClockIn/viewClockIn/list',
-          shift: "/shift/shift/lists"
+          shift: "/shift/shift/lists",
+          exportXlsUrl: '/viewClockIn/viewClockIn/exportXlsDay',
         },
       }
     },
@@ -349,6 +355,24 @@
         this.queryShift();
     },
     methods: {
+      modalFormOks(formData) {
+        if (formData.departIdList != null && formData.departIdList.length > 0) {
+          for (let i = 0; i < formData.departIdList.length; i++) {
+            this.queryParam.departIds=formData.departIdList[i].key;
+            this.departNames =formData.departIdList[i].title;
+            this.queryParam.departNames =formData.departIdList[i].title;
+           }
+        }
+      },
+      openModal(){
+        var ls=[];
+        ls.push(this.queryParam.orgCodeTxt);
+        this.$refs.departWindow.add(ls, '');
+      },
+      handleEmpty(){
+        this.queryParam.departIds=null;
+        this.departNames=null;
+      },
       onDateChange: function (value, dateString) {
         console.log(dateString[0],dateString[1]);
         this.queryParam.beginViewDate=dateString[0];

+ 15 - 1
src/views/system/schedulingInformation/ViewClockUserInfo.vue

@@ -48,7 +48,8 @@
            </a-menu-item>
          </a-menu>
        </a-dropdown>
-       
+       <a style="margin-left: 40px" @click="handleExportXlsBegin('员工考勤信息')">导出</a>
+       <i class="anticon anticon-info-circle ant-alert-icon"></i>
       </div>
 
       <a-table
@@ -341,6 +342,7 @@
             width: 120
           }],
         url: {
+          exportXlsUrl: '/viewClockIn/viewClockIn/exportXls',
           handleInfo: '/viewClockIn/viewClockIn/handleInfo',
           errorInfo: '/viewClockIn/viewClockIn/errorInfo',
           getJiaBan: '/workOvertime/workOvertime/getJiaBan',
@@ -360,6 +362,18 @@
     },
 
     methods: {
+        handleExportXlsBegin(name){
+          if(this.userName == '' || this.userName == null){
+            this.$message.warning("请选择要导出的人员姓名");
+            return;
+          }
+          if(this.headMonth == '' && this.newMonth == null){
+            this.$message.warning("请选择要导出的月份");
+            return;
+          }
+          this.queryParam.userType=this.userType;
+          this.handleExportXls(name);
+        },
         handleInfo(st){
           if(this.selectedRowKeys.length < 1){
             this.$message.warning("您没有选择任何数据");