Pārlūkot izejas kodu

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper

zhouyy 1 mēnesi atpakaļ
vecāks
revīzija
c8eb4679a1
15 mainītis faili ar 500 papildinājumiem un 35 dzēšanām
  1. 9 5
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java
  2. 7 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Information.java
  3. 38 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/InformationServiceImpl.java
  4. 9 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java
  5. 3 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TaskServiceImpl.java
  6. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml
  7. 1 0
      fhKeeper/formulahousekeeper/ops-platform/src/main/java/com/management/platform/config/RefererInterceptor.java
  8. 9 14
      fhKeeper/formulahousekeeper/timesheet/src/components/taskComponent.vue
  9. 11 3
      fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue
  10. 8 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/gantt.vue
  11. 46 3
      fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue
  12. 5 0
      fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue
  13. 214 0
      fhKeeper/formulahousekeeper/timesheet/src/views/project/qrCodeManagement.vue
  14. 136 5
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue
  15. 3 0
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/dailyReportReview.vue

+ 9 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java

@@ -521,7 +521,9 @@ public class TaskController {
                 log.info("添加工作计划,给第一审核人发送信息提醒");
                 log.info("添加工作计划,给第一审核人发送信息提醒");
                 User owner = userMapper.selectById(task.getCheckFirstId());
                 User owner = userMapper.selectById(task.getCheckFirstId());
                 Information information = new Information();
                 Information information = new Information();
-                information.setMsg("您有工作计划待审核");
+                Project project = projectMapper.selectById(task.getProjectId());
+                information.setMsg(project.getProjectName()+"项目有新的预计FTE计划审批任务,请您查收.");
+                information.setTaskId(task.getId());
                 information.setType(11);
                 information.setType(11);
                 information.setUserId(owner.getId());
                 information.setUserId(owner.getId());
                 information.setTime(LocalDateTime.now());
                 information.setTime(LocalDateTime.now());
@@ -533,7 +535,9 @@ public class TaskController {
             if (isUpdate==1){
             if (isUpdate==1){
                 User owner = userMapper.selectById(task.getCheckSecondId());
                 User owner = userMapper.selectById(task.getCheckSecondId());
                 Information information = new Information();
                 Information information = new Information();
-                information.setMsg("您有工作计划待审核");
+                Project project = projectMapper.selectById(task.getProjectId());
+                information.setMsg(project.getProjectName()+"项目有新的预计FTE计划审批任务,请您查收.");
+                information.setTaskId(task.getId());
                 information.setType(11);
                 information.setType(11);
                 information.setUserId(owner.getId());
                 information.setUserId(owner.getId());
                 information.setTime(LocalDateTime.now());
                 information.setTime(LocalDateTime.now());
@@ -560,7 +564,9 @@ public class TaskController {
                 User owner = userMapper.selectById(task.getCheckFirstId());
                 User owner = userMapper.selectById(task.getCheckFirstId());
                 Information information = new Information();
                 Information information = new Information();
                 information.setType(11);
                 information.setType(11);
-                information.setMsg("您有工作计划待审核");
+                Project project = projectMapper.selectById(task.getProjectId());
+                information.setMsg(project.getProjectName()+"项目有新的预计FTE计划审批任务,请您查收.");
+                information.setTaskId(task.getId());
                 information.setUserId(owner.getId());
                 information.setUserId(owner.getId());
                 information.setTime(LocalDateTime.now());
                 information.setTime(LocalDateTime.now());
                 informationService.save(information);
                 informationService.save(information);
@@ -1043,7 +1049,6 @@ public class TaskController {
                     if(first.isPresent()){
                     if(first.isPresent()){
                         e.setServiceName(first.get().getServiceName());
                         e.setServiceName(first.get().getServiceName());
                         e.setServiceCode(first.get().getServiceCode());
                         e.setServiceCode(first.get().getServiceCode());
-                        e.setId(first.get().getId());
                     }
                     }
                 }
                 }
             });
             });
@@ -1054,7 +1059,6 @@ public class TaskController {
                     if(first.isPresent()){
                     if(first.isPresent()){
                         e.setServiceName(first.get().getServiceName());
                         e.setServiceName(first.get().getServiceName());
                         e.setServiceCode(first.get().getServiceCode());
                         e.setServiceCode(first.get().getServiceCode());
-                        e.setId(first.get().getId());
                     }
                     }
                 }
                 }
             });
             });

+ 7 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Information.java

@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import java.io.Serializable;
 import java.io.Serializable;
 
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.management.platform.entity.vo.GanttDataItem;
 import lombok.Data;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 import lombok.experimental.Accessors;
