Parcourir la source

2022.5.25 13:50

山水共长天一色 il y a 3 ans
Parent
commit
2c537b19d9

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

@@ -4,15 +4,15 @@ var path = require('path')
 // var ip = '192.168.2.4'
 // var ip = '192.168.2.12'// var ip = '47.100.37.243' 
 
-// var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
-// for (var i in ifaces) {
-//     for (var j in ifaces[i]) {
-//         var val = ifaces[i][j]
-//         if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
-//             ip = val.address
-//         }
-//     }
-// }
+var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
+for (var i in ifaces) {
+    for (var j in ifaces[i]) {
+        var val = ifaces[i][j]
+        if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
+            ip = val.address
+        }
+    }
+}
 
 module.exports = {
   build: {

+ 37 - 19
fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue

@@ -26,7 +26,7 @@
       </el-date-picker>
       </div>
 
-      <div v-if="!isDataLoaded">
+      <div v-if="reqpar1" class="head_taskgroup">
         <span>任务分组</span>
         <el-select clearable filterable v-model="valuex2" placeholder="请选择" size="small" style="margin-left:9px;width:200px" @change="taskgroupSel()">
         <el-option
@@ -150,7 +150,7 @@ export default {
       // 人员/项目切换
       selChange(){
         this.valuex = null
-        console.log("切换按钮",this.radio1);
+        // console.log("切换按钮",this.radio1);
         if (this.radio1 == "按人员查看") {
           this.isDataLoaded = true
           this.reqpar1 = 0
@@ -161,6 +161,7 @@ export default {
           this.reqpar1 = 1
           this.getList()
           this.getXmScreen()
+          this.getTaskgroupList()
         }else {
           this.reqpar1 = 1
           this.isDataLoaded = false
@@ -168,9 +169,10 @@ export default {
           this.pageSize = 20
           this.valuex = ''
           this.valuex2 = ''
+          this.getDemandList()
           this.getXmScreen()
           this.getTaskgroupList()
-          this.getDemandList()
+          
         }
       },
       // 时间段改变
@@ -180,7 +182,7 @@ export default {
       },
       // 人员/项目筛选改变
       optupdata(){
-        console.log(this.valuex);
+        // console.log(this.valuex);
         if(this.isDataLoaded){
           this.getList()
         }else{
@@ -189,8 +191,13 @@ export default {
       },
       // 任务分组筛选改变
       taskgroupSel(){
-        console.log(this.valuex2);
-        this.getDemandList()
+        // console.log(this.valuex2);
+        if(this.isDataLoaded){
+          this.getList()
+        }else{
+          this.getDemandList()
+        }
+        
       },
 
       handleSizeChange(val){
@@ -205,7 +212,7 @@ export default {
       demandEdit(row){
         this.demandEditDialog = true
         this.editParameter = JSON.parse(JSON.stringify(row))
-        console.log('edit',this.demandEditDialog);
+        // console.log('edit',this.demandEditDialog);
       },
       demandEditSure(){
         this.http.post('/project-requirement/addOrMod',this.editParameter,
@@ -294,15 +301,18 @@ export default {
       },
       // 获取甘特图数据
       getList() {
-        let getlistcs = {}
-        if (this.valuex != null && this.valuex != ''){
-          if (!this.reqpar1) {
-            getlistcs = {type : 0 , startDate : this.reqpar2[0] , endDate : this.reqpar2[1], userId : this.valuex}
-          }else{
-            getlistcs = {type : 1 , startDate : this.reqpar2[0] , endDate : this.reqpar2[1], projectId : this.valuex}
+        let getlistcs = {type : this.reqpar1 , startDate : this.reqpar2[0] , endDate : this.reqpar2[1]}
+        if(this.reqpar1) {
+          if(this.valuex != ''){
+            getlistcs.projectId = this.valuex
+          }
+          if(this.valuex2 != ''){
+            getlistcs.groupName = this.valuex2
+          }
+        }else {
+          if(this.valuex != ''){
+            getlistcs.userId = this.valuex
           }
-        }else{
-          getlistcs = {type : this.reqpar1 , startDate : this.reqpar2[0] , endDate : this.reqpar2[1]}
         }
         
         this.http.post('/project/getGanttData', getlistcs ,
@@ -438,13 +448,13 @@ export default {
     width: 100%;
     height: 60px;
     display: flex;
-    justify-content: left;
+    justify-content: space-between;
     align-items: center;
   }
   .gantt_head .head_RorX{
     height: 60px;
     line-height: 60px;
-    width: 30%;
+    width: 24%;
     display: flex;
     align-items: center;
     justify-content: left;
@@ -452,15 +462,23 @@ export default {
   .gantt_head .head_date{
     height: 60px;
     line-height: 60px;
-    width: 35%;
+    width: 30%;
     display: flex;
     align-items: center;
     justify-content: left;
   }
+  .gantt_head .head_taskgroup{
+    height: 60px;
+    line-height: 60px;
+    width: 23%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
   .gantt_head .head_select{
     height: 60px;
     line-height: 60px;
-    width: 30%;
+    width: 23%;
     display: flex;
     align-items: center;
     justify-content: center;

+ 6 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -1818,15 +1818,18 @@
                     quanbu = +quanbu + zhi
                 }
                 this.jsTime = quanbu
-
+                let worktime = this.jsTime
+                if(this.isBatch != 0){
+                    worktime = this.jsTime / this.jsDay
+                }
                 if(this.user.timeType.fillOvertime && domain){
                     for(let di in spl){
                             this.$set(spl[di],'isOvertime',false)
                             this.$set(spl[di],'overtimeHours',null)
                         }
-                    if(quanbu*1 > this.user.timeType.allday){
+                    if(worktime*1 > this.user.timeType.allday){
                         this.$set(domain,'isOvertime',true)
-                        this.$set(domain,'overtimeHours',quanbu - this.user.timeType.allday)
+                        this.$set(domain,'overtimeHours',worktime - this.user.timeType.allday)
                         // domain.overtimeHours = domain.workingTime - this.user.timeType.allday
                         
                     }else {

+ 26 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit.vue

@@ -1,6 +1,6 @@
 <template>
     <div>
-        <van-nav-bar title="按周填报" left-text="返回" @click-left="back" fixed left-arrow/>
+        <van-nav-bar title="按周填报" left-text="返回" @click-left="back" fixed left-arrow style="z-index:2"/>
 
         <van-form class="login_form">
             <van-grid :column-num="2" :border="false">
@@ -12,7 +12,7 @@
                     </div>
                 </van-grid-item>
             </van-grid>
-            <van-grid :column-num="weekIndex" :border="false">
+            <van-grid :column-num="weekIndex" :border="false" style="position:relative">
                 <van-grid-item v-for="item,index in dateRange" :key="index" :class="index == inbtn ? 'inbtn' : ''">
                     <van-button
                     class="selectgxbtn"
@@ -20,6 +20,9 @@
                     size="mini"
                     @click="switchWeek(item,index)">{{weekArr[index]}}</van-button>
                 </van-grid-item>
+                <div class="submitClear">
+                        <van-button type="default" size="small" @click="submitClear">清空</van-button>
+                    </div>
             </van-grid>
 
 
@@ -1285,6 +1288,21 @@
                 }
                 return true
             },
+            // 清空当前填写信息
+            submitClear(){
+                this.currentForm.domains = [{
+                                id: null,
+                                projectId: "",
+                                projectName: "",
+                                workingTime: 8,
+                                content: "",
+                                state: 2,
+                                multiWorktime:0,
+                                worktimeList:{},
+                                degreeId: ''
+                            }],
+                console.log(this.currentForm);
+            },
 
             // 提交日报
             submitReport() {
@@ -1768,5 +1786,11 @@
     .van-checkbox__label--disabled {
         color: #c8c9cc !important;
     }
+    .submitClear{
+        position: absolute;
+        right: 0.1rem;
+        bottom: -0.95rem;
+        z-index: 1;
+    }
 </style>
 

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue

@@ -66,7 +66,7 @@
                     this.routers.push({name: '查看日报',url: '/calendar',icon: 'description'})
                     this.routers.push({name: '填写日报',url: '/edit',icon: 'edit'})
                     if (this.user.companyId == 817 || this.user.companyId == 7 || this.user.companyId == 10) {
-                        this.routers.push({name: '按周填报',url: '/weekEdit',icon: 'edit'})
+                        this.routers.push({name: '按周填报',url: '/weekEdit',icon: 'records'})
                     }
                 }
                 if(list[i].name == '项目报告审核') {

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet_h5/vue.config.js

@@ -3,6 +3,7 @@ const pxtorem = require("postcss-pxtorem");
 const path = require('path');
 const themePath = path.resolve(__dirname,'src/assets/style/theme.less');
 
+// var ip = '192.168.2.4'
 // var ip = '127.0.0.1'
 var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
 for (var i in ifaces) {