Переглянути джерело

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

seyason 3 роки тому
батько
коміт
1078700057

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

@@ -1,7 +1,6 @@
 var path = require('path')
 
 //  var ip = '127.0.0.1'
-// var ip = '192.168.2.36'
 // var ip = '192.168.2.39'
 // var ip = '192.168.2.12'// var ip = '47.100.37.243' 
 

+ 3 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/awayOffice/awayOffice.vue

@@ -193,12 +193,12 @@
                     <el-table-column prop="reason" label="出差事由" width="150" header-align="center"></el-table-column>
                     <el-table-column prop="projectName" label="投入项目" width="150" align="center" show-overflow-tooltip>
                         <template slot-scope="scope">
-                            <span v-for="item in scope.row.projectList" :key="item.projectId">{{item.projectName + ''}}</span>
+                            <span v-for="item in scope.row.projectList" :key="item.projectId">{{item.projectName + '\u3000'}}</span>
                         </template>
                     </el-table-column>
                     <el-table-column prop="degreeName" :label="wuduData.customDegreeName" width="150" align="center" show-overflow-tooltip>
                         <template slot-scope="scope">
-                            <span v-for="item in scope.row.projectList" :key="item.projectId">{{item.degreeName == null ? '' : item.degreeName + ''}}</span>
+                            <span v-for="item in scope.row.projectList" :key="item.projectId">{{item.degreeName == null ? '' : item.degreeName + '\u3000'}}</span>
                         </template>
                     </el-table-column>
                     <el-table-column label="交通工具" width="120" align="center">