@@ -70,6 +71,12 @@ public class Information extends Model<Information> {
     @TableField("msg")
     @TableField("msg")
     private String msg;
     private String msg;
 
 
+    @TableField("task_id")
+    private Integer taskId;
+
+    @TableField(exist = false)
+    private GanttDataItem ganttData;
+
 
 
     @Override
     @Override
     protected Serializable pkVal() {
     protected Serializable pkVal() {

+ 38 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/InformationServiceImpl.java

@@ -3,18 +3,21 @@ package com.management.platform.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.management.platform.constant.Constant;
 import com.management.platform.entity.*;
 import com.management.platform.entity.*;
+import com.management.platform.entity.vo.GanttDataItem;
 import com.management.platform.mapper.InformationMapper;
 import com.management.platform.mapper.InformationMapper;
 import com.management.platform.mapper.UserMapper;
 import com.management.platform.mapper.UserMapper;
 import com.management.platform.mapper.WxCorpInfoMapper;
 import com.management.platform.mapper.WxCorpInfoMapper;
-import com.management.platform.service.CompanyDingdingService;
-import com.management.platform.service.InformationService;
+import com.management.platform.service.*;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.MessageUtils;
 import com.management.platform.util.MessageUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
+import java.time.format.DateTimeFormatter;
+import java.util.HashMap;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -41,12 +44,24 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
     private InformationService informationService;
     private InformationService informationService;
     @Resource
     @Resource
     private CompanyDingdingService companyDingdingService;
     private CompanyDingdingService companyDingdingService;
+    @Resource
+    private TaskService taskService;
+
+    @Resource
+    private ProjectLeaderService projectLeaderService;
+    @Resource
+    private ProjectService projectService;
 
 
     @Override
     @Override
     public HttpRespMsg getInformationList(HttpServletRequest request) {
     public HttpRespMsg getInformationList(HttpServletRequest request) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         try {
         try {
             User user = userMapper.selectById(request.getHeader("token"));
             User user = userMapper.selectById(request.getHeader("token"));
+
+            int countLeader = projectLeaderService.count(new QueryWrapper<ProjectLeader>().eq("leader_id", user.getId()).eq("company_id", user.getCompanyId()));
+            int countFirstCheck = projectService.count(new QueryWrapper<Project>().eq("incharger_id", user.getId()));
+            int countSecondCheck = taskService.count(new QueryWrapper<Task>().eq("check_second_id", user.getId()));
+
             List<Information> information = informationMapper.selectList(new QueryWrapper<Information>()
             List<Information> information = informationMapper.selectList(new QueryWrapper<Information>()
                     .eq("user_id", user.getId()).orderByDesc("time").last("LIMIT 20"));
                     .eq("user_id", user.getId()).orderByDesc("time").last("LIMIT 20"));
             WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id",user.getCompanyId()));
             WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id",user.getCompanyId()));
@@ -73,6 +88,27 @@ public class InformationServiceImpl extends ServiceImpl<InformationMapper, Infor
                     String newMsg = msg.replace(name, "$userName=" + userWxId + "$");
                     String newMsg = msg.replace(name, "$userName=" + userWxId + "$");
                     info.setMsg(newMsg);
                     info.setMsg(newMsg);
                 }
                 }
+                if (Constant.MLD_COMPANY_ID==user.getCompanyId()&&info.getTaskId()!=null){
+                    Task task = taskService.getById(info.getTaskId());
+                    GanttDataItem dataItem = new GanttDataItem();
+                    dataItem.setTaskStatus(task.getTaskStatus());
+
+                    if(countLeader>0){
+                        dataItem.setLeaderOrManager(1);
+                    } else if (countFirstCheck > 0 || countSecondCheck > 0) {
+                        dataItem.setLeaderOrManager(2);
+                    }
+                    dataItem.setCheckFirstId(task.getCheckFirstId());
+                    dataItem.setCheckSecondId(task.getCheckSecondId());
+                    dataItem.setObjType(2);
+                    dataItem.setIsTaskPlan(task.getIsTaskPlan());
+                    dataItem.setTaskPlan(task.getTaskPlan());
+
+                    DateTimeFormatter customFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+                    dataItem.setEnd_date(task.getEndDate()!=null ? task.getEndDate().format(customFormatter) : null);
+                    dataItem.setStart_date(task.getStartDate()!=null ? task.getStartDate().format(customFormatter) : null);
+                    info.setGanttData(dataItem);
+                }
             }
             }
             httpRespMsg.data = information;
             httpRespMsg.data = information;
         } catch (NullPointerException e) {
         } catch (NullPointerException e) {

+ 9 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.aliyun.dingtalkcontact_1_0.models.SearchUserResponse;
 import com.aliyun.dingtalkcontact_1_0.models.SearchUserResponse;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -2136,6 +2137,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     //httpRespMsg.setError("操作失败");
                     //httpRespMsg.setError("操作失败");
                     httpRespMsg.setError(MessageUtils.message("other.operationFail"));
                     httpRespMsg.setError(MessageUtils.message("other.operationFail"));
                 } else {
                 } else {
+                    if (Constant.MLD_COMPANY_ID==companyId){
+                        //项目经理换人,对应任务计划的第一审核人得换
+                        String inchargerId_old = oldProject.getInchargerId();
+                        if (!inchargerId.equals(inchargerId_old)){
+                            taskService.update(null,new UpdateWrapper<Task>().eq("project_id",oldProject.getId())
+                                    .eq("task_plan",1).set("check_first_id",inchargerId));
+                        }
+                    }
                     if (customerId == null) {
                     if (customerId == null) {
                         //去掉客户
                         //去掉客户
                         projectMapper.removeProjectCustomer(id);
                         projectMapper.removeProjectCustomer(id);

+ 3 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TaskServiceImpl.java

@@ -1078,7 +1078,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                 //给第二审核人发送信息提醒
                 //给第二审核人发送信息提醒
                 User owner = userMapper.selectById(task.getCheckSecondId());
                 User owner = userMapper.selectById(task.getCheckSecondId());
                 Information information = new Information();
                 Information information = new Information();
-                information.setMsg("您有工作计划待审核");
+                Project project = projectMapper.selectById(task.getProjectId());
+                information.setMsg(project.getProjectName()+"项目有新的预计FTE计划审批任务,请您查收.");
+                information.setTaskId(task.getId());
                 information.setUserId(owner.getId());
                 information.setUserId(owner.getId());
                 information.setType(11);
                 information.setType(11);
                 information.setTime(LocalDateTime.now());
                 information.setTime(LocalDateTime.now());

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml

@@ -642,7 +642,7 @@
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,
         , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,
         department.department_name as auditDeptName, a.is_dept_audit as isDeptAudit, a.project_audit_state as projectAuditState,task_group.name as groupName,a.group_id as groupId, a.custom_data as customData
         department.department_name as auditDeptName, a.is_dept_audit as isDeptAudit, a.project_audit_state as projectAuditState,task_group.name as groupName,a.group_id as groupId, a.custom_data as customData
         ,u.name as projectAuditorName, a.project_auditor_id as projectAuditorId, a.overtime_hours as overtimeHours, a.custom_text as customText, dept_manager.name as deptAuditorName
         ,u.name as projectAuditorName, a.project_auditor_id as projectAuditorId, a.overtime_hours as overtimeHours, a.custom_text as customText, dept_manager.name as deptAuditorName
-        ,a.group_audit_state as groupAuditState,a.batch_id as batchId,a.extra_field1 as extraField1,a.extra_field2 as extraField2,a.extra_field3 as extraField3, a.batch_id as batchId,a.sap_service_id as sapServiceId, multi_degr_id as multiDegrId, extra_field4 as extraField4,extra_field5 as extraField5
+        ,a.group_audit_state as groupAuditState,a.batch_id as batchId,a.extra_field1 as extraField1,a.extra_field2 as extraField2,a.extra_field3 as extraField3, a.batch_id as batchId,a.sap_service_id as sapServiceId, multi_degr_id as multiDegrId, a.extra_field4 as extraField4,a.extra_field5 as extraField5
         FROM report AS a
         FROM report AS a
         left join user on user.id = a.creator_id
         left join user on user.id = a.creator_id
         JOIN project AS b ON a.project_id=b.id
         JOIN project AS b ON a.project_id=b.id

+ 1 - 0
fhKeeper/formulahousekeeper/ops-platform/src/main/java/com/management/platform/config/RefererInterceptor.java

@@ -72,6 +72,7 @@ public class RefererInterceptor extends HandlerInterceptorAdapter {
                         }
                         }
                     }
                     }
                 }
                 }
+                LOGGER.warn("请求来源IP不在白名单中, refer host="+url.getHost());
                 return false;
                 return false;
             }
             }
         }
         }

+ 9 - 14
fhKeeper/formulahousekeeper/timesheet/src/components/taskComponent.vue

