浏览代码

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

seyason 3 年之前
父节点
当前提交
b6b8ef52f9

+ 18 - 17
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java

@@ -2,41 +2,27 @@ package com.management.platform.controller;
 
 
 import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.management.platform.entity.*;
 import com.management.platform.entity.vo.SysRichFunction;
 import com.management.platform.mapper.*;
 import com.management.platform.service.*;
 import com.management.platform.util.HttpRespMsg;
 import org.assertj.core.util.Lists;
-import org.opencv.features2d.SimpleBlobDetector;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
-import org.springframework.web.bind.WebDataBinder;
-import org.springframework.web.bind.annotation.InitBinder;
 import org.springframework.web.bind.annotation.RequestMapping;
-
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.context.request.WebRequest;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
-import java.awt.*;
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyEditor;
-import java.sql.Blob;
-import java.text.SimpleDateFormat;
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
-import java.util.List;
 import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
 /**
  * <p>
@@ -83,6 +69,8 @@ public class TaskController {
     private TaskExecutorService taskExecutorService;
     @Resource
     private CompanyDingdingService companyDingdingService;
+    @Resource
+    private WxCorpInfoService wxCorpInfoService;
 
     @RequestMapping("/save")
     @Transactional
@@ -163,7 +151,7 @@ public class TaskController {
             }
             List<TaskExecutor> oldExeList = taskExecutorMapper.selectList(new QueryWrapper<TaskExecutor>().eq("task_id", task.getId()));
             //计算需要移除的执行人
-            List<Integer> ids = oldExeList.stream().filter(old->!task.getExecutorList().stream().anyMatch(newT->newT.getExecutorId().equals(old.getExecutorId())))
+            List<Integer> ids = oldExeList.stream().filter(old->!task.getExecutorList().stream().anyMatch(newT->newT.getId()!=null&&newT.getId().equals(old.getId())))
                         .map(TaskExecutor::getId).collect(Collectors.toList());
             if (ids.size() > 0) {
                 taskExecutorService.removeByIds(ids);
@@ -218,7 +206,20 @@ public class TaskController {
                         task.getName(), endStr);
             } else if (recpUserList.get(0).getCorpwxUserid() != null) {
                 //企业微信用户
-
+                WxCorpInfo wxCorpInfo = wxCorpInfoService.getOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
+                recpUserList.forEach(ru->{
+                    String corpUid = ru.getCorpwxUserid();
+                    JSONObject json=new JSONObject();
+                    JSONArray dataJson=new JSONArray();
+                    JSONObject jsonObj=new JSONObject();
+                    jsonObj.put("key", "任务内容");
+                    jsonObj.put("value",task.getName());
+                    dataJson.add(jsonObj);
+                    json.put("template_id","tty9TkCAAAovv416zsWtn0e06CJ635HA");
+                    json.put("url", "https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww4e237fd6abb635af&redirect_uri=http://mobworktime.ttkuaiban.com/api/corpWXAuth&response_type=code&scope=snsapi_base&state=0#wechat_redirect");
+                    json.put("content_item",dataJson);
+                    wxCorpInfoService.sendWXCorpTemplateMsg(wxCorpInfo, corpUid, json);
+                });
             }
 
         }

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

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

+ 3 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue

@@ -516,7 +516,7 @@
                 }
             }
             .logo-width {
-                width: 230px;
+                width: 200px;
             }
             .logo-collapse-width {
                 width: 60px;
@@ -562,8 +562,8 @@
                 width: 60px;
             }
             .menu-expanded {
-                flex: 0 0 230px;
-                width: 230px;
+                flex: 0 0 200px;
+                width: 200px;
             }
             .content-container {
                 flex: 1;

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

@@ -48,7 +48,7 @@
             <!--项目报表 -->
             <el-table v-if="ins == 0" :key="ins" border :data="list0" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
                 <el-table-column  prop="projectCode" label="项目编号"  width="120"></el-table-column>
-                <el-table-column  prop="projectName" label="项目名称" >
+                <el-table-column  prop="projectName" label="项目名称" width="200">
                   <template slot-scope="scope" >
                     {{scope.row.projectName}}
                   </template>

+ 21 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -112,7 +112,10 @@
             <el-table-column prop="projectName" label="所属项目" width="180">
               <template slot-scope="scope">
                 <el-select size="small" v-model="scope.row.projectId" placeholder="项目" style="width: 150px" filterable>
-                  <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName" :value="item.id" @click="ok(item)"></el-option>
+                  <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName + item.projectCode" :value="item.id" @click="ok(item)">
+                    <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
+                    <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
+                  </el-option>
                 </el-select>
               </template>
             </el-table-column>
@@ -331,7 +334,10 @@
             <el-table-column prop="projectId" label="项目" width="155">
                 <template slot-scope="scope">
                   <el-select size="small" v-if="!flg" v-model="scope.row.projectId" placeholder="项目" style="width: 130px">
-                    <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName" :value="item.id" @click="ok(item)"></el-option>
+                    <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName + item.projectCode" :value="item.id" @click="ok(item)">
+                      <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
+                      <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
+                    </el-option>
                   </el-select>
                   <!-- <span v-else>{{projectIdName[scope.$index].projectName}}</span> -->
                   <div v-else>
@@ -367,7 +373,7 @@
             </el-table-column>
             <el-table-column prop="amount" label="费用金额(含税:元)" width="172">
               <template slot-scope="scope">
-                <el-input size="small"  v-if="!flg" :id="'am'+scope.$index" v-model="scope.row.amount" @change="kan" @keyup.native="restrictNumber('am'+scope.$index)"></el-input>
+                <el-input size="small"  v-if="!flg" :id="'am'+scope.$index" v-model="scope.row.amount" @input="zhiNum(scope.$index, scope)" @change="kan" @keyup.native="restrictNumber('am'+scope.$index)"></el-input>
                 <span v-else>¥{{scope.row.amount}}</span>
               </template>
             </el-table-column>
@@ -379,7 +385,7 @@
             </el-table-column>
             <el-table-column prop="taxPercent" label="税率%" width="172">
               <template slot-scope="scope">
-                <el-input size="small"  v-if="!flg" v-model="scope.row.taxPercent"></el-input>
+                <el-input size="small"  v-if="!flg" v-model="scope.row.taxPercent" @input="zhiNum(scope.$index, scope)"></el-input>
                 <span v-else>{{scope.row.taxPercent}}</span>
               </template>
             </el-table-column>
@@ -999,6 +1005,7 @@ export default {
       }, 0)
     },
     zhi(e) {
+      console.log('看看值', e)
       var i = e
       if(this.invoiceList[i].amount == null || this.invoiceList[i].amount == 'null' || this.invoiceList[i].taxPercent == null || this.invoiceList[i].taxPercent == 'null') {
         return
@@ -1009,6 +1016,16 @@ export default {
       var zhi = this.invoiceList[i].amount / (1 + shui) * shui
       this.invoiceList[i].taxValue = zhi.toFixed(2)
     },
+    zhiNum(i, val) {
+      console.log('看看值', i, val)
+      console.log(this.ParticularsList.invoiceList)
+      if(this.ParticularsList.invoiceList[i].amount == null || this.ParticularsList.invoiceList[i].amount == 'null' || this.ParticularsList.invoiceList[i].taxPercent == null || this.ParticularsList.invoiceList[i].taxPercent == 'null') {
+        return
+      }
+      var shui =  this.ParticularsList.invoiceList[i].taxPercent / 100
+      var zhi = this.ParticularsList.invoiceList[i].amount / (1 + shui) * shui
+      this.ParticularsList.invoiceList[i].taxValue = zhi.toFixed(2)
+    },
     zhis(e) {
       var i = e
       this.invoiceList[i].taxValue = this.invoiceList[i].taxValue.toFixed(2)

+ 36 - 18
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -1,6 +1,6 @@
 <template>
-  <section>
-    <div class="sidebars" ref="sidebars" style="width: 200px;display: block;background: #fff">
+  <section id="section">
+    <div class="sidebars" ref="sidebars" :style="'width: 180px;display: block;background: #fff;height:'+hubs+ 'px'">
       <h3><i class="iconfont firerock-iconbaoxiao" style="padding-right: 10px"></i>请假管理</h3>
       <el-divider ></el-divider>
       <el-col :span="12">
@@ -87,7 +87,7 @@
     <!-- 上面部分 -->
     <div v-if="!displayTable && apk == false" class="tops">
         <!-- 公共 -->
-        <div class="ctons">
+        <div class="ctons" :style="'width: '+kuanBl+'px'">
             <!-- 表单 -->
             <el-form ref="addForm" :model="addForm" label-width="80px" :rules="addFormRules">
                 <!-- 请假类型 -->
@@ -172,10 +172,10 @@
     <!-- 下面部分 -->
     <div v-if="displayTable && apk == false" class="tops">
         <!-- 公共 -->
-        <div class="ctons">
+        <div class="ctons" :style="'width: '+kuanBl+'px'">
           <div class="flex">
             <div>
-              <el-select v-model="ownerIds" placeholder="请选择请假人" clearable @change="chufas()" style="width: 180px" size="small" v-show="permissions.leaveAll" filterable="true">
+              <el-select v-model="ownerIds" placeholder="请选择请假人" clearable @change="chufas()" style="width: 160px" 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> 
@@ -183,7 +183,7 @@
             </div>
             <div>
               <span style="color: #606266">请假类型</span>
-              <el-select v-model="type" placeholder="请选择请假类型" clearable @change="chufas()" style="width: 180px;" size="small" filterable="true">
+              <el-select v-model="type" placeholder="请选择请假类型" clearable @change="chufas()" style="width: 160px;" size="small" filterable="true">
                   <span v-for="(item, index) in typess" :key="index">
                   <el-option :label="item.name" :value="item.id"></el-option>
                   </span> 
@@ -191,12 +191,12 @@
             </div>
             <div>
               <span style="color: #606266">请假状态</span>
-              <el-select v-if="falg == 0" v-model="code" placeholder="请选择请假状态" clearable @change="chufas()" size="small" style="width: 180px" filterable="true">
+              <el-select v-if="falg == 0" v-model="code" placeholder="请选择请假状态" clearable @change="chufas()" size="small" style="width: 160px" filterable="true">
                   <span v-for="(item, index) in statuss" :key="index">
                   <el-option :label="item.name" :value="item.id"></el-option>
                   </span> 
               </el-select>
-              <el-select v-if="falg == 1" disabled v-model="code" placeholder="请选择请假类型" clearable @change="chufas()" size="small" style="width: 180px" filterable="true">
+              <el-select v-if="falg == 1" disabled v-model="code" placeholder="请选择请假类型" clearable @change="chufas()" size="small" style="width: 160px" filterable="true">
                   <span v-for="(item, index) in statuss" :key="index">
                   <el-option :label="item.name" :value="item.id"></el-option>
                   </span> 
@@ -291,7 +291,7 @@
     <!-- 统计部分 -->
     <div v-if="displayTable && apk && apk2 == 4" class="tops">
       <!-- 公共 -->
-        <div class="ctons">
+        <div class="ctons" :style="'width: '+kuanBl+'px'">
           <div style="display: flex;align-items: center;padding-bottom: 20px;border-bottom: 1px solid #f2f2f2">
             <div style="display: inline-block;width: 350px">
               <el-input style="float:left;" v-model="keyword" class="input-with-select" placeholder="请输入人员搜索" clearable="true" size="small">
@@ -356,7 +356,7 @@
 <!-- 审批流 -->
     <div v-if="displayTable && apk && apk2 == 5" class="tops">
         
-        <div class="ctons">
+        <div class="ctons" :style="'width: '+kuanBl+'px'">
         <el-col :span="6" >
             <el-scrollbar style="height:100%;border:1px solid #dddddd;margin-left:15px;" >
             <div class="tree" :style="'height:'+ (tableHeight-120) + 'px'">
@@ -420,7 +420,7 @@
     </div>
   <!-- 年假管理 -->
     <div v-if="displayTable && apk && apk2 == 6" class="tops">
-      <div class="ctons">
+      <div class="ctons" :style="'width: '+kuanBl+'px'">
         <div style="display: flex;align-items: center;padding-bottom: 20px;border-bottom: 1px solid #f2f2f2">
             <div style="display: inline-block;width: 18%;margin-left:1%">
               <el-button size="small" @click="changeAltime(0)">批量设置</el-button>
@@ -496,7 +496,7 @@
 
     <div v-if="displayTable && apk && apk2 == 8" class="tops">
         <!-- 公共 -->
-        <div class="ctons">
+        <div class="ctons" :style="'width: '+ kuanBl +'px'">
           <div class="flex">
             <div>
               <span>请假类型</span>
@@ -821,12 +821,17 @@ export default {
       departmentOptions: [],
       departmentSel: [],
       userSelId: '',
-      synchronizeLoading: false
+      synchronizeLoading: false,
+      kuanBl: 0,
+      hubs: 0
     };
   },
   computed: {},
   watch: {},
   created() {
+    let widTHBul = document.documentElement.clientWidth - 440
+    this.kuanBl = widTHBul
+    this.hubs = document.documentElement.clientHeight || document.body.clientHeight
     let height = window.innerHeight;
             this.tableHeight = height - 195;
             const that = this;
@@ -838,19 +843,32 @@ export default {
   },
 
   mounted() {
+    // this.watchSize()
     if(this.isDingding){
       this.bills(false,2)
       this.staffs(7,['7'])
       this.getUsers()
     }else{
       this.getUsers() // 获取人员信息
-    this.getDepartment();
-    this.getAl();
-    this.getApproverList()
+      this.getDepartment();
+      this.getAl();
+      this.getApproverList()
     }
   },
   filters: {},
   methods: {
+    // 监听元素
+    //  watchSize() {
+    //    const _this = this;
+    //    var erd = elementResizeDetectorMaker();
+    //    erd.listenTo(this.$refs.section, (element) => { // 这里的this.$refs.fan指定要监听的元素对象,对应的是<div ref="fan"></div>
+    //      var width = element.offsetWidth;
+    //      var height = element.offsetHeight;
+    //      _this.$nextTick(() => { // 这里填写监听改变后的操做
+    //       	console.log('触发监听')
+    //      });
+    //    });
+    //  },
     // 从钉钉同步假期剩余表
     listSynchronize(){
       this.synchronizeLoading = true
@@ -2018,10 +2036,10 @@ export default {
     position: absolute;
     background: #f7f7f7;
     box-sizing: border-box;
-    padding: 20px 0 0 220px;
+    padding: 20px 0 0 200px;
 }
 .ctons {
-    width: 86%;
+    /* width: 86%; */
     height: 92%;
     overflow: hidden;
     background: #fff;

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