@@ -815,6 +815,7 @@ export default {
                             if(res.code == 'ok'){
                                 this.appendAddorModDialog = false
                                 this.getRelationList()
+                                this.getTableList()
                             }else {
                                 this.$message({
                                     message: res.msg,

+ 212 - 8
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -1,10 +1,10 @@
 <template>
   <section>
-    <div class="sidebars" ref="sidebars" style="width: 200px;display: block;background: #fff" v-if="!isDingding">
+    <div class="sidebars" ref="sidebars" style="width: 200px;display: block;background: #fff">
       <h3><i class="iconfont firerock-iconbaoxiao" style="padding-right: 10px"></i>请假管理</h3>
       <el-divider ></el-divider>
       <el-col :span="12">
-        <el-menu default-active="1" class="el-menu-vertical-demo" @select="staffs" background-color="#ffffff" text-color="#666666" active-text-color="#20A0FF" style="width:100%">
+        <el-menu :default-active="isDingding ? '7' : '1'" class="el-menu-vertical-demo" @select="staffs" background-color="#ffffff" text-color="#666666" active-text-color="#20A0FF" style="width:100%">
           <!-- <el-submenu index="1">
             <template slot="title">
               <i class="iconfont firerock-icontianbao"></i>
@@ -15,6 +15,7 @@
               <el-menu-item index="1-3"><p @click="ssl(2)">请年假</p></el-menu-item>
               <el-menu-item index="1-4"><p @click="ssl(3)">请产假</p></el-menu-item>
           </el-submenu> -->
+          <template v-if="!isDingding">
           <el-menu-item index="1" v-if="permissions.leaveFil">
             <i class="iconfont firerock-icontianbao"></i>
             <span slot="title">员工请假填报</span>
@@ -51,6 +52,23 @@
                 <span slot="title">年假管理</span>
               </template>
           </el-menu-item>
+          </template>
+
+          <!-- 钉钉环境对接 -->
+          <template v-if="isDingding">
+          <el-menu-item index="7">
+              <template slot="title">
+                <i class="iconfont firerock-iconbaoxiaodan"></i>
+                <span slot="title">请假单列表</span>
+              </template>
+          </el-menu-item>
+          <el-menu-item index="8">
+              <template slot="title">
+                <i class="iconfont firerock-iconbaoxiaodan"></i>
+                <span slot="title">假期剩余表</span>
+              </template>
+          </el-menu-item>
+          </template>
 
 
           </el-menu>
@@ -152,7 +170,7 @@
     </div>
 
     <!-- 下面部分 -->
-    <div v-if="displayTable && apk == false" class="tops" :style="isDingding ? 'padding-left:20px' : ''">
+    <div v-if="displayTable && apk == false" class="tops">
         <!-- 公共 -->
         <div class="ctons">
           <div class="flex">
@@ -475,6 +493,75 @@
         </div>
       </el-dialog>
     </div>
+
+    <div v-if="displayTable && apk && apk2 == 8" class="tops">
+        <!-- 公共 -->
+        <div class="ctons">
+          <div class="flex">
+            <div>
+              <span>请假类型</span>
+              <el-select v-model="leaveTypeItem" placeholder="请选择请假类型" @change="leaveTypeChange()" style="width: 180px" size="small" v-show="permissions.leaveAll" filterable="true">
+                  <span v-for="item in leaveTypeList" :key="item.leaveCode">
+                  <el-option :label="item.leaveName" :value="item.leaveCode"></el-option>
+                  </span> 
+              </el-select>
+            </div>
+            <div>
+              <span>人员筛选</span>
+              <el-select v-model="userSelId" placeholder="请选择请假人" clearable @change="userChg()" style="width: 180px" size="small" v-show="permissions.leaveAll" filterable="true">
+                  <span v-for="(item, index) in users" :key="index">
+                  <el-option :label="item.name" :value="item.id"></el-option>
+                  </span> 
+              </el-select>
+            </div>
+            <div>
+              <span>部门筛选</span>
+              <el-cascader
+              size="small"
+              @change="departmentOptionsChg"
+              v-model="departmentSel"
+              :options="departmentOptions"
+              :show-all-levels="false"
+              :props="{ checkStrictly: true }"
+              clearable></el-cascader>
+            </div>
+          </div>
+            <el-table key="apk2is8" v-loading="loading" :data="vacationList" style="width: 100%" height="90%">
+                <el-table-column prop="name" label="员工姓名" min-width="120" fixed="left"></el-table-column>
+                <el-table-column label="有效期" min-width="250" align="center">
+                  <template slot-scope="scope">
+                    <span>{{scope.row.startTime == null && scope.row.endTime == null ? '~ ~' : (scope.row.startTime + '\u3000~\u3000' + scope.row.endTime)}}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="总额度" min-width="100" align="center">
+                  <template slot-scope="scope">
+                    <span>{{scope.row.quotaInDays == null && scope.row.quotaInHours == null ? '-' : (scope.row.quotaInDays == null ? scope.row.quotaInHours + '小时' : scope.row.quotaInDays + '天')}}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="已使用" min-width="100" align="center">
+                  <template slot-scope="scope">
+                    <span>{{scope.row.usedInDays == null && scope.row.usedInHours == null ? '-' : (scope.row.usedInDays == null ? scope.row.usedInHours + '小时' : scope.row.usedInDays + '天')}}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="剩余额度" min-width="100" align="center">
+                  <template slot-scope="scope">
+                    <span>{{scope.row.leftInDays == null && scope.row.leftInHours == null ? '-' : (scope.row.leftInDays == null ? scope.row.leftInHours + '小时' : scope.row.leftInDays + '天')}}</span>
+                  </template>
+                </el-table-column>
+            </el-table>
+            <div class="poss">
+                <el-pagination
+                  @size-change="vacationSizeChange"
+                  @current-change="vacationCurrentChange"
+                  :current-page="currentPage4"
+                  :page-sizes="[50]"
+                  :page-size="50"
+                  layout="total, sizes, prev, pager, next"
+                  :total="total">
+                </el-pagination>
+          </div>
+        </div>
+    </div>
 <!-- --------- -->
   </div>
   <!-- 请假单详情 -->
@@ -722,7 +809,13 @@ export default {
 
       approverList: [],
       mustApprover: '',
-      isDingding: 0
+      isDingding: 0,
+      vacationList: [],
+      leaveTypeList: [],
+      leaveTypeItem: '',
+      departmentOptions: [],
+      departmentSel: [],
+      userSelId: ''
     };
   },
   computed: {},
@@ -741,7 +834,7 @@ export default {
   mounted() {
     if(this.isDingding){
       this.bills(false,2)
-      this.staffs(2,['2'])
+      this.staffs(7,['7'])
       this.getUsers()
     }else{
       this.getUsers() // 获取人员信息
@@ -749,10 +842,100 @@ export default {
     this.getAl();
     this.getApproverList()
     }
-    
   },
   filters: {},
   methods: {
+
+    getDepartmentOptions(){
+      this.http.post(this.port.manage.depList,{
+      },res =>{
+        if(res.code == 'ok'){
+          console.log('getDepartment',res.data);
+          this.departmentOptions = this.changeArr(res.data)
+        }else {
+          this.$message({
+            message: res.msg,
+            type: 'error'
+          })
+        }
+      },err => {
+        this.$message({
+          message: err,
+          type: 'error'
+        })
+      })
+    },
+    departmentOptionsChg(){
+      console.log(this.departmentSel);
+      this.getVacationList(1)
+    },
+    userChg(){
+      console.log(this.userSelId);
+      this.getVacationList(1)
+    },
+
+
+    // 获取剩余假期信息列表
+    getVacationList(e){
+      this.loading = true
+      let item = {}
+      if(e){
+        item = {
+          companyId: this.user.companyId,
+          pageIndex: this.page,
+          leaveCode: this.leaveTypeItem
+        }
+        if(this.departmentSel.length != 0){
+          item.departmentId = this.departmentSel[this.departmentSel.length - 1]
+        }
+        if(this.userSelId != ''){
+          item.userId = this.userSelId
+        }
+        // if()
+      }else{
+        item = {
+          companyId: this.user.companyId,
+          // leaveCode: '',
+          // userId: '',
+          pageIndex: this.page,
+          // departmentId: ''
+        }
+      }
+      this.http.post('/user-yearleave-setting/getDingDingLeaveQt',item,
+      res => {
+        if(res.code == 'ok'){
+          this.vacationList = res.data.records
+          this.total = res.data.total
+          if(!e){
+            this.leaveTypeList = res.data.leaveTypeList
+          this.leaveTypeItem = res.data.defaultLeaveType.leaveCode
+          }
+          
+
+          this.loading = false
+        }else {
+          this.loading = false
+          this.$message({
+            message: res.msg,
+            type: 'error'
+          })
+        }
+      },err => {
+        this.loading = false
+        this.$message({
+          message: err,
+          type: 'error'
+        })
+      })
+    },
+    leaveTypeChange(){
+      console.log(this.leaveTypeItem);
+      this.getVacationList(1)
+    },
+
+
+
+
     getApproverList(){
       this.http.post('/project/getMyParticiPMList',{
       },res => {
@@ -1120,7 +1303,7 @@ export default {
       this.addForm.leaveType = index
     },
     staffs(key, keyPath) {
-      // console.log("keypath",keyPath)
+      // console.log("keypath",key,keyPath)
       if (keyPath[0] == '1') {
         this.displayTable = false;
         this.apk = false
@@ -1136,12 +1319,24 @@ export default {
         this.displayTable = true;
         this.apk2 = 5
         this.apk = true
-      } else {
+      } else if(keyPath[0] == '6'){
         this.NcurDeptId = []
         this.displayTable = true;
         this.apk2 = 6
         this.apk = true
         this.getAl()
+      } else if(keyPath[0] == '7'){
+        this.displayTable = true;
+        this.apk = false
+        this.bills(false,2)
+      } else if(keyPath[0] == '8'){
+        this.apk2 = 8
+        this.displayTable = true
+        this.apk = true
+        this.getVacationList()
+        this.getDepartmentOptions()
+        this.userSelId = ''
+        this.departmentSel = []
       }
     },
     bills(audit, tr){
@@ -1423,6 +1618,14 @@ export default {
       this.page =  val;
       this.bills()
     },
+    vacationSizeChange(){
+      this.size = val
+      this.getVacationList()
+    },
+    vacationCurrentChange(){
+      this.page = val
+      this.getVacationList()
+    },
     statistical() {
       this.loading = true
       this.http.post('/leave-sheet/summaryData', {
@@ -1802,6 +2005,7 @@ export default {
   border-bottom: 1px solid #f2f2f2;
 }
 .flex span {
+  color: #606266;
   display: inline-block;
   margin: 0 10px 0 20px;
 }

+ 14 - 11
fhKeeper/formulahousekeeper/timesheet/src/views/project/CostBaseline.vue

@@ -3,7 +3,7 @@
         <div style="margin: 0 auto;width:1000px;">
             <el-row :gutter="24">
                 <el-col :span="12">
-                    <div class="box" style="min-height:180px">
+                    <div class="box" ref="allBox">
                         <div >
                             <!-- <div class="lableTxt">总成本基线</div> -->
                             <label class="lableTxt">总成本基线<el-link v-if="permissions.projectCorrection" @click="correctBase" style="float:right;"><i class="el-icon-edit"  ></i></el-link></label>
@@ -21,7 +21,7 @@
                     </div>
                 </el-col>
                 <el-col :span="12">
-                    <div class="box" style="min-height:180px;">
+                    <div class="box" :style="nowBaseHeight">
                         <label class="lableTxt">当前成本基线</label>
                             <div class="lableCon" v-for="item in nowBaseList" :key="item.id">
                                 <div><span class="gray_label">{{item.baseName}}:</span></div>
@@ -44,16 +44,14 @@
                 <el-col :span="24">
                     <div class="box">
                         <el-table :data="addList" :loading="ListLoading" :default-sort="{prop:'indate',order:'descending'}">
-                            <el-table-column v-for="item in addListColumns" :key="item.id" :label="item.name" align="right" header-align="right">
+                            <el-table-column v-for="item in addListColumns" :key="item.id" :label="item.name" align="right" header-align="center" min-width="150">
                                 <template slot-scope="scope">
-                                    <span style="margin-right: 20px;">¥{{itemListFilter(scope.row.addItemList,item.id) | numberToCurrency}}</span>
-                                    <!-- <span style="margin-right:30px">{{itemListFilter(scope.row.addItemList,item.id) == false ? '¥' + (itemListFilter(scope.row.addItemList,item.id) | numberToCurrency) : '-'}}</span> -->
-                                    <!-- <span style="margin-right:30px">{{itemListFilter(scope.row.addItemList,item.id) == false ? '-' : '¥' + itemListFilter(scope.row.addItemList,item.id) | numberToCurrency}}</span> -->
+                                    <span style="margin-right: 40px;">¥{{itemListFilter(scope.row.addItemList,item.id) | numberToCurrency}}</span>
                                 </template>
                             </el-table-column>
-                            <el-table-column label="下拨时间" prop="indate" align="center"></el-table-column>
-                            <el-table-column label="操作人员" prop="userName" align="center"></el-table-column>
-                            <el-table-column label="备注" prop="remark" align="left" header-align="center" show-overflow-tooltip></el-table-column>
+                            <el-table-column label="下拨时间" prop="indate" align="center" min-width="200"></el-table-column>
+                            <el-table-column label="操作人员" prop="userName" align="center" min-width="120"></el-table-column>
+                            <el-table-column label="备注" prop="remark" align="left" header-align="left" show-overflow-tooltip min-width="200"></el-table-column>
                             <el-table-column label="" align="center" fixed="right">
                                 <template slot-scope="scope">
                                     <el-button size="small" @click="revert(scope.row.id)" v-if="scope.$index == 0">撤销</el-button>
@@ -116,7 +114,8 @@
                 ListLoading: false,
                 nowBaseList: [],
                 correctBaseDialog: false,
-                projectContractAmount: null
+                projectContractAmount: null,
+                nowBaseHeight: ''
             };
         },
         filters: {
@@ -342,7 +341,11 @@
                 },res => {
                     if(res.code == 'ok'){
                         this.nowBaseList = res.data
-                        
+                        // if(res.data.length == 0){
+                            let allboxh = this.$refs.allBox.scrollHeight - 20
+                            console.log('getnowbase',allboxh);
+                            this.nowBaseHeight = 'height:' + allboxh + 'px;'
+                        // }
                     }else {
                         this.$message({
                             message: res.msg,

+ 3 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/gantt.vue

@@ -90,8 +90,8 @@ export default {
       gantt.config.drag_move = false;
     gantt.config.xml_date = "%Y-%m-%d";
     gantt.config.columns=[
-        {name:"text",label:(this.stafforpro == "按人员查看" ? "员工名称" : "项目名称"), align: "left" },
-        {name:"time",label:"计划工时(h)", align: "center" }
+        {name:"text",label:(this.stafforpro == "按人员查看" ? "员工名称" : "项目名称"), align: "left", tree:true},
+        // {name:"time",label:"计划工时(h)", align: "center" }
         // {name:"start_date", label:"开始时间", width:'*' , align: "center" },
         // {name:"duration",   label:"工时(天)", width:'*' ,   align: "center" }
     ];
@@ -99,6 +99,7 @@ export default {
 	  gantt.config.date_scale = "%F, %Y";		//设置时间刻度的格式(X轴) 多个尺度
 
 	  gantt.config.scale_height = 50; //设置时间刻度的高度和网格的标题
+    gantt.config.open_tree_initially = true;
 // gantt.config.layout = {
 //     css: "gantt_container",
 //     rows:[

+ 52 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue

@@ -214,7 +214,58 @@ export default {
                                 }
                                 // console.log('beforeedit',res.data);
                                 this.tasks = {data:res.data};
-                                this.tasksEdit()
+                                // let item = {
+                                //   id:'parent1',
+                                //   parent: 'parent2',
+                                //   text: 'parent1',
+                                //   render: null
+                                // }
+                                for(let i in this.tasks.data){
+                                  // delete this.tasks.data[i].type
+                                  if(this.tasks.data[i].time == 0){
+                                    // delete this.tasks.data[i].userId
+                                    delete this.tasks.data[i].start_date
+                                    delete this.tasks.data[i].end_date
+                                    // delete this.tasks.data[i].projectId
+                                    // delete this.tasks.data[i].duration
+                                    this.tasks.data[i].type = 'milestone'
+                                    // this.tasks.data[i].type = 'project'
+                                  }
+                                  // if(this.tasks.data[i].start_date != null){
+                                  //   this.tasks.data[i].start_date = new Date(this.tasks.data[i].start_date)
+                                  //   this.tasks.data[i].end_date = new Date(this.tasks.data[i].end_date)
+                                  // }
+                                }
+                                // let date1 = new Date(2022,4,23)
+                                // let date2 = new Date(date1.getFullYear(),date1.getMonth(),date1.getDate() + 3)
+                                // let ttt = [
+                                //   {text: '1',id: '100',parent: null,render: null},
+                                //   {text: '1-1',id: '1001',parent: '100',render: null,type: 'milestone'},
+                                //   {text: '1-2',id: '1002',parent: '100',render: null,type: 'milestone'},
+                                //   {text: '1-3',id: '1003',parent: '100',render: null,type: 'milestone'},
+                                //   {text: '1-1-1',id: '10011',parent: '1001',render: 'split'},
+                                //   {text: '1-1-2',id: '10012',parent: '1001',render: 'split'},
+                                //   {text: '2',id: '200',parent: null,render: null},
+                                //   {text: '2-1',id: '2001',parent: '200',render: null},
+                                //   {text: '2-2',id: '2002',parent: '200',render: null},
+                                //   {text: '2-2-1',id: '20021',parent: '2002',render: 'split'},
+                                //   {text: '2-2-2',id: '20022',parent: '2002',render: 'split'},
+                                //   {text: '3',id: '300',parent: null,render: null},
+                                //   {text: '1-1-1 in',id: 'in1',parent: '10011',render: null,start_date:'2022-5-25',end_date:'2022-5-27'},
+                                //   {text: '1-1-2 in',id: 'in2',parent: '10012',render: null,start_date:date1,end_date:date2},
+                                //   {text: '2-2-1 in',id: 'in3',parent: '20021',render: null,start_date:date1,end_date:date2},
+                                // ]
+                                // this.tasks.data = ttt
+                                console.log('tasks---',this.tasks.data);
+                                // this.tasks.data.push(item)
+                                // let item2 = {
+                                //   id:'parent2',
+                                //   parent: null,
+                                //   text: 'parent2',
+                                //   render: null
+                                // }
+                                // this.tasks.data.push(item2)
+                                // this.tasksEdit()
                                 // console.log('afteredit',this.tasks.data);
                                 this.isDataLoaded = true;
                                 // console.log("getlist",this.tasks);

+ 21 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -274,7 +274,7 @@
                         v-if="reportTimeType.type == 1"
                         :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)"
                         placeholder="请选择工作时长"
-                        @change="seleChn(0)">
+                        @change="seleChn(0,domain)">
                         <el-option v-for="item in timeRange" :key="item" :value="item.toFixed(1)">{{item.toFixed(1)}}</el-option>
                         </el-select>
                         <span v-if="reportTimeType.type == 1">小时</span>
@@ -1791,7 +1791,8 @@
                     this.seleChn(0)
                 }
             },
-            seleChn(e) {
+            seleChn(e,domain) {
+                
                 if(e == 1) {
                     for(var i in this.workForm.domains) {
                         if(this.workForm.domains[i].timeType == 0) {
@@ -1810,6 +1811,24 @@
                     quanbu = +quanbu + zhi
                 }
                 this.jsTime = quanbu
+
+                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){
+                        this.$set(domain,'isOvertime',true)
+                        this.$set(domain,'overtimeHours',quanbu - this.user.timeType.allday)
+                        // domain.overtimeHours = domain.workingTime - this.user.timeType.allday
+                        
+                    }else {
+                        this.$set(domain,'isOvertime',false)
+                        this.$set(domain,'overtimeHours',null)
+                    }
+                    
+                }
+                console.log('domain',quanbu);
             },
             iptChang() {
                 var sl = this.workForm.domains

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

@@ -4,8 +4,7 @@ const path = require('path');
 const themePath = path.resolve(__dirname,'src/assets/style/theme.less');
 
 // var ip = '127.0.0.1'
-var ip = '192.168.2.39'
-// var ip = '47.100.37.243'
+// var ip = '192.168.2.4'
 // var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
 // for (var i in ifaces) {
 //     for (var j in ifaces[i]) {