@@ -52,20 +52,15 @@
                 <el-form-item label="任务完成校验" v-if="user.timeType.taskFileCharge">
                 <el-form-item label="任务完成校验" v-if="user.timeType.taskFileCharge">
                     <el-checkbox v-model="addForm.attachFileRequired" >是否必须上传成果文件</el-checkbox>
                     <el-checkbox v-model="addForm.attachFileRequired" >是否必须上传成果文件</el-checkbox>
                 </el-form-item>
                 </el-form-item>
-                <el-form-item label="审核人" v-if="showMmeiLaiDe && user.roleId != 2283" prop="checkSecondId">
-                    <div class="customizedReviewer">
-                        <el-select v-model="addForm.checkFirstId" :disabled="true" size="small">
-                            <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
-                        </el-select>
-                        <div class="reviewImages"> 
-                            <img src="../assets/image/shenhejianto.png" alt="">
-                            <img src="../assets/image/shenhejianto.png" alt="">
-                        </div> 
-                        <el-select v-model="addForm.checkSecondId" :disabled="!addForm.checkFirstId || doYouWantToDisableAll" size="small">
-                            <el-option v-for="item in pmUserList" :key="item.id" :label="item.name" :value="item.id"></el-option>
-                        </el-select>
-                    </div>
-                    
+                <el-form-item label="第一审核人" v-if="showMmeiLaiDe" prop="checkSecondId">
+                    <el-select v-model="addForm.checkFirstId" :disabled="true" size="small">
+                        <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="第二审核人" v-if="showMmeiLaiDe" prop="checkSecondId">
+                    <el-select v-model="addForm.checkSecondId" :disabled="!addForm.checkFirstId || doYouWantToDisableAll" size="small">
+                        <el-option v-for="item in pmUserList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                    </el-select>
                 </el-form-item>
                 </el-form-item>
                 <el-form-item  :label="$t('taskdefinition')" prop="name">
                 <el-form-item  :label="$t('taskdefinition')" prop="name">
                     <el-input v-model="addForm.name" :maxlength="40" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" :placeholder="$t('enterthetaskcontent')" clearable></el-input>
                     <el-input v-model="addForm.name" :maxlength="40" :disabled="(this.addForm.id != null && user.id != this.addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !permissions.editAnyTask && !(groupResponsibleId == user.id)" :placeholder="$t('enterthetaskcontent')" clearable></el-input>

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

@@ -75,7 +75,7 @@
                     <el-table :data="popoverData" :height="tableHeight" size="small">
                     <el-table :data="popoverData" :height="tableHeight" size="small">
                         <el-table-column property="type" :label="$t('other.messageContent')" align="left">
                         <el-table-column property="type" :label="$t('other.messageContent')" align="left">
                             <template slot-scope="scope">
                             <template slot-scope="scope">
-                                <el-link type="primary" :underline="false" @click="locationHerf(scope.row.id,scope.row.content, scope.row.type)">
+                                <el-link type="primary" :underline="false" @click="locationHerf(scope.row.id, scope.row.content, scope.row.type, scope.row)">
                                     <span style="font-size:13px;">
                                     <span style="font-size:13px;">
                                         <span v-if="scope.row.msg == null">
                                         <span v-if="scope.row.msg == null">
                                             {{msgTypeTxt[scope.row.type]}}
                                             {{msgTypeTxt[scope.row.type]}}
@@ -716,7 +716,7 @@
             },
             },
 
 
             //点击消息的跳转
             //点击消息的跳转