@@ -71,7 +71,7 @@
         </el-col>
 
         <!--列表-->
-        <el-table ref="projectlistOfWudulist" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" @selection-change="checkedWudulist">
+        <el-table ref="projectlistOfWudulist" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight - 28" style="width: 100%;" @selection-change="checkedWudulist">
             <el-table-column type="selection" width="60" :selectable="isSelectable">
                 <!-- creator 项目创建人    incharger 项目负责人 -->
             </el-table-column>

+ 11 - 36
fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue

@@ -30,7 +30,7 @@
       <!-- 任务分组筛选 -->
       <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-select clearable filterable v-model="valuex2" placeholder="请选择" size="small" style="margin-left:9px;width:13vw" @change="taskgroupSel()">
         <el-option
           v-for="item in taskgroupList"
           :key="item.name"
@@ -43,7 +43,7 @@
       <!-- 人员/项目筛选 -->
       <div class="head_select">
         <span>{{(this.radio1 == "按人员查看" ? "人员" : "项目")}}</span>
-      <el-select clearable filterable v-model="valuex" placeholder="请选择" size="small" style="margin-left:9px;width:200px" @change="optupdata()">
+      <el-select clearable filterable v-model="valuex" placeholder="请选择" size="small" style="margin-left:9px;width:13vw" @change="optupdata()">
         <el-option
           v-for="item in screenList"
           :key="item.id"
