Browse Source

调整导入日报核酸

Lijy 3 years ago
parent
commit
ed182b1e6e

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

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

+ 52 - 13
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list_import.vue

@@ -8,9 +8,23 @@
                         <el-option v-for="item in projectList" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
                         <el-option v-for="item in projectList" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
                     </el-select>
                     </el-select>
                 </el-form-item>
                 </el-form-item>
+                <el-form-item label="部门:">
+                    <el-cascader v-model="search.departmentId" placeholder="请选择部门" style="width: 100%"
+                    :options="option" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable
+                    @change="getList()"
+                    ></el-cascader>
+                </el-form-item>
                 <el-form-item label="日期:" style="margin-left:20px;">
                 <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-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="date"
+                        type="daterange"
+                        range-separator="至"
+                        start-placeholder="开始日期"
+                        end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
+                    @change="getList()" :clearable="true">
+                    </el-date-picker>
                 </el-form-item>
                 </el-form-item>
                 <el-form-item   style="margin-left:20px;">
                 <el-form-item   style="margin-left:20px;">
                     <el-button @click="batchApprove(true)" style="margin-left:10px;" :disabled="multipleSelection.length==0">批量通过</el-button>
                     <el-button @click="batchApprove(true)" style="margin-left:10px;" :disabled="multipleSelection.length==0">批量通过</el-button>
@@ -23,7 +37,7 @@
         <el-table :data="list" ref="multipleTable" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;"
         <el-table :data="list" ref="multipleTable" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;"
             @selection-change="handleSelectionChange">
             @selection-change="handleSelectionChange">
             <el-table-column type="selection" width="55"></el-table-column>
             <el-table-column type="selection" width="55"></el-table-column>
-            <el-table-column type="expand">
+            <!-- <el-table-column type="expand">
                 <template slot-scope="props">
                 <template slot-scope="props">
                     <el-timeline>
                     <el-timeline>
                         <el-timeline-item v-for="(item,index) in props.row.data" :key="index">
                         <el-timeline-item v-for="(item,index) in props.row.data" :key="index">
@@ -49,7 +63,7 @@
                                 <div v-if="item.multiWorktime==0">
                                 <div v-if="item.multiWorktime==0">
                                 <p>时长:{{item.time}}h <span class="propsbtn" v-if="item.isOvertime === 1">
                                 <p>时长:{{item.time}}h <span class="propsbtn" v-if="item.isOvertime === 1">
                                     <el-tag type="danger" size="mini" style="margin-left: 65px">加班</el-tag></span>
                                     <el-tag type="danger" size="mini" style="margin-left: 65px">加班</el-tag></span>
-                                    <!-- 阶段 -->
+                                    阶段
                                     <span v-if="item.stage != null" style="margin-left:10px;"> 投入阶段:{{item.stage}}</span>
                                     <span v-if="item.stage != null" style="margin-left:10px;"> 投入阶段:{{item.stage}}</span>
                                 </p>
                                 </p>
                                 <p v-if="user.role == 1 || user.role == 2 || user.role == 6">成本:{{item.cost}}元</p>
                                 <p v-if="user.role == 1 || user.role == 2 || user.role == 6">成本:{{item.cost}}元</p>
@@ -66,7 +80,7 @@
                                     </div>
                                     </div>
                                 </div>
                                 </div>
 
 
-                                <!--照片的显示 -->
+                                照片的显示
                                 <p v-if="item.pics != null && item.pics.length > 0"> 
                                 <p v-if="item.pics != null && item.pics.length > 0"> 
                                     <el-image v-for="(pic, index) in item.pics" :key="index"
                                     <el-image v-for="(pic, index) in item.pics" :key="index"
                                         style="width: 100px; height: 100px; margin-right:10px;"
                                         style="width: 100px; height: 100px; margin-right:10px;"
@@ -78,14 +92,16 @@
                         </el-timeline-item>
                         </el-timeline-item>
                     </el-timeline>
                     </el-timeline>
                 </template>
                 </template>
-            </el-table-column>
+            </el-table-column> -->
             
             
-            <el-table-column prop="name" label="姓名" sortable></el-table-column>
-            <el-table-column prop="dateStr" label="日期" sortable>
+            <el-table-column prop="name" label="姓名" sortable width="120"></el-table-column>
+            <el-table-column prop="dateStr" label="日期" sortable width="150">
+            </el-table-column>
+            <el-table-column prop="reportTime" label="工作时长(h)" width="150">
             </el-table-column>
             </el-table-column>
-            <el-table-column prop="reportTime" label="工作时长(h)" >
+            <el-table-column prop="allProjectTime" label="项目工时成本" >
             </el-table-column>
             </el-table-column>
-            <el-table-column prop="state" label="状态" sortable>
+            <el-table-column prop="state" label="状态" sortable width="150px">
                 <template slot-scope="scope">
                 <template slot-scope="scope">
                     <span v-if="scope.row.state == -1" style="color:#DAA520;">待审核</span>
                     <span v-if="scope.row.state == -1" style="color:#DAA520;">待审核</span>
                     <span v-else-if="scope.row.state == 1" style="color:#32CD32;">已通过</span>
                     <span v-else-if="scope.row.state == 1" style="color:#32CD32;">已通过</span>
@@ -138,7 +154,10 @@
 
 
                 search: {
                 search: {
                     projectId:null,
                     projectId:null,
-                    date: null,
+                    // date: null,
+                    departmentId: null,
+                    startDate: null,
+                    endDate: null
                 },
                 },
 
 
                 users: [],
                 users: [],
@@ -151,6 +170,7 @@
                 list: [],
                 list: [],
                 logining: false,
                 logining: false,
                 multipleSelection: [],
                 multipleSelection: [],
+                date: ''
             };
             };
         },
         },
         methods: {
         methods: {
@@ -228,8 +248,27 @@
             getList() {
             getList() {
                 this.listLoading = true;
                 this.listLoading = true;
                 console.log(this.port.report.importReportList)
                 console.log(this.port.report.importReportList)
+                console.log(this.search, '----', this.date)
+                if(this.date) {
+                    this.search.startDate = this.date[0]
+                    this.search.endDate = this.date[1]
+                } else {
+                    this.search.startDate = null
+                    this.search.endDate = null
+                }
+                var obj = {}
+                obj.projectId = this.search.projectId
+                obj.startDate = this.search.startDate
+                obj.endDate = this.search.endDate
+                if(this.search.departmentId) {
+                    obj.departmentId = this.search.departmentId[this.search.departmentId.length - 1]
+                } else {
+                    obj.departmentId = null
+                }
                 console.log(this.search)
                 console.log(this.search)
-                this.http.post(this.port.report.importReportList, this.search,
+                // return
+                // this.http.post(this.port.report.importReportList, this.search,
+                this.http.post(this.port.report.importReportList, obj,
                 res => {
                 res => {
                     this.listLoading = false;
                     this.listLoading = false;
                     if (res.code == "ok") {
                     if (res.code == "ok") {
@@ -300,7 +339,7 @@
                     if(arr[i].id == -1 || arr[i].id == 0) {
                     if(arr[i].id == -1 || arr[i].id == 0) {
                         arr.splice(i,1)
                         arr.splice(i,1)
                     }    
                     }    
-                }
+                } 
                 return arr;
                 return arr;
             },
             },