-            locationHerf(id, date, type) {
+            locationHerf(id, date, type, row) {
                 this.http.post( this.port.manage.check, { id: id },
                 this.http.post( this.port.manage.check, { id: id },
                 res => {
                 res => {
                     if (res.code == "ok") {
                     if (res.code == "ok") {
@@ -772,7 +772,15 @@
                             this.$router.push("/projectInside/"+date);
                             this.$router.push("/projectInside/"+date);
                             this.drawer = false;
                             this.drawer = false;
                         } else if(type == 11) {
                         } else if(type == 11) {
-                            this.$router.push("/list");
+                            console.log(row, '<====== ganttData')
+                            const { taskId, ganttData } = row
+                            this.$router.push({
+                                path: '/list',
+                                query: { 
+                                    messageTaskId: taskId,
+                                    ganttData: JSON.stringify(ganttData || {}) 
+                                }
+                            });
                             this.drawer = false;
                             this.drawer = false;
                         }
                         }
                         
                         

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

@@ -60,6 +60,14 @@ export default {
   },
   },
 
 
   methods: {
   methods: {
+    detaliTaskExposure(row) {
+      const { taskId, ganttData } = row
+      this.title = '编辑计划'
+      this.showMmeiLaiDeData = JSON.parse(ganttData || '{}')
+      setTimeout(() => {
+        this.editTask({ taskId })
+      }, 1000)
+    },
     getDistanceToParent(element, parent) {
     getDistanceToParent(element, parent) {
       let distance = 0;
       let distance = 0;
       while (element && element !== parent) {
       while (element && element !== parent) {
@@ -141,7 +149,6 @@ export default {
               taskVue: data.projectId ? false : true,
               taskVue: data.projectId ? false : true,
               meetingId: this.addForm.meetingId
               meetingId: this.addForm.meetingId
             }
             }
-
             this.addFormVisible = true
             this.addFormVisible = true
           } else {
           } else {
             this.$message({ message: res.msg, type: "error" });
             this.$message({ message: res.msg, type: "error" });

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

@@ -76,6 +76,11 @@
                             <el-dropdown-item v-if="permissions.projectClassification">
                             <el-dropdown-item v-if="permissions.projectClassification">
                                 <el-link type="primary" :underline="false" @click="showClfDialog = true">{{ $t('classificationmanagement') }}</el-link>
                                 <el-link type="primary" :underline="false" @click="showClfDialog = true">{{ $t('classificationmanagement') }}</el-link>
                             </el-dropdown-item>
                             </el-dropdown-item>
+                            <el-dropdown-item v-if="user.companyId == '7536'">
+                                <el-link type="primary" :underline="false" @click="qrCodeClickEvent()">
+                                    二维码管理
+                                </el-link>
+                            </el-dropdown-item>
                             <el-dropdown-item v-if="user.timeType.mainProjectState == 1">
                             <el-dropdown-item v-if="user.timeType.mainProjectState == 1">
                                 <el-link type="primary" :underline="false" @click="mainProjectDialog = true">{{ $t('masterprojectmanagement') }}</el-link>
                                 <el-link type="primary" :underline="false" @click="mainProjectDialog = true">{{ $t('masterprojectmanagement') }}</el-link>
                             </el-dropdown-item>
                             </el-dropdown-item>
@@ -109,7 +114,7 @@
                         <el-link type="primary" :underline="false" @click="isganttshow = true">{{ $t('resourceallocation') }}</el-link>
                         <el-link type="primary" :underline="false" @click="isganttshow = true">{{ $t('resourceallocation') }}</el-link>
                     <!-- </router-link> -->
                     <!-- </router-link> -->
                     <el-dialog v-if="isganttshow" :visible.sync="isganttshow" width="90vw" top="3vh" style="height:96%" class="ganttdialog">
                     <el-dialog v-if="isganttshow" :visible.sync="isganttshow" width="90vw" top="3vh" style="height:96%" class="ganttdialog">
-                        <projectgantt></projectgantt>
+                        <projectgantt ref="projectganttRef"></projectgantt>
                     </el-dialog>
                     </el-dialog>
                 </el-form-item>
                 </el-form-item>
 
 
@@ -1754,6 +1759,13 @@
                 </el-link>
                 </el-link>
             </div>
             </div>
         </el-dialog>
         </el-dialog>
+
+        <!-- 二维码管理 -->
+        <el-dialog title="二维码管理" show-header="false" :visible.sync="qrCodeManagementVisable" top="60px" :close-on-click-modal="false" width="1200px">
+            <div>
+                <QrCodeManagement ref="qrCodeManagementRef"></QrCodeManagement>
+            </div>
+        </el-dialog>
         <!-- 选择人 -->
         <!-- 选择人 -->
         <DepartmentSelectionPersonnel :visible="batchProjectTaskParticipantVisible" @changeParticipant="changeTaskParticipantVisible" @submitParticipant="addProjectTaskParticipant"></DepartmentSelectionPersonnel>
         <DepartmentSelectionPersonnel :visible="batchProjectTaskParticipantVisible" @changeParticipant="changeTaskParticipantVisible" @submitParticipant="addProjectTaskParticipant"></DepartmentSelectionPersonnel>
     </section>
     </section>
@@ -1793,6 +1805,7 @@ a {
     import vueCascader from "@/components/cascader.vue"
     import vueCascader from "@/components/cascader.vue"
     import vueCascadeSelection from "@/components/cascadeSelection.vue"
     import vueCascadeSelection from "@/components/cascadeSelection.vue"
     import DepartmentSelectionPersonnel from "@/components/departmentSelectionPersonnel.vue"
     import DepartmentSelectionPersonnel from "@/components/departmentSelectionPersonnel.vue"
+    import QrCodeManagement from './qrCodeManagement.vue'
 
 
     // 尝试字段
     // 尝试字段
     import selectPersonnel from "@/components/selectPersonnel.vue"
     import selectPersonnel from "@/components/selectPersonnel.vue"
@@ -1803,7 +1816,8 @@ a {
             vueCascader,
             vueCascader,
             vueCascadeSelection,
             vueCascadeSelection,
             DepartmentSelectionPersonnel,
             DepartmentSelectionPersonnel,
-            selectPersonnel
+            selectPersonnel,
+            QrCodeManagement
         },
         },
         data() {
         data() {
             return {
             return {
@@ -2078,7 +2092,8 @@ a {
                 batchChangeStageDialogVisible: false,
                 batchChangeStageDialogVisible: false,
                 batchChangeStageLoading: false,
                 batchChangeStageLoading: false,
                 batchProjectTaskParticipantVisible: false,
                 batchProjectTaskParticipantVisible: false,
-                batchDepartment: []
+                batchDepartment: [],
+                qrCodeManagementVisable: false
             };
             };
         },
         },
         // 过滤器
         // 过滤器
@@ -2121,6 +2136,15 @@ a {
             },
             },
             filterText2(val) {
             filterText2(val) {
                 this.$refs.chooseMembTree2.filter(val);
                 this.$refs.chooseMembTree2.filter(val);
+            },
+            '$route'(to, from) {
+                if (to.path === '/list') {
+                    const { messageTaskId, ganttData } = to.query
+                    console.log(messageTaskId, ganttData, '<======== messageTaskId')
+                    if(messageTaskId && this.user.companyId == 876) {
+                        this.openTheReviewPopUpWindowSeparately(messageTaskId, ganttData)
+                    }
+                }
             }
             }
         },
         },
         updated () {
         updated () {
@@ -2130,6 +2154,19 @@ a {
             })
             })
         },
         },
         methods: {
         methods: {
+            openTheReviewPopUpWindowSeparately(taskId, ganttData) {
+                this.isganttshow = true
+                setTimeout(() => {
+                    console.log(this.$refs.projectganttRef, ',=========== this.$refs.projectganttRef')
+                    this.$refs.projectganttRef.parentLevelOpensPopUpWindowGantt({ taskId, ganttData })
+                }, 300)
+            },
+            qrCodeClickEvent() {
+                this.qrCodeManagementVisable = true
+                this.$nextTick(()=>{
+                    this.$refs.qrCodeManagementRef.resetData()
+                })
+            },
             addProjectTaskParticipant(userList) {
             addProjectTaskParticipant(userList) {
                 const userIds = userList.map(item => item.id).join(',')
                 const userIds = userList.map(item => item.id).join(',')
                 const projectIds = this.checkedProjectArr.map(a => a.id).join(',')
                 const projectIds = this.checkedProjectArr.map(a => a.id).join(',')
@@ -6277,6 +6314,12 @@ a {
             if (this.user.timeType.projectManDay == 1) {
             if (this.user.timeType.projectManDay == 1) {
                 this.getManDaySetting();
                 this.getManDaySetting();
             }
             }
+
+            const { messageTaskId, ganttData } = this.$route.query
+            if(this.user.companyId == 876 && messageTaskId) {
+                console.log(ganttData)
+                this.openTheReviewPopUpWindowSeparately(messageTaskId, ganttData)
+            }
         },
         },
     };
     };
 </script>
 </script>

+ 5 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue

@@ -242,6 +242,11 @@ export default {
     this.isDataLoaded = true
     this.isDataLoaded = true
   },
   },
   methods: {
   methods: {
+    parentLevelOpensPopUpWindowGantt(row) {
+      setTimeout(() => {
+        this.$refs.ganttTable1.detaliTaskExposure(row);
+      }, 1000)
+    },
     closeBounced(obj) {
     closeBounced(obj) {
       if(obj.submitInsert) {
       if(obj.submitInsert) {
         this.dateupdata()
         this.dateupdata()

+ 214 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/qrCodeManagement.vue

@@ -0,0 +1,214 @@
+<template>
+  <div class="qrCodeManagement">
+    <di class="qrCodeManagement-header">
+      <div class="header-filter">
+        <div>项目号:</div>
+        <el-input v-model="filterValForm.orderId" placeholder="请输入" size="small" style="width: 150px;"></el-input>
+      </div>
+      <div class="header-filter">
+        <div>项目名:</div>
+        <el-input v-model="filterValForm.projectId" placeholder="请输入" size="small" style="width: 150px;"></el-input>
+      </div>
+      <div class="header-filter">
+        <div>生产工单号:</div>
+        <el-input v-model="filterValForm.projectName" placeholder="请输入" size="small" style="width: 150px;"></el-input>
+      </div>
+      <div class="header-filter">
+        <div>行号:</div>
+        <el-input v-model="filterValForm.line" placeholder="请输入" size="small" style="width: 150px;"></el-input>
+      </div>
+      <div class="header-filter">
+        <div>生产工单日期:</div>
+        <el-date-picker v-model="filterValForm.relsDate" type="date" placeholder="选择日期" size="small"
+          style="width: 150px;" value-format="YYYY-MM-dd">
+        </el-date-picker>
+      </div>
+    </di>
+    <div class="qrCodeManagement-con">
+      <el-table :data="tableData" style="width: 100%;height: 100%" border @selection-change="handleSelectionChange" :loading="tableLoading">
+        <el-table-column type="selection" width="55" />
+        <el-table-column prop="orderId" label="项目号" />
+        <el-table-column prop="projectId" label="项目名" />
+        <el-table-column prop="projectName" label="生产工单号" />
+        <el-table-column prop="line" label="行号" />
+      </el-table>
+    </div>
+    <div class="qrCodeManagement-bon">
+      <el-button type="primary" size="small" :disabled="!multipleSelection.length" @click="exportQrCode()"
+        :loading="exportQrCodeLoading">导出二维码</el-button>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="pageIndex"
+        :page-sizes="[100, 200, 300, 400, 500]" :page-size="pageSize" layout="total, prev, pager, next, sizes, jumper"
+        :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+
+export default {
+  components: {},
+  data() {
+    return {
+      user: JSON.parse(sessionStorage.getItem("user")),
+      permissions: JSON.parse(sessionStorage.getItem("permissions")),
+      tableData: [],
+      multipleSelection: [],
+      filterValForm: {
+        orderId: '',
+        projectId: '',
+        projectName: '',
+        line: '',
+        relsDate: ''
+      },
+      pageIndex: 1,
+      pageSize: 100,
+      total: 0,
+      exportQrCodeLoading: false,
+      tableLoading: false,
+      debounceTimer: null,
+    };
+  },
+  watch: {
+    filterValForm: {
+      handler() {
+        this.debounceGeTableData();
+      },
+      deep: true
+    }
+  },
+  mounted() { },
+  methods: {
+    // 重置数据并加载
+    resetData() {
+      this.filterValForm = {
+        orderId: '',
+        projectId: '',
+        projectName: '',
+        line: '',
+        relsDate: ''
+      }
+      this.pageIndex = 1
+      this.pageSize = 100
+      this.debounceGeTableData()
+    },
+    exportQrCode() {
+      this.exportQrCodeLoading = true
+      this.postData('/qrCode/generateQRCodeByErpIds', {
+        erpIds: this.multipleSelection.map(item => item.id).join(',')
+      }).then(res => {
+        console.log('res', res)
+        this.$message({
+          message: '导出成功,下载中...',
+          type: 'success'
+        });
+        var filePath = res.data;
+        const a = document.createElement('a'); // 创建a标签
+        a.setAttribute('download', this.$t('projectexport') + '.xlsx');// download属性
+        a.setAttribute('href', filePath);// href链接
+        a.click(); //自执行点击事件
+        a.remove();
+      }).finally(() => {
+        this.exportQrCodeLoading = false
+      })
+    },
+    // 赛选条件改动执行
+    debounceGeTableData() {
+      clearTimeout(this.debounceTimer);
+      this.debounceTimer = setTimeout(() => {
+        this.geTableData();
+      }, 500);
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val
+    },
+    handleSizeChange(val) {
+      this.pageIndex = 1
+      this.pageSize = val
+      this.geTableData()
+    },
+    handleCurrentChange(val) {
+      this.pageIndex = val
+      this.geTableData()
+    },
+    geTableData() {
+      const filteredParams = {};
+      for (const key in this.filterValForm) {
+        const val = this.filterValForm[key];
+        if (val !== '' && val !== null && val !== undefined) {
+          filteredParams[key] = val;
+        }
+      }
+
+      this.tableLoading = true
+      this.postData('/erpOrderInfo/getInfoPage', {
+        pageIndex: this.pageIndex,
+        pageSize: this.pageSize,
+        ...this.filteredParams
+      }).then(res => {
+        console.log('res', res)
+        console.log(res.data.data, '<======= 数据')
+        this.tableData = res.data.data || []
+        this.total = res.data.total || 0
+      }).finally(() => {
+        this.tableLoading = false
+      })
+    },
+    async postData(urls, param) {
+      return new Promise((resolve, reject) => {
+        this.http.post(urls, { ...param },
+          res => {
+            if (res.code == 'ok') {
+              resolve(res)
+            } else {
+              this.$message({
+                message: res.msg,
+                type: 'error'
+              })
+              reject(res)
+            }
+            resolve(res)
+          },
+          error => {
+            this.$message({
+              message: error,
+              type: "error"
+            });
+            reject(error)
+          }
+        )
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.qrCodeManagement {
+  width: 100%;
+  height: 70vh;
+
+  .qrCodeManagement-header {
+    display: flex;
+    align-items: center;
+    height: 8%;
+
+    .header-filter {
+      display: flex;
+      align-items: center;
+      margin-left: 14px;
+    }
+  }
+
+  .qrCodeManagement-con {
+    height: 84%;
+  }
+
+  .qrCodeManagement-bon {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    height: 8%;
+  }
+}
+</style>

+ 136 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -283,6 +283,9 @@
                                                         {{$t('other.taskGroup')}}:{{item2.groupName}}
                                                         {{$t('other.taskGroup')}}:{{item2.groupName}}
                                                         <span v-if="item2.stage != null && item2.stage != '-' && user.companyId != yuzhongCompId && user.timeType.enableNewWeeklyfill != 1" style="margin-left:10px;">{{$t('other.inputStage')}}:{{item2.stage}}</span>
                                                         <span v-if="item2.stage != null && item2.stage != '-' && user.companyId != yuzhongCompId && user.timeType.enableNewWeeklyfill != 1" style="margin-left:10px;">{{$t('other.inputStage')}}:{{item2.stage}}</span>
                                                     </p>
                                                     </p>
+                                                    <!-- 工单号,行号 -->
+                                                    <p v-if="user.timeType.reportExtraField4Name">{{ user.timeType.reportExtraField4Name }}: {{ item2.extraField4 }}</p>
+                                                    <p v-if="user.timeType.reportExtraField5Name">{{ user.timeType.reportExtraField5Name }}: {{ item2.extraField5 }}</p>
                                                     <p v-if="user.timeType.customDegreeActive==1 && ((item2.degree_id != null && item2.degree_id != -1) || item2.multiDegrId)">{{user.timeType.customDegreeName}}:{{item2.degreeName}}</p>
                                                     <p v-if="user.timeType.customDegreeActive==1 && ((item2.degree_id != null && item2.degree_id != -1) || item2.multiDegrId)">{{user.timeType.customDegreeName}}:{{item2.degreeName}}</p>
                                                     <p v-if="user.timeType.customDataActive==1">{{user.timeType.customDataName}}:{{item2.customData}}</p>
                                                     <p v-if="user.timeType.customDataActive==1">{{user.timeType.customDataName}}:{{item2.customData}}</p>
                                                     <!-- 自定义日报文本 -->
                                                     <!-- 自定义日报文本 -->
@@ -333,7 +336,6 @@
                                                         </div>
                                                         </div>
                                                     </div>
                                                     </div>
                                                     <p v-if="item2.state == 1 && user.timeType.needEvaluate == 1">{{$t('other.evaluation')}}:<span v-html="item2.evaluate"></span></p>
                                                     <p v-if="item2.state == 1 && user.timeType.needEvaluate == 1">{{$t('other.evaluation')}}:<span v-html="item2.evaluate"></span></p>
-                                                    
                                                     <!--照片的显示 -->
                                                     <!--照片的显示 -->
                                                     <p v-if="item2.pics != null && item2.pics.length > 0"> 
                                                     <p v-if="item2.pics != null && item2.pics.length > 0"> 
                                                         <el-image v-for="(pic, index) in item2.pics" :key="index"
                                                         <el-image v-for="(pic, index) in item2.pics" :key="index"
@@ -604,6 +606,21 @@
                                 </el-select>
                                 </el-select>
                             </template>
                             </template>
                         </el-form-item>
                         </el-form-item>
+
+                        <!-- 工单号,行号 -->
+                        <el-form-item :label="user.timeType.reportExtraField4Name" v-if="user.timeType.reportExtraField4Name">
+                            <el-select v-model="domain.extraField4" placeholder="请选择" @change="onProgressChange" :disabled="!domain.canEdit" filterable clearable >
+                                <el-option v-for="lin in (domain.reportExtraField4List || [])" :key="lin" :label="lin" :value="lin">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item :label="user.timeType.reportExtraField5Name" v-if="user.timeType.reportExtraField5Name">
+                            <el-select v-model="domain.extraField5" placeholder="请选择" @change="onProgressChange" :disabled="!domain.canEdit" filterable clearable>
+                                <el-option v-for="lin in (domain.reportExtraField5List || [])" :key="lin" :label="lin" :value="lin">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+
                         <div v-if="user.timeType.reportAuditType != 1 && user.timeType.reportAuditType != 2 && user.timeType.reportAuditType != 3 && user.timeType.reportAuditType != 5 && user.timeType.reportAuditType != 9 && user.timeType.reportAuditType != 10 && domain.auditUserList">
                         <div v-if="user.timeType.reportAuditType != 1 && user.timeType.reportAuditType != 2 && user.timeType.reportAuditType != 3 && user.timeType.reportAuditType != 5 && user.timeType.reportAuditType != 9 && user.timeType.reportAuditType != 10 && domain.auditUserList">
                             <el-form-item v-if="user.timeType.reportAuditType != 3 && user.timeType.reportAuditType != 5 && domain.auditUserList.length > 0">
                             <el-form-item v-if="user.timeType.reportAuditType != 3 && user.timeType.reportAuditType != 5 && domain.auditUserList.length > 0">
                                 <template slot="label">
                                 <template slot="label">
@@ -1129,6 +1146,23 @@
                             <el-option v-for="item in zhoBao.stages" :key="item.id" :label="item.stagesName" :value="item.stagesName"></el-option>
                             <el-option v-for="item in zhoBao.stages" :key="item.id" :label="item.stagesName" :value="item.stagesName"></el-option>
                     </el-select>
                     </el-select>
                 </div>
                 </div>
+                <!-- 工单号,行号 -->
+                <div class="zhoFel" v-if="user.timeType.reportExtraField4Name">
+                    <p>{{ user.timeType.reportExtraField4Name }}</p>
+                    <el-select v-model="zhoBao.extraField4" placeholder="请选择" @change="onProgressChange"  filterable style="width: 355px" clearable>
+                        <el-option v-for="lin in (zhoBao.reportExtraField4List || [])" :key="lin" :label="lin" :value="lin">
+                        </el-option>
+                    </el-select>
+                </div>
+
+                <div class="zhoFel" v-if="user.timeType.reportExtraField5Name">
+                    <p>{{ user.timeType.reportExtraField5Name }}</p>
+                    <el-select v-model="zhoBao.extraField5" placeholder="请选择" @change="onProgressChange"  filterable style="width: 355px" clearable>
+                        <el-option v-for="lin in (zhoBao.reportExtraField5List || [])" :key="lin" :label="lin" :value="lin">
+                        </el-option>
+                    </el-select>
+                </div>
+
                 <div class="zhoFel" v-if="user.timeType.reportAuditType == 0 || user.timeType.reportAuditType == 4">
                 <div class="zhoFel" v-if="user.timeType.reportAuditType == 0 || user.timeType.reportAuditType == 4">
                     <p>{{$t('other.reviewer')}}</p>
                     <p>{{$t('other.reviewer')}}</p>
                     <el-select v-model="zhoBao.projectAuditorId" v-if="user.userNameNeedTranslate != 1" :placeholder="$t('defaultText.pleaseChoose')" clearable="true" style="width: 355px">
                     <el-select v-model="zhoBao.projectAuditorId" v-if="user.userNameNeedTranslate != 1" :placeholder="$t('defaultText.pleaseChoose')" clearable="true" style="width: 355px">
@@ -1715,7 +1749,7 @@
           <el-alert style="position:absolute;bottom:0;z-index:10;" v-if="isFlag" :title="$t('message.loading')+'...'" type="success" center :closable="false" show-icon></el-alert>
           <el-alert style="position:absolute;bottom:0;z-index:10;" v-if="isFlag" :title="$t('message.loading')+'...'" type="success" center :closable="false" show-icon></el-alert>
           <el-alert style="position:absolute;bottom:0;z-index:10;" v-if="isMore" :title="$t('message.noMoreData')" type="success" center show-icon></el-alert>
           <el-alert style="position:absolute;bottom:0;z-index:10;" v-if="isMore" :title="$t('message.noMoreData')" type="success" center show-icon></el-alert>
         </el-tab-pane>
         </el-tab-pane>
-        <el-tab-pane :label="$t('cardtimenotfull')" name="fourth" v-if="user.timeType.syncCorpwxTime==1">
+        <el-tab-pane :label="$t('cardtimenotfull')" name="fourth" v-if="user.timeType.syncCorpwxTime==1 || user.timeType.syncFanwei == 1">
           <div class="selectworktime_export" style="margin-top:10px">
           <div class="selectworktime_export" style="margin-top:10px">
             <div class="selectworktime_export_l">
             <div class="selectworktime_export_l">
               <el-date-picker
               <el-date-picker
@@ -2629,7 +2663,7 @@
                 reportLogCheckDialog:false,
                 reportLogCheckDialog:false,
                 deptIdForHasReport:[],
                 deptIdForHasReport:[],
                 transferWorkingHoursVisable: false,
                 transferWorkingHoursVisable: false,
-                multiOptionData:[],
+                multiOptionData:[]
             };
             };
         },
         },
         watch: {
         watch: {
@@ -4873,6 +4907,7 @@
                 if(this.yonghuUser.customDegreeActive == 1) {
                 if(this.yonghuUser.customDegreeActive == 1) {
                     this.selectDegreeId(domain, index)
                     this.selectDegreeId(domain, index)
                 }
                 }
+                
                 domain.projectName = this.fillProjectList.filter(p=>p.id == domain.projectId)[0].projectName;
                 domain.projectName = this.fillProjectList.filter(p=>p.id == domain.projectId)[0].projectName;
                 domain.isPublic = this.fillProjectList.filter(p=>p.id == domain.projectId)[0].isPublic;
                 domain.isPublic = this.fillProjectList.filter(p=>p.id == domain.projectId)[0].isPublic;
                 this.http.post('/sub-project/list',{
                 this.http.post('/sub-project/list',{
@@ -4886,7 +4921,7 @@
                         this.workForm.domains[index].subProjectList = res.data;
                         this.workForm.domains[index].subProjectList = res.data;
                         this.workForm.domains[index].subProjectId = null;
                         this.workForm.domains[index].subProjectId = null;
                         this.$forceUpdate();
                         this.$forceUpdate();
-                    } 
+                    }
                 },
                 },
                 error => {
                 error => {
                     this.$message({
                     this.$message({
@@ -4930,8 +4965,38 @@
                 if (this.user.companyId == this.yuzhongCompId) {
                 if (this.user.companyId == this.yuzhongCompId) {
                    this.updateResponse(domain);
                    this.updateResponse(domain);
                 }
                 }
-            },
 
 
+                const { reportExtraField4Name, reportExtraField5Name } = this.user.timeType
+                if(reportExtraField4Name || reportExtraField5Name) {
+                    this.getInfoByProjectId(domain, index)
+                }
+            },
+            getInfoByProjectId(domain, index, flag = true) {
+                const { projectId } = domain
+                const projectList = this.fillProjectList || this.subFillProjectList
+                const { projectCode = '' } = projectList.find(item => item.id == projectId)
+                this.http.post('/erpOrderInfo/getInfoByProjectId',{
+                    projectId: projectCode
+                },
+                res => {
+                    if (res.code == "ok") {
+                        if(flag) {
+                            this.workForm.domains[index].extraField4 = ''
+                            this.workForm.domains[index].extraField5 = ''
+                        }
+                        this.workForm.domains[index].reportExtraField4List = res.data.orderIds || []
+                        this.workForm.domains[index].reportExtraField5List = res.data.lines || []
+                        this.$forceUpdate();
+                    } 
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                    }
+                );
+            },
             getRecentTaskList(domain, index) {
             getRecentTaskList(domain, index) {
                 //刷新任务时,清空服务
                 //刷新任务时,清空服务
                 this.$set(domain, 'sapServiceId', null);
                 this.$set(domain, 'sapServiceId', null);
@@ -6356,6 +6421,7 @@
                             var arr = [];
                             var arr = [];
                             this.canEdit = false;
                             this.canEdit = false;
                             let candelete = true
                             let candelete = true
+                            const { reportExtraField4Name, reportExtraField5Name } = this.user.timeType
                             for(var i in list.report) {
                             for(var i in list.report) {
                                 var flg = null
                                 var flg = null
                                 list.report[i].isOvertime == 1 ? flg = true : flg = false
                                 list.report[i].isOvertime == 1 ? flg = true : flg = false
@@ -6406,6 +6472,8 @@
                                     extraField1: list.report[i].extraField1,
                                     extraField1: list.report[i].extraField1,
                                     extraField2: list.report[i].extraField2,
                                     extraField2: list.report[i].extraField2,
                                     extraField3: list.report[i].extraField3,
                                     extraField3: list.report[i].extraField3,
+                                    extraField4: list.report[i].extraField4,
+                                    extraField5: list.report[i].extraField5,
                                     workContentList: list.report[i].workContentList,
                                     workContentList: list.report[i].workContentList,
                                     filteredRespList: filteredRespList,
                                     filteredRespList: filteredRespList,
                                     serviceList: list.report[i].serviceList,
                                     serviceList: list.report[i].serviceList,
@@ -6440,6 +6508,9 @@
                                     arr[i].imgListUrl = arrList
                                     arr[i].imgListUrl = arrList
                                     arr[i].imgList = list.report[i].pics
                                     arr[i].imgList = list.report[i].pics
                                 }
                                 }
+                                if(reportExtraField4Name || reportExtraField5Name) {
+                                    this.getInfoByProjectId(copyData, i, false)
+                                }
                             }
                             }
                             this.reportCanDelete = candelete
                             this.reportCanDelete = candelete
                             this.workForm = {
                             this.workForm = {
@@ -6589,6 +6660,7 @@
 
 
             //按周填报的弹窗口中编辑单项目相关数据
             //按周填报的弹窗口中编辑单项目相关数据
             setWeekFormReportItem(reportId, i, names, row,sss) {
             setWeekFormReportItem(reportId, i, names, row,sss) {
+                const { reportExtraField4Name, reportExtraField5Name } = this.user.timeType
                 this.http.post('/report/getReportById', {
                 this.http.post('/report/getReportById', {
                     reportId: reportId
                     reportId: reportId
                 },
                 },
@@ -6605,6 +6677,10 @@
                         sss.degreeId = data.degreeId;
                         sss.degreeId = data.degreeId;
                         sss.customData = data.customData;
                         sss.customData = data.customData;
                         sss.wuduList = data.degreeList;
                         sss.wuduList = data.degreeList;
+                        if(reportExtraField4Name || reportExtraField5Name) {
+                            sss.extraField4 = data.extraField4 || ''
+                            sss.extraField5 = data.extraField5 || ''
+                        }
                         this.zhoBaoIdx = i
                         this.zhoBaoIdx = i
                         this.zhoBaoName = names
                         this.zhoBaoName = names
                         this.zhoBao = sss
                         this.zhoBao = sss
@@ -6613,6 +6689,9 @@
                             //最后一个参数表示是否保留stage的值,不要重置为空
                             //最后一个参数表示是否保留stage的值,不要重置为空
                             this.getGroupStages(this.zhoBao, 0, true)
                             this.getGroupStages(this.zhoBao, 0, true)
                         }
                         }
+                        if(reportExtraField4Name || reportExtraField5Name) {
+                            this.weekGetInfoByProjectId(sss)
+                        }
                         this.$forceUpdate();
                         this.$forceUpdate();
                     }
                     }
                 });
                 });
@@ -6710,6 +6789,7 @@
                     sss.basecostId = this.timeBasecostList[0].id;
                     sss.basecostId = this.timeBasecostList[0].id;
                 }
                 }
                 var hasEdited = this.zhoData[i][names].hasEdited;
                 var hasEdited = this.zhoData[i][names].hasEdited;
+
                 if (hasEdited) {
                 if (hasEdited) {
                     console.log('执行到了这个')
                     console.log('执行到了这个')
                     console.log('执行到了这个', { ...item }, obj)
                     console.log('执行到了这个', { ...item }, obj)
@@ -6776,8 +6856,36 @@
                         //编辑填报过的;数据库已经存在的
                         //编辑填报过的;数据库已经存在的
                         this.setWeekFormReportItem(sss.id, i, names, row, sss);
                         this.setWeekFormReportItem(sss.id, i, names, row, sss);
                     }
                     }
+
+                    if(this.user.timeType.reportExtraField4Name || this.user.timeType.reportExtraField5Name) {
+                        this.weekGetInfoByProjectId(sss)
+                    }
                 }
                 }
             },
             },
+            weekGetInfoByProjectId(item) {
+                console.log(item, '<=== item')
+                const { projectId } = item
+                const projectList = this.fillProjectList || this.subFillProjectList
+                const { projectCode = '' } = projectList.find(item => item.id == projectId)
+                this.http.post('/erpOrderInfo/getInfoByProjectId',{
+                    projectId: projectCode
+                },
+                res => {
+                    if (res.code == "ok") {
+                        this.zhoBao.reportExtraField4List = res.data.orderIds || []
+                        this.zhoBao.reportExtraField5List = res.data.lines || []
+                        this.$forceUpdate();
+                    } 
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+                // console.log(item)
+                // console.log(this.zhoBao)
+            },
             // 按周填报里内容的填写点击确定
             // 按周填报里内容的填写点击确定
             setWeekProItemData() {
             setWeekProItemData() {
                 //专业版模式下,任务分组和阶段必填
                 //专业版模式下,任务分组和阶段必填
@@ -7377,6 +7485,7 @@
             submitWeekReport(isDraft) {
             submitWeekReport(isDraft) {
                 var zhi = this.zhoData
                 var zhi = this.zhoData
                 var ll = 0
                 var ll = 0
+                const { reportExtraField4Name, reportExtraField5Name } = this.user.timeType
                 if(this.reportTimeType.type == 2) {
                 if(this.reportTimeType.type == 2) {
                     for(var i in zhi) {
                     for(var i in zhi) {
                         this.dateAr = []
                         this.dateAr = []
@@ -7556,6 +7665,11 @@
                                     }else if(this.user.timeType.customTextActive){
                                     }else if(this.user.timeType.customTextActive){
                                         formData.append('customText','-')
                                         formData.append('customText','-')
                                     }
                                     }
+
+                                    if(reportExtraField4Name || reportExtraField5Name) {
+                                        formData.append('extraField4', zhoD[j].extraField4 || '')
+                                        formData.append('extraField5', zhoD[j].extraField5 || '')
+                                    }
                                 }
                                 }
                             }
                             }
                         }
                         }
@@ -7646,6 +7760,11 @@
                                         }else if(this.user.timeType.customTextActive){
                                         }else if(this.user.timeType.customTextActive){
                                             formData.append('customText','-')
                                             formData.append('customText','-')
                                         }
                                         }
+
+                                        if(reportExtraField4Name || reportExtraField5Name) {
+                                            formData.append('extraField4', zhoD[j].extraField4 || '')
+                                            formData.append('extraField5', zhoD[j].extraField5 || '')
+                                        }
                                     }
                                     }
                                 }
                                 }
                             } else {
                             } else {
@@ -7738,6 +7857,11 @@
                                         }else if(this.user.timeType.customTextActive){
                                         }else if(this.user.timeType.customTextActive){
                                             formData.append('customText','-')
                                             formData.append('customText','-')
                                         }
                                         }
+
+                                        if(reportExtraField4Name || reportExtraField5Name) {
+                                            formData.append('extraField4', zhoD[j].extraField4 || '')
+                                            formData.append('extraField5', zhoD[j].extraField5 || '')
+                                        }
                                     }
                                     }
                                 }
                                 }
                             }
                             }
