Procházet zdrojové kódy

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper into master

seyason před 3 roky
rodič
revize
feb209ac97

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

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

+ 5 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -52,6 +52,7 @@
                         <el-option v-for="item in hasReportUserList"  :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
                 </el-form-item>
+
                 <el-form-item prop="projectId" :label="user.timeType.fixMonthcost==0?'日期范围':'选择月份'">
                     <el-date-picker v-show="user.timeType.fixMonthcost==0"
                         v-model="exportParam.dateRange" :editable="false" 
@@ -167,8 +168,10 @@
                 },
             
             showExportDialog() {
+                console.log(12345)
                 this.exportDialog = true;
                 this.exportParam.dateRange = this.dateRange;
+                console.log(this.hasReportUserList)
                 if (this.radio == '人员') {
                     // this.exportParam.userIds = [];
                 }
@@ -254,6 +257,7 @@
             //获取人员成本统计列表
             getUserCostList() {
                 this.listLoading = true;
+                console.log(this.port.project.userCost, '获取人员成本统计列表')
                 this.http.post(this.port.project.userCost, {
                     startDate:this.user.timeType.fixMonthcost==0?this.dateRange[0]:this.dateRange, 
                     endDate: this.user.timeType.fixMonthcost==0?this.dateRange[1]:this.dateRange
@@ -722,7 +726,7 @@
             window.addEventListener("resize", function() {
                 _this.myChart.resize();
             });
-            this.getDepartment();
+            // this.getDepartment();
             this.getMyProjectList();
             this.getUsers()
             this.jutishez()

+ 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>