Quellcode durchsuchen

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

seyason vor 2 Jahren
Ursprung
Commit
aa2a433fc1

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

@@ -2,17 +2,17 @@ var path = require('path')
 
 //  var ip = '127.0.0.1'
 // var ip = '47.100.37.243'
-// var ip = '192.168.2.7'
+var ip = '192.168.2.7'
 
-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: {

+ 5 - 0
fhKeeper/formulahousekeeper/timesheet/index.html

@@ -2,6 +2,11 @@
 <html>
     <head>
         <meta charset="utf-8">
+        <!-- 尝试清除打包缓存 -->
+        <meta http-equiv="pragram" content="no-cache">
+        <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
+        <meta http-equiv="expires" content="0">
+        <!-- 尝试清除打包缓存 -->
         <title>工时管家</title>
         <link rel="shortcut icon" type="image/x-icon" href="./favicon.ico"/>
         <link href="./static/css/public.css" rel="stylesheet" type="text/css"/>

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet/src/permissions.js

@@ -40,6 +40,7 @@ const StringUtil = {
         setFinanceAuditor: false, //设置财务审核人
 
         // 项目报表服务 // 
+        reportProject: false, // 项目报表 //
         reportTask : false, // 项目任务报表 //
         reportCostOf : false, // 项目成本报表 // 
         reportBalance : false, // 项目收支平衡表 // 
@@ -145,6 +146,7 @@ const StringUtil = {
         arr[i] == '查看日报待审核统计' ? obj.reportAuditRate = true : ''
         arr[i] == '查看工时统计' ? obj.countHours = true : ''
         arr[i] == '查看成本统计' ? obj.countCost = true : ''
+        arr[i] == '项目报表' ? obj.reportProject = true : ''
     }
 
     return obj

+ 37 - 8
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -1,11 +1,11 @@
 <template>
   <section>
     <div>
-    <div class="sidebars" ref="sidebars" style="width: 200px;display: block;background: #fff;overflow-y:auto;overflow-x:hidden;">
+    <div class="sidebars" ref="sidebars" style="width: 200px;display: block;background: #fff;">
       <div ref="abbisd" style="width: 100%;overflow: hidden;">
         <el-col :span="12">
           <el-menu
-            default-active="1-1"
+            :default-active="defaultActive"
             class="el-menu-vertical-demo"
             @select="staffs"
             background-color="#ffffff"
@@ -17,7 +17,7 @@
                 <i class="iconfont firerock-iconbaobiao"></i>
                 <span>项目报表服务</span>
               </template>
-                <el-menu-item index="1-1" ><p @click="ssl(0)">项目报表</p></el-menu-item>
+                <el-menu-item index="1-1" v-if="permissions.reportProject"><p @click="ssl(0)">项目报表</p></el-menu-item>
                 <el-menu-item index="1-2" v-if="permissions.reportTask"><p @click="ssl(1)">项目任务报表</p></el-menu-item>
                 <el-menu-item index="1-3" v-if="permissions.reportCostOf"><p @click="ssl(2)">项目成本报表</p></el-menu-item>
                 <el-menu-item index="1-9" v-if="permissions.reportTimeDivide"><p @click="ssl(8)">人员工时分配表</p></el-menu-item>
@@ -42,7 +42,7 @@
         <div class="spans" ref="side" style="left: -19px;"><i  ref="sideI" class="el-icon-arrow-left"></i></div>
       </div> -->
     <!-- 内容主体区域 -->
-  <div class="contents">
+  <div class="contents" v-if="allWrong">
     <div class="headine" ref="headine">
       <h3 ref="headHe" style="padding-left: 210px">{{shuz[ins]}}</h3>
       <div class="headScreen">
@@ -402,6 +402,8 @@
                     <span>¥{{scope.row.baseCurcost | numberToCurrency}}</span>
                   </template>
                 </el-table-column>
+                <el-table-column  prop="currentRemainingBudget" label="当前剩余预算" min-width="200"></el-table-column>
+                <el-table-column  prop="remainingBudget" label="总剩余预算" min-width="200"></el-table-column>
                 <el-table-column prop="feeMan" label="已发生工时成本" min-width="160" align="right">
                   <template slot-scope="scope">
                     <span :class="scope.row.baseCurcost * 0.9 < scope.row.feeMan ? 'warntext' : ''">¥{{scope.row.feeMan | numberToCurrency}}</span>
@@ -625,7 +627,7 @@ export default {
       "项目收支平衡表(利润表)","客户项目利润报表","项目阶段工时表",
       "加班情况统计表","工时成本预警表","人员工时分配表",
       "员工填报及时率统计","日报待审核统计"],
-      ins: 0,
+      ins: 10000,
       user: JSON.parse(sessionStorage.user),
       overTimeList: [], // 项目加班情况统计列表
       proList: [],
@@ -651,8 +653,10 @@ export default {
       departmentList: [],
       departmentIdArray: [],
       selUserList: [],
-      departmentOrProject: 1
+      departmentOrProject: 1,
 
+      allWrong: true,
+      defaultActive: '1-1'
     };
   },
   computed: {},
@@ -673,6 +677,7 @@ export default {
     this.getDepartmentList()
     this.getcustomerList()
     this.getcusProjectList()
+    this.authorityToJudge()
   },
   filters: {
       
@@ -691,6 +696,30 @@ export default {
       }
   },
   methods: {
+    authorityToJudge() {
+      // if(this.permissions.reportProject) {this.ins = 0;return} else
+      // if(this.permissions.reportTask) {this.ins = 1;return} else
+      // if(this.permissions.reportCostOf) {this.ins = 2;return} else
+      // if(this.permissions.reportTimeDivide) {this.ins = 8;return} else
+      // if(this.permissions.reportCostWarning) {this.ins = 7;return} else
+      // if(this.permissions.reportBalance) {this.ins = 3;return} else
+      // if(this.permissions.reportProfits) {this.ins = 4;return} else
+      // if(this.permissions.reportPhase) {this.ins = 5;return} else
+      // if(this.permissions.reportOvertime) {this.ins = 6;return} else
+      // if(this.permissions.reportTimely) {this.ins = 9;return} else
+      // if(this.permissions.reportAuditRate) {this.ins = 10;return} else {this.allWrong = false}
+      if(this.permissions.reportProject) {this.ssl(0);this.defaultActive = '1-1';return} else
+      if(this.permissions.reportTask) {this.ssl(1);this.defaultActive = '1-2';return} else
+      if(this.permissions.reportCostOf) {this.ssl(2);this.defaultActive = '1-3';return} else
+      if(this.permissions.reportTimeDivide) {this.ssl(8);this.defaultActive = '1-9';return} else
+      if(this.permissions.reportCostWarning) {this.ssl(7);this.defaultActive = '1-4';return} else
+      if(this.permissions.reportBalance) {this.ssl(3);this.defaultActive = '1-5';return} else
+      if(this.permissions.reportProfits) {this.ssl(4);this.defaultActive = '1-6';return} else
+      if(this.permissions.reportPhase) {this.ssl(5);this.defaultActive = '1-7';return} else
+      if(this.permissions.reportOvertime) {this.ssl(6);this.defaultActive = '1-8';return} else
+      if(this.permissions.reportTimely) {this.ssl(9);this.defaultActive = '1-10';return} else
+      if(this.permissions.reportAuditRate) {this.ssl(10);this.defaultActive = '1-11';return} else {this.allWrong = false}
+    },
     rowspan(spanArr,position,spanName){
       this.list1.forEach((item,index) => {
         if(index == 0){
@@ -1444,9 +1473,9 @@ export default {
     },
     // 点击侧边栏事件
     side() {
-      if(this.$refs.side.style.left < '0px') {
+      if(this.$refs.side.style.left < '1px') {
         this.$refs.sidebars.style.width = '1px'
-        this.$refs.sid.style.left = '0px'
+        this.$refs.sid.style.left = '1px'
         this.$refs.side.style.left = '1px'
         this.$refs.sideI.className = 'el-icon-arrow-right'
         this.$refs.staff.style.margin = '5px 0px 0px 5px'

+ 13 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -339,9 +339,20 @@
             getUserCostList() {
                 this.listLoading = true;
                 console.log(this.port.project.userCost, '获取人员成本统计列表')
+                console.log(this.user.timeType.fixMonthcost)
+                console.log(Boolean(this.dateRange))
+                let startDateNum = ''
+                let endDateNum = ''
+                if(this.dateRange) {
+                    startDateNum = this.user.timeType.fixMonthcost==0?this.dateRange[0]:this.dateRange
+                    endDateNum = this.user.timeType.fixMonthcost==0?this.dateRange[1]:this.dateRange
+                } 
+                // return 
                 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
+                    // startDate:this.user.timeType.fixMonthcost==0?this.dateRange[0]:this.dateRange, 
+                    // endDate: this.user.timeType.fixMonthcost==0?this.dateRange[1]:this.dateRange
+                    startDate: startDateNum,
+                    endDate: endDateNum
                 },
                 res => {
                     this.listLoading = false;

+ 12 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -28,6 +28,13 @@
                         <el-option label="已撤销" value=3 ></el-option>
                     </el-select>
                 </el-form-item>
+                <!-- 主项目筛选 -->
+                <el-form-item v-if="user.timeType.mainProjectState == '1'">
+                    <span style="margin-left:5px;margin-right:5px;color:#606266;">主项目</span>
+                    <el-select v-model="projectMainId" style="width:110px;"  placeholder="请选择" clearable @change="searchClfList" size="small">
+                        <el-option v-for="item in mainProjectList" :key="item.id" :label="item.name" :value="item.id" ></el-option>
+                    </el-select>
+                </el-form-item>
                 <!-- 分类筛选 -->
                 <el-form-item >
                     <span style="margin-left:5px;margin-right:5px;color:#606266;">分类</span>
@@ -35,6 +42,7 @@
                         <el-option v-for="item in baseClfList" :key="item.id" :label="item.name" :value="item.id" ></el-option>
                     </el-select>
                 </el-form-item>
+                
                 <!-- 分类条目 -->
                 <!-- <el-form-item style="float:right;"  v-if="permissions.projectClassification">
                     <el-link type="primary" :underline="false" @click="showClfDialog = true">分类管理</el-link>
@@ -874,7 +882,8 @@ a {
                 addGroupPersonPdialog: false,
                 showColumnWidth: '300',
                 deleteVif: null,
-                isAddGroupPerson: true
+                isAddGroupPerson: true,
+                projectMainId: ''
                 
             };
         },
@@ -2206,7 +2215,8 @@ a {
                     keyword:this.keyword,
                     searchField: this.searchField,
                     status: this.status,
-                    category: this.statusClf
+                    category: this.statusClf,
+                    projectMainId: this.projectMainId
                     // 
                 },
                 res => {

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/quanx/quanx.vue

@@ -2,7 +2,7 @@
   <div>
       <!-- 表头 -->
       <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-          <el-form :inline="true" style="width: 81%">
+          <el-form :inline="true" style="width: 87%">
               <el-form-item label="角色权限">
               </el-form-item>
               <el-form-item >

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -308,11 +308,11 @@
         </div>
 
         <!-- 是否开启主项目管理 -->
-        <div class="yanjiu">
+        <!-- <div class="yanjiu">
             <p style="margin-left:10px;color:#666;">是否开启主项目管理</p>
             <el-switch style="margin-left: 41px" v-model="timeType.mainProjectState" active-color="#13ce66" inactive-color="#ff4949"> </el-switch>
             <span v-if="timeType.mainProjectState == 1" style="margin-left:10px;color:#999;">待定</span>
-        </div>
+        </div> -->
 
         <div style="width:80px;margin:0 auto;padding:20px;">
             <el-button  type="primary" @click="submitInsert" :loading="addLoading">保存</el-button>