@@ -8622,6 +8746,13 @@
                             if(this.user.timeType.userWithMultiDept == 1) {
                             if(this.user.timeType.userWithMultiDept == 1) {
                                 formData.append('reportTargetDeptId', this.workForm.domains[i].reportTargetDeptId||-1);
                                 formData.append('reportTargetDeptId', this.workForm.domains[i].reportTargetDeptId||-1);
                             }
                             }
+
+                            if(this.user.timeType.reportExtraField4Name) {
+                                formData.append('extraField4', this.workForm.domains[i].extraField4 || '');
+                            }
+                            if(this.user.timeType.reportExtraField5Name) {
+                                formData.append('extraField5', this.workForm.domains[i].extraField5 || '');
+                            }
                         }
                         }
                         this.submitingReport = true;
                         this.submitingReport = true;
                         this.http.uploadFile( this.port.report.editPort, formData,
                         this.http.uploadFile( this.port.report.editPort, formData,

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/dailyReportReview.vue

@@ -160,6 +160,9 @@
                                       <!-- 阶段 -->
                                       <!-- 阶段 -->
                                       <span v-if="item.stage != null && user.companyId != yuzhongCompId" style="margin-left:10px;"> {{$t('other.inputStage')}}:{{item.stage}}</span>
                                       <span v-if="item.stage != null && user.companyId != yuzhongCompId" style="margin-left:10px;"> {{$t('other.inputStage')}}:{{item.stage}}</span>
                                   </p>
                                   </p>
+                                  <!-- 工单号,行号 -->
+                                  <p v-if="user.timeType.reportExtraField4Name">{{ user.timeType.reportExtraField4Name }}: {{ item.extraField4 }}</p>
+                                  <p v-if="user.timeType.reportExtraField5Name">{{ user.timeType.reportExtraField5Name }}: {{ item.extraField5 }}</p>
                                   <p v-if="user.company.companyName == '成都明夷电子科技有限公司'">
                                   <p v-if="user.company.companyName == '成都明夷电子科技有限公司'">
                                       <span>{{ $t('lable.percentageOfTime') }} :{{ item.progress }}%</span>
                                       <span>{{ $t('lable.percentageOfTime') }} :{{ item.progress }}%</span>
                                   </p>
                                   </p>