@@ -55,11 +55,11 @@
       </div>
       <!-- 资源需求导入/导出 -->
       <div class="head_files" v-if="!isDataLoaded">
-        <el-link type="primary" style="margin-left:10px;" :underline="false" href="./upload/资源需求导入模板.xlsx" download="资源需求导入模板.xlsx">模板下载</el-link>
-        <el-upload ref="upload" style="margin-left:10px;" action="#" :limit="1" :http-request="importProject" :show-file-list="false">
+        <el-link type="primary" style="margin-left:10px;float:left;" :underline="false" href="./upload/资源需求导入模板.xlsx" download="资源需求导入模板.xlsx">模板下载</el-link>
+        <el-upload ref="upload" style="margin-left:10px;float:left;" action="#" :limit="1" :http-request="importProject" :show-file-list="false">
           <el-link type="primary" :underline="false" >导入需求</el-link>
         </el-upload>
-        <el-link type="primary" style="margin-left:10px;" :underline="false" @click="exportProjectData" download="资源需求导出.xlsx">导出需求</el-link>
+        <el-link type="primary" style="margin-left:10px;float:left;" :underline="false" @click="exportProjectData" download="资源需求导出.xlsx">导出需求</el-link>
       </div>
     </div>
 
@@ -516,50 +516,25 @@ export default {
   }
   .gantt_head{
     width: 100%;
-    height: 60px;
+    height: 80px;
     display: flex;
     justify-content: space-between;
     align-items: center;
   }
   .gantt_head .head_RorX{
-    height: 60px;
-    line-height: 60px;
-    width: 24%;
-    display: flex;
-    align-items: center;
-    justify-content: left;
+    width: 18vw;
   }
   .gantt_head .head_date{
-    height: 60px;
-    line-height: 60px;
-    width: 30%;
-    display: flex;
-    align-items: center;
-    justify-content: left;
+    width: 27vw;
   }
   .gantt_head .head_taskgroup{
-    height: 60px;
-    line-height: 60px;
-    width: 23%;
-    display: flex;
-    align-items: center;
-    justify-content: center;
+    width: 18vw;
   }
   .gantt_head .head_select{
-    height: 60px;
-    line-height: 60px;
-    width: 23%;
-    display: flex;
-    align-items: center;
-    justify-content: center;
+    width: 17vw;
   }
   .gantt_head .head_files{
-    height: 60px;
-    line-height: 60px;
-    width: 20%;
-    display: flex;
-    align-items: center;
-    justify-content: center;
+    width: 14vw;
   }
   .poss {
     height: 8%;

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

@@ -372,7 +372,7 @@
                             <el-option v-for="item in domain.auditUserList" :label="item.auditorName" :value="item.auditorId" :key="item.id"></el-option>
                         </el-select>
                     </el-form-item>
-                    <!-- 相关维度 -->
+                    <!-- 相关维度/自定义维度 -->
                     <el-form-item :label="yonghuUser.customDegreeName" v-if="domain.projectId && yonghuUser.customDegreeActive == 1">
                         <el-select v-model="domain.degreeId" clearable placeholder="请选择" :disabled="!canEdit">
                             <el-option v-for="item in domain.wuduList" :key="item.value" :label="item.name" :value="item.id">
@@ -698,6 +698,24 @@
                         <el-option v-for="item in zhoBao.auditUserList" :key="item.id" :label="item.auditorName" :value="item.auditorId"></el-option>
                     </el-select>
                 </div>
+                <!-- 自定义维度  -->
+                <div class="zhoFel" v-if="user.timeType.customDegreeActive">
+                    <p>{{user.timeType.customDegreeName}}</p>
+                    <el-select v-model="zhoBao.degreeId" placeholder="请选择" clearable="true" style="width: 355px">
+                        <el-option v-for="item in zhoBao.wuduList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                    </el-select>
+                    
+                </div>
+                <!-- 自定义数值 -->
+                <div class="zhoFel" v-if="user.timeType.customDataActive">
+                    <p>{{user.timeType.customDataName}}</p>
+                    <el-input-number :id="'weekData_num'" :disabled="!canEdit" v-model="zhoBao.customData" style="width:200px;" @keyup.native="restrictNumber('weekData_num')"></el-input-number>
+                </div>
+                <!-- 自定义文本 -->
+                <div class="zhoFel" v-if="user.timeType.customTextActive">
+                    <p>{{user.timeType.customTextName}}</p>
+                    <el-input :disabled="!canEdit" v-model="zhoBao.customText" style="width:355px;" maxlength="25" show-word-limit></el-input>
+                </div>
                 <div class="zhoFel" v-if="reportTimeType.type == 2">
                     <p>选择时间</p>
                     <el-time-picker style="width: 355px" is-range v-model="zhoBao.time" format="HH:mm" value-format="HH:mm" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"></el-time-picker>
@@ -1465,6 +1483,7 @@
             
         },
         methods: {
+
             filterNode(value, data) {
                 // console.log(value, data, '搜索')
                 if (!value) return true;
@@ -3674,7 +3693,7 @@
             },
             // 按周填报里内容的填写
             tianxies(item, i, names, row) {
-                // console.log(item, i, names, row[0], '你好')
+                // console.log(item, i, names, row, '你好')
                 var idd = ''
                 var obj = {}
                 for(var l in this.projectList) {
@@ -3686,6 +3705,7 @@
                 this.tianxieDialogVisible = true
                 this.scopess = item
                 var sss = {}
+                
                 sss.projectId = idd;
                 sss.con = item.con
                 sss.progress = item.progress
@@ -3718,6 +3738,7 @@
                         //只有一个审核人,自动设置上去
                         sss.projectAuditorId = sss.auditUserList[0].auditorId;
                     }
+                    sss.wuduList = row[0].wuduList
                     // console.log(sss, '数据')
                     that.zhoBaoIdx = i
                     that.zhoBaoName = names
@@ -4114,7 +4135,7 @@
                             for(var j in zhoD) {     
                                 if(j != 'zhoDataTime' && j != 'he' && zhoD[j].time && zhoD[j].time.length > 0 && zhoD[j].time != null && zhoD[j].time != 'null') {
                                     flgs = true
-                                    formData.append("degreeId", "-1");
+                                    // formData.append("degreeId", "-1");
                                     formData.append("id", '-1');
                                     for(var s in this.projectList) {
                                         if(j == this.projectList[s].projectName) {
@@ -4151,6 +4172,21 @@
                                     } else {
                                         formData.append("basecostId", 0);
                                     }
+                                    if(this.user.timeType.customDegreeActive && zhoD[j].degreeId){
+                                        formData.append('degreeId',zhoD[j].degreeId)
+                                    }else{
+                                        formData.append("degreeId", "-1");
+                                    }
+                                    if(this.user.timeType.customDataActive && zhoD[j].customData){
+                                        formData.append('customData',zhoD[j].customData)
+                                    }else if(this.user.timeType.customDataActive){
+                                        formData.append('customData',0)
+                                    }
+                                    if(this.user.timeType.customTextActive && zhoD[j].customText){
+                                        formData.append('customText',zhoD[j].customText)
+                                    }else if(this.user.timeType.customTextActive){
+                                        formData.append('customText','-')
+                                    }
                                 }
                             }
                         }
@@ -4162,7 +4198,7 @@
                                 for(var j in zhoD) {     
                                     if(j != 'zhoDataTime' && j != 'he' && zhoD[j].time && zhoD[j].time.length > 0 && zhoD[j].time != null && zhoD[j].time != 'null') {
                                         flgs = true
-                                        formData.append("degreeId", "-1");
+                                        // formData.append("degreeId", "-1");
                                         formData.append("id", '-1');
                                         for(var s in this.projectList) {
                                             if(j == this.projectList[s].projectName) {
@@ -4188,13 +4224,28 @@
                                         } else {
                                             formData.append("basecostId", 0);
                                         }
+                                        if(this.user.timeType.customDegreeActive && zhoD[j].degreeId){
+                                            formData.append('degreeId',zhoD[j].degreeId)
+                                        }else{
+                                            formData.append("degreeId", "-1");
+                                        }
+                                        if(this.user.timeType.customDataActive && zhoD[j].customData){
+                                            formData.append('customData',zhoD[j].customData)
+                                        }else if(this.user.timeType.customDataActive){
+                                            formData.append('customData',0)
+                                        }
+                                        if(this.user.timeType.customTextActive && zhoD[j].customText){
+                                            formData.append('customText',zhoD[j].customText)
+                                        }else if(this.user.timeType.customTextActive){
+                                            formData.append('customText','-')
+                                        }
                                     }
                                 }
                             } else {
                                 for(var j in zhoD) {     
                                     if(j != 'zhoDataTime' && j != 'he' && zhoD[j].workingTime && zhoD[j].workingTime.length > 0 && zhoD[j].workingTime > 0 && zhoD[j].workingTime != null && zhoD[j].workingTime != 'null') {
                                         flgs = true
-                                        formData.append("degreeId", "-1");
+                                        // formData.append("degreeId", "-1");
                                         formData.append("id", '-1');
                                         for(var s in this.projectList) {
                                             if(j == this.projectList[s].projectName) {
@@ -4228,12 +4279,29 @@
                                         } else {
                                             formData.append("basecostId", 0);
                                         }
+                                        if(this.user.timeType.customDegreeActive && zhoD[j].degreeId){
+                                            formData.append('degreeId',zhoD[j].degreeId)
+                                        }else{
+                                            formData.append("degreeId", "-1");
+                                        }
+                                        if(this.user.timeType.customDataActive && zhoD[j].customData){
+                                            formData.append('customData',zhoD[j].customData)
+                                        }else if(this.user.timeType.customDataActive){
+                                            formData.append('customData',0)
+                                        }
+                                        if(this.user.timeType.customTextActive && zhoD[j].customText){
+                                            formData.append('customText',zhoD[j].customText)
+                                        }else if(this.user.timeType.customTextActive){
+                                            formData.append('customText','-')
+                                        }
                                     }
                                 }
                             }
                         }
-                    } 
+                    }
                     
+                    // 自定义维度
+
                     this.http.uploadFile( this.port.report.editPort, formData,
                         res => {
                             // this.listLoading = false;

+ 10 - 10
fhKeeper/formulahousekeeper/timesheet_h5/vue.config.js

@@ -3,17 +3,17 @@ const pxtorem = require("postcss-pxtorem");
 const path = require('path');
 const themePath = path.resolve(__dirname,'src/assets/style/theme.less');
 
-var ip = '192.168.2.15'
+// var ip = '192.168.2.2'
 // var ip = '127.0.0.1'
-// 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 = {
     // 关闭eslint检查