Browse Source

项目报告审核筛选条件增加选择人员

Lijy 3 years ago
parent
commit
c152eb0046

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/config/index.js

@@ -4,8 +4,8 @@ var path = require('path')
 // var ip = '192.168.2.36'
 
  
-var ip = '47.100.37.243' 
-// var ip = '192.168.2.136'
+// var ip = '47.100.37.243' 
+var ip = '192.168.2.159'
 
 // var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
 

+ 57 - 6
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue

@@ -14,15 +14,29 @@
                         <el-option v-for="item in projectList" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
                     </el-select>
                 </el-form-item>
-                <el-form-item label="日期:" style="margin-left:20px;">
-                    <el-date-picker v-model="search.date" :editable="false" format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
-                    @change="getList()" :clearable="true" type="date" placeholder="选择工作日期"></el-date-picker>
-                </el-form-item>
                 <el-form-item   style="margin-left:20px;">
                     <el-button @click="batchApprove(true)" style="margin-left:10px;" :loading="batchApproveLoading" :disabled="multipleSelection.length==0">批量通过</el-button>
                 <el-button @click="batchApprove(false)"  :loading="batchDenyLoading"  :disabled="multipleSelection.length==0">批量驳回</el-button>
                 </el-form-item>
-                
+                <div>
+                    <el-form-item label="人员:">
+                        <el-select v-model="search.userId" placeholder="请选择" clearable @change="getList()" filterable="true">
+                            <el-option v-for="item in usersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item label="日期:">
+                        <!-- <el-date-picker v-model="search.date" :editable="false" format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
+                        @change="getList()" :clearable="true" type="date" placeholder="选择工作日期"></el-date-picker> -->
+                        <el-date-picker
+                            v-model="dataTime"
+                            type="daterange"
+                            range-separator="至"
+                            start-placeholder="工作开始日期"
+                            end-placeholder="工作结束日期"
+                            format="yyyy-MM-dd" value-format="yyyy-MM-dd" @change="dataTimes()">
+                        </el-date-picker>
+                    </el-form-item>
+                </div>
             </el-form>
         </el-col>
         <!--列表-->
@@ -166,8 +180,11 @@
                     projectId:null,
                     departmentIdArray: null,
                     departmentId:null,
-                    date: null,
+                    // date: null,
+                    startDate: null,
+                    endDate: null,
                     state:0,
+                    userId: null
                 },
 
                 users: [],
@@ -180,6 +197,8 @@
                 list: [],
                 logining: false,
                 multipleSelection: [],
+                usersList: [],
+                dataTime: []
             };
         },
         filters: {
@@ -412,6 +431,37 @@
                         type: "error"
                     });
                 });
+            },
+            // 获取所有人员
+            getUsers() {
+                this.http.post(this.port.manage.list, {
+                    departmentId: -1,
+                    pageIndex: 1,
+                    pageSize: 99999
+                },
+                res => {
+                    if (res.code == "ok") {
+                        this.usersList = res.data.records;
+                    } else {
+                        this.$message({
+                        message: res.msg,
+                        type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+            // 选择日期后触发
+            dataTimes() {
+                console.log(this.dataTime)
+                this.search.startDate = this.dataTime[0]
+                this.search.endDate = this.dataTime[1]
+                this.getList()
             }
         },
         created() {
@@ -426,6 +476,7 @@
             this.getList();
             this.getDepartment();
             this.getProjectList();
+            this.getUsers()
         }
     };
 </script>