Min il y a 1 an
Parent
commit
ff12a53d5c

+ 101 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/GroupBudgetReviewController.java

@@ -0,0 +1,101 @@
+package com.management.platform.controller;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.management.platform.entity.*;
+import com.management.platform.mapper.ProjectMapper;
+import com.management.platform.mapper.TaskGroupMapper;
+import com.management.platform.mapper.UserMapper;
+import com.management.platform.service.GroupBudgetReviewService;
+import com.management.platform.util.HttpRespMsg;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-12-28
+ */
+@RestController
+@RequestMapping("/group-budget-review")
+public class GroupBudgetReviewController {
+
+    @Resource
+    private GroupBudgetReviewService groupBudgetReviewService;
+    @Resource
+    private HttpServletRequest request;
+    @Resource
+    private UserMapper userMapper;
+    @Resource
+    private TaskGroupMapper taskGroupMapper;
+    @Resource
+    private ProjectMapper projectMapper;
+
+    @RequestMapping("/add")
+    public HttpRespMsg add(Integer groupId,Integer oldManDay,Integer changeManDay,Integer nowManDay){
+        HttpRespMsg httpRespMsg=new HttpRespMsg();
+        if(changeManDay==null||changeManDay==0){
+            httpRespMsg.setError("预估工时未发生变更");
+            return httpRespMsg;
+        }
+        User user = userMapper.selectById(request.getHeader("token"));
+        GroupBudgetReview groupBudgetReview=new GroupBudgetReview();
+        TaskGroup taskGroup = taskGroupMapper.selectById(groupId);
+        Project project = projectMapper.selectById(taskGroup.getProjectId());
+        groupBudgetReview.setGroupId(groupId).setGroupName(taskGroup.getName())
+                .setOldManDay(oldManDay)
+                .setChangeManDay(changeManDay)
+                .setNowManDay(nowManDay)
+                .setCompanyId(user.getCompanyId())
+                .setProjectId(project.getId()).setProjectName(project.getProjectName())
+                .setCreatorId(user.getId())
+                .setCreator(user.getName());
+        if(!groupBudgetReviewService.save(groupBudgetReview)){
+            httpRespMsg.setError("验证失败");
+        }
+        return  httpRespMsg;
+    }
+
+    @RequestMapping("/check")
+    public HttpRespMsg check(Integer id,Integer checkType){
+        HttpRespMsg httpRespMsg=new HttpRespMsg();
+        GroupBudgetReview groupBudgetReview=groupBudgetReviewService.getById(id);
+        groupBudgetReview.setStatus(checkType);
+        if(checkType==1){
+            //审核通过计算到任务分组的项目人天
+            Integer groupId = groupBudgetReview.getGroupId();
+            TaskGroup taskGroup = taskGroupMapper.selectById(groupId);
+            Integer manDay = taskGroup.getManDay();
+            BigDecimal bigDecimal = new BigDecimal(manDay==null?0:manDay);
+            bigDecimal=bigDecimal.add(new BigDecimal(groupBudgetReview.getChangeManDay()==null?0:groupBudgetReview.getChangeManDay()));
+            taskGroup.setManDay(bigDecimal.intValue());
+            taskGroupMapper.updateById(taskGroup);
+        }
+        if(!groupBudgetReviewService.updateById(groupBudgetReview)){
+            httpRespMsg.setError("验证失败");
+        }
+        return  httpRespMsg;
+    }
+
+    @RequestMapping("/list")
+    public HttpRespMsg list(){
+        HttpRespMsg httpRespMsg=new HttpRespMsg();
+        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        List<GroupBudgetReview> list = groupBudgetReviewService.list(new LambdaQueryWrapper<GroupBudgetReview>().eq(GroupBudgetReview::getCompanyId, companyId));
+        httpRespMsg.setData(list);
+        return httpRespMsg;
+    }
+
+
+
+}
+

+ 105 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/GroupBudgetReview.java

@@ -0,0 +1,105 @@
+package com.management.platform.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-12-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class GroupBudgetReview extends Model<GroupBudgetReview> {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 分组id
+     */
+    @TableField("group_id")
+    private Integer groupId;
+
+    /**
+     * 变更前
+     */
+    @TableField("old_man_day")
+    private Integer oldManDay;
+
+    /**
+     * 变更值
+     */
+    @TableField("change_man_day")
+    private Integer changeManDay;
+
+    /**
+     * 变更后
+     */
+    @TableField("now_man_day")
+    private Integer nowManDay;
+
+    /**
+     * 0-待审核 1-审核通过 2-驳回
+     */
+    @TableField("status")
+    private Integer status;
+
+    @TableField("create_time")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private LocalDateTime createTime;
+
+    @TableField("company_id")
+    private Integer companyId;
+
+    /**
+     * 操作人id
+     */
+    @TableField("creator_id")
+    private String creatorId;
+
+    /**
+     * 任务名称
+     */
+    @TableField("group_name")
+    private String groupName;
+
+    /**
+     * 分组名称
+     */
+    @TableField("creator")
+    private String creator;
+
+    /**
+     * 项目id
+     */
+    @TableField("project_id")
+    private Integer projectId;
+
+    @TableField("project_name")
+    private String projectName;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/GroupBudgetReviewMapper.java

@@ -0,0 +1,16 @@
+package com.management.platform.mapper;
+
+import com.management.platform.entity.GroupBudgetReview;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-12-28
+ */
+public interface GroupBudgetReviewMapper extends BaseMapper<GroupBudgetReview> {
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/GroupBudgetReviewService.java

@@ -0,0 +1,16 @@
+package com.management.platform.service;
+
+import com.management.platform.entity.GroupBudgetReview;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-12-28
+ */
+public interface GroupBudgetReviewService extends IService<GroupBudgetReview> {
+
+}

+ 20 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/GroupBudgetReviewServiceImpl.java

@@ -0,0 +1,20 @@
+package com.management.platform.service.impl;
+
+import com.management.platform.entity.GroupBudgetReview;
+import com.management.platform.mapper.GroupBudgetReviewMapper;
+import com.management.platform.service.GroupBudgetReviewService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-12-28
+ */
+@Service
+public class GroupBudgetReviewServiceImpl extends ServiceImpl<GroupBudgetReviewMapper, GroupBudgetReview> implements GroupBudgetReviewService {
+
+}

+ 27 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/GroupBudgetReviewMapper.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.management.platform.mapper.GroupBudgetReviewMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.GroupBudgetReview">
+        <id column="id" property="id" />
+        <result column="group_id" property="groupId" />
+        <result column="old_man_day" property="oldManDay" />
+        <result column="change_man_day" property="changeManDay" />
+        <result column="now_man_day" property="nowManDay" />
+        <result column="status" property="status" />
+        <result column="create_time" property="createTime" />
+        <result column="company_id" property="companyId" />
+        <result column="creator_id" property="creatorId" />
+        <result column="group_name" property="groupName" />
+        <result column="creator" property="creator" />
+        <result column="project_id" property="projectId" />
+        <result column="project_name" property="projectName" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, group_id, old_man_day, change_man_day, now_man_day, status, create_time, company_id, creator_id, group_name, creator, project_id, project_name
+    </sql>
+
+</mapper>

+ 2 - 1
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -25,7 +25,8 @@
     "basicDataManagement": "基础数据管理",
     "basicSystemSettings": "系统基础设置",
     "roleRightsManagement": "角色权限管理",
-    "projectFormSettings": "项目表单设置"
+    "projectFormSettings": "项目表单设置",
+    "budgetReview":"预估工时审核"
   },
   "role": {
     "ordinaryEmployees": "普通员工",

+ 16 - 0
fhKeeper/formulahousekeeper/timesheet/src/routes.js

@@ -87,6 +87,9 @@ import provider from './views/provider/provider'
 // 项目表单设置
 import projectForm from './views/project/projectForm'
 
+// 预算工时审核
+import budgetReview from './views/project/budgetReview'
+
 Vue.use(Router)
 
 export const fixedRouter = [
@@ -289,6 +292,19 @@ export const allRouters = [//组织架构
         // 其他信息
         meta: { text: 'navigation.projectManagement' } 
     },
+    //预算工时审核
+    {
+        path: '/',
+        component: Home,
+        name: '预算工时审核',
+        iconCls: 'iconfont firerock-iconxiangmu',
+        leaf: true,
+        children: [
+            { path: '/budgetReview', component: budgetReview, name: '预估工时审核' },
+        ],
+        // 其他信息
+        meta: { text: 'navigation.budgetReview' } 
+    },
     {
         path: '/',
         component: Home,

+ 720 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/budgetReview.vue

@@ -0,0 +1,720 @@
+<template>
+    <section>
+        <!--列表-->
+        <el-table :data="list" ref="multipleTable" v-if="showTable" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;"
+             :default-expand-all="defaultExpandAllFlg" >
+            <el-table-column type="selection" width="55"></el-table-column>
+            <el-table-column type="expand" :label="''">
+                <!-- <template slot-scope="props">
+                    <el-timeline>
+                    
+                    </el-timeline>
+                </template> -->
+            </el-table-column>
+
+            <el-table-column prop="projectName" :label="'项目名称'" sortable>
+                <template slot-scope="scope">
+                    <div>
+                        <span>
+                            {{scope.row.projectName}}
+                        </span>
+                    </div>
+                </template>
+            </el-table-column>
+
+            <el-table-column prop="groupName" :label="'分组名称'" sortable>
+                <template slot-scope="scope">
+                    <div>
+                        <span>
+                            {{scope.row.groupName}}
+                        </span>
+                    </div>
+                </template>
+            </el-table-column>
+            
+            <el-table-column prop="creator" :label="'提交人'" sortable>
+                <template slot-scope="scope">
+                    <div>
+                        <span v-if="user.userNameNeedTranslate == '1'">
+                            <ww-open-data type='userName' :openid='scope.row.creator'></ww-open-data>
+                        </span>
+                        <span v-else>
+                            {{scope.row.creator}}
+                        </span>
+                    </div>
+                </template>
+            </el-table-column>
+
+            <el-table-column prop="createTime" :label="'提交时间'" sortable>
+                <template slot-scope="scope">
+                    <div>
+                        <span>
+                            {{scope.row.createTime}}
+                        </span>
+                    </div>
+                </template>
+            </el-table-column>
+            <el-table-column prop="oldManDay" :label="'变更前预估工时'" sortable>
+                <template slot-scope="scope">
+                    <div>
+                        <span>
+                            {{scope.row.oldManDay}}
+                        </span>
+                    </div>
+                </template>
+            </el-table-column>
+
+            <el-table-column prop="changeManDay" :label="'预估工时变更'" sortable>
+                <template slot-scope="scope">
+                    <div>
+                        <span>
+                            {{scope.row.changeManDay}}
+                        </span>
+                    </div>
+                </template>
+            </el-table-column>
+
+            <el-table-column prop="nowManDay" :label="'变更后预估工时'" sortable>
+                <template slot-scope="scope">
+                    <div>
+                        <span>
+                            {{scope.row.nowManDay}}
+                        </span>
+                    </div>
+                </template>
+            </el-table-column>
+            
+            <el-table-column prop="status" :label="$t('state.states')" sortable>
+                <template slot-scope="scope">
+                    <span v-if="scope.row.status == 0" style="color:#DAA520;">{{ '待审核'}}</span>
+                    <span v-else-if="scope.row.status == 1" style="color:#32CD32;">{{ $t('state.alreadyPassed') }}</span>
+                    <span v-else-if="scope.row.status == 2" style="color:#FF0000;">{{ $t('state.rejected') }}</span>
+                </template>
+            </el-table-column>
+            <el-table-column :label="$t('operation')" width="220">
+                <template slot-scope="scope">
+                    <el-button v-if="scope.row.status==0"  type="primary" :loading="logining" size="small" @click="review(scope.row.id,1)">{{ $t('btn.through') }}</el-button>
+                    <el-button v-if="scope.row.status==0"  type="danger" :loading="logining" size="small" @click="review(scope.row.id,2)">{{ $t('btn.rejected') }}</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+        <!--工具条-->
+        <!-- <el-col v-if="search.value != -1" :span="24" class="toolbar">
+            <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :page-sizes="[20 , 50 , 80 , 100]"
+                :page-size="20"
+                layout="total, sizes, prev, pager, next"
+                :total="total"
+                style="float:right;"
+            ></el-pagination>
+        </el-col> -->
+    </section>
+</template>
+
+<script>
+    import util from "../../common/js/util";
+
+    // 引入自定义组件
+    import selectCat from "@/components/select.vue"
+
+    // 引入自定义级联组件
+    import vueCascader from "@/components/cascader.vue"
+    import cascaderOption from "@/components/cascaderOption.vue"
+
+    export default {
+        components: {
+            selectCat,
+            vueCascader,
+            cascaderOption
+        },
+        data() {
+            return {
+                yuzhongCompId: 3385,
+                roleList:[{value: 1,label: 'CRC&LM'},{value: 2,label: 'PM'}],
+                batchDenyLoading: false,
+                batchDenyDialog: false,
+                batchDenyData: {ids:'',reason:''},
+                batchApproveLoading: false,
+                denyForm:null,
+                denyReasonDialog:false,
+                isAllSelect:false,
+                user: JSON.parse(sessionStorage.getItem("user")),
+                permissions: JSON.parse(sessionStorage.getItem("permissions")),
+                search: {
+                    projectId:null,
+                    departmentIdArray: null,
+                    departmentId:null,
+                    // date: null,
+                    startDate: null,
+                    endDate: null,
+                    state:0,
+                    userId: null,
+                    userIdArray: []
+                },
+
+                users: [],
+                option:[],
+                tableHeight: 0,
+                listLoading: false,
+                total: 0,
+                page: 1,
+                size: 20,
+                list: [],
+                logining: false,
+                multipleSelection: [],
+                usersList: [],
+                searchUsersList: [],
+                dataTime: [],
+                recordDialogVisible: false,
+                recordLists: [],
+                totals: 0,
+                pageIndexList: 1,
+                pageSizeList: 20,
+                undoForm: {
+                    // reason: '',
+                    // userId: '',
+                    // createDate: ''
+                },
+                undoFormDialog: false,
+                detailsDialog: false,
+                idx: 0, // 详情索引
+                detailsList: [],
+                undoFormLoading: false,
+
+                approveinData: null,
+                approveinDialog: false,
+                isbatch: false,
+                defaultExpandAllFlg: false,
+                showTable: true
+            };
+        },
+        filters: {
+            // 过滤
+            amounts(value) {
+                var zhi = +value + 0
+                return zhi.toFixed(1)
+            }
+        },
+        methods: {
+            viewOneReport(r) {
+                this.http.post("/report/getAuditWorkflowList", {reportId:r.id},
+                    res => {
+                        if (res.code == "ok") {
+                            this.$set(r,'auditorList', res.data);
+                        } 
+                    },
+                    error => {
+                        this.undoFormLoading = false
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
+            },
+            expandChange(row, expandedRows) {
+                var reportList = row.data;
+                for (var i=0;i<reportList.length; i++) {
+                    var r = reportList[i];
+                    if (r.auditorList) continue;
+                    this.http.post("/report/getAuditWorkflowList", {reportId:r.id},
+                    res => {
+                        if (res.code == "ok") {
+                            this.$set(r,'auditorList', res.data);
+                        } 
+                    },
+                    error => {
+                        this.undoFormLoading = false
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
+                }
+            },
+            detailsClick(item, i) {
+                this.detailsDialog = true
+                this.detailsList = item.membdateList
+                this.idx = i
+            },
+            // 审核记录撤销点击确定
+            clickCancel() {
+                this.undoFormLoading = true
+                this.http.post('/report/denyHisReport', this.undoForm,
+                res => {
+                    this.undoFormLoading = false
+                    if (res.code == "ok") {
+                        this.$message({
+                            message: this.$t('Revocationofsuccess'),
+                            type: "success"
+                        });
+                        this.undoFormDialog = false
+                        this.recordList()
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.undoFormLoading = false
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+            undoCli(item, i) {
+                // console.log(item)
+                this.undoFormDialog = true
+                this.undoForm = {reason: ''}
+                // this.undoForm.reason = ''
+                if(i){
+                    this.undoForm.hisId = item.id
+                }else{
+                    this.undoForm.hisId = item.membdateList[0].id
+                }
+                
+                this.ioss = i
+                // if(i == 0) {    
+                //     this.undoForm.createDate = item.indate.split(' ')[0]
+                //     this.undoForm.userId = item.userId
+                // } else {
+                //     this.undoForm.hisId = item.id
+                // }
+            },
+            // 获取审核记录
+            recordList() {
+                // this.recordDialogVisible = true
+                // return
+                this.http.post( '/report-audit-log/getProjectReportAuditLog', {
+                    companyId: this.user.companyId,
+                    pageIndex: this.pageIndexList,
+                    pageSize: this.pageSizeList
+                },
+                res => {
+                    if (res.code == "ok") {
+                        for (var i in res.data.records) {
+                            res.data.records[i].result.indexOf(this.$t('btn.through')) == '-1' ? res.data.records[i].flg = false : res.data.records[i].flg = true
+                        }
+                        this.recordLists = res.data.records
+                        this.totals = res.data.total
+                        if(this.recordLists.length != 0){
+                            this.detailsList = this.recordLists[this.idx].membdateList
+                        }
+                        
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+            // 获取部门列表
+            getDepartment() {
+                this.http.post( this.port.manage.depList, {},
+                res => {
+                    if (res.code == "ok") {
+                        var list1 = JSON.parse(JSON.stringify(res.data));
+                        
+                        this.option = this.changeArr(list1);
+                        console.log(this.option, '部门')
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            batchApprove(isPass) {
+                var ids = '';
+                for (var i=0;i<this.multipleSelection.length; i++) {
+                    var line = this.multipleSelection[i];
+                    var array = line.data;
+                    if (this.user.company.companyName == '成都明夷电子科技有限公司') {
+                        ids += line.reportIds+',';
+                    } else {
+                        for (var m=0;m<array.length; m++) {
+                            ids += array[m].id+',';
+                        }
+                    }
+                }
+                if (ids.length > 0) {
+                    ids = ids.substring(0, ids.length-1);
+                }
+                //等待
+                if(isPass){
+                    this.isbatch = true
+                    this.approveinData = {
+                        ids: ids
+                    }
+                    if(this.user.timeType.needEvaluate == 1){
+                        this.$set(this.approveinData,'evaluate','')
+                        this.approveinDialog = true
+                    }else{
+                        this.batchApproveLoading = true
+                        this.listLoading = true;
+                        this.batchApproveinfun()
+                    }
+                }else{
+                    this.batchDenyDialog = true
+                    this.batchDenyData.ids = ids
+                    this.batchDenyData.reason = ''
+                }
+            },
+            batchApproveinfun(){
+                this.http.post('/report/batchApproveReport', this.approveinData,
+                    res => {
+                        this.batchApproveLoading = false
+                        this.listLoading = false;
+                        if (res.code == "ok") {
+                            this.approveinDialog = false
+                            this.getList();
+                        } else {
+                            this.$message({
+                            message: res.msg,
+                            type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.listLoading = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
+            },
+            batchDenyClick(){
+                this.batchDenyLoading = true
+                    this.listLoading = true;
+                    this.http.post('/report/batchDenyReport', this.batchDenyData,
+                    res => {
+                        this.batchDenyLoading = false;
+                        this.batchDenyDialog = false
+                        this.listLoading = false;
+                        if (res.code == "ok") {
+                            this.getList();
+                        } else {
+                            this.$message({
+                            message: res.msg,
+                            type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.listLoading = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
+            },
+            //分页
+            handleCurrentChange(val) {
+                this.page = val;
+                this.getList();
+            },
+
+            handleSizeChange(val) {
+                this.size = val;
+                this.getList();
+            },
+
+            //分页
+            handleCurrentChangeList(val) {
+                this.pageIndexList = val;
+                this.recordList();
+            },
+
+            handleSizeChangeList(val) {
+                this.pageSizeList = val;
+                this.recordList();
+            },
+
+            test(){
+                console.log(this.search.userId);
+            },
+            searchUserIds(deptId){
+                this.searchUsersList = this.usersList.filter(item => deptId == item.departmentId)
+            },
+            usersSearch(e){
+                if(e == false){
+                    this.getList()
+                }
+            },
+            //获取待审核的数据列表
+            getList(e) {
+                this.listLoading = true;
+                this.http.post("/group-budget-review/list",{},
+                res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        this.list = res.data;
+                    } else {
+                        this.$message({
+                        message: res.msg,
+                        type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            review(id,checkType){
+                this.http.post("/group-budget-review/check", {id:id,checkType:checkType},
+                res => {
+                    if (res.code == "ok") {
+                        this.$message({
+                            message:"操作成功",
+                            type: "success"
+                        });
+                        this.getList();
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            approveinfun(){
+                this.http.post(this.port.report.approve, this.approveinData,
+                res => {
+                    this.logining = false;
+                    if (res.code == "ok") {
+                        this.approveinDialog = false
+                        this.$message({
+                            message: this.$t('message.Reviewsucceeded'),
+                            type: "success"
+                        });
+                        this.getList();
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.logining = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+// 修改数组
+            changeArr(arr) {
+                for (var i = 0; i < arr.length; i++) {
+                    if(arr[i].id != -1 && arr[i].id != 0) {
+                        if (arr[i].children != null && arr[i].children.length>0) {
+                            arr[i].children = this.changeArr(arr[i].children);
+                        }
+                        arr[i].id && (arr[i].value = arr[i].id);
+                        delete arr[i].id;
+                    }
+                }
+                for(var i in arr) {
+                    if(arr[i].id == -1 || arr[i].id == 0) {
+                        arr.splice(i,1)
+                    }    
+                }
+                return arr;
+            },
+            
+            //获取项目列表
+            getProjectList() {
+                this.http.post( this.port.project.list, {},
+                res => {
+                    if (res.code == "ok") {
+                        this.projectList = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+            showDenyDialog(id,i, date, item) {
+                this.denyReasonDialog = true;
+                var ids = '';
+                if (this.user.company.companyName == '成都明夷电子科技有限公司') {
+                    ids = item.reportIds;
+                } else {
+                    var data = item.data;
+                    data.forEach(element => {
+                        ids +=(element.id+',');
+                    });
+                }
+                
+                this.denyForm = {id: id ,i:i, date: date, reportIds: ids, reason:null};
+            },
+
+            // 未通过日报
+            deny() {
+                this.logining = true;
+                this.http.post( this.port.report.deny, this.denyForm,
+                res => {
+                    this.logining = false;
+                    if (res.code == "ok") {
+                        this.$message({
+                            message: this.denyForm.i==0?this.$t('message.rejectedsuccessfully'):this.$t('Revocationofsuccess'),
+                            type: "success"
+                        });
+                        this.getList();
+                        this.denyReasonDialog = false;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.logining = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+            // 获取所有人员
+            getUsers() {
+                // this.http.post(this.port.manage.list, {
+                //     departmentId: -1,
+                //     pageIndex: 1,
+                //     // pageSize: 99999
+                //     pageSize: -1
+                // },
+                this.http.post('/user/getSimpleActiveUserList', {},
+                res => {
+                    if (res.code == "ok") {
+                        this.usersList = res.data;
+                        this.searchUsersList = this.usersList
+                    } else {
+                        this.$message({
+                        message: res.msg,
+                        type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+            // 选择日期后触发
+            dataTimes() {
+                // console.log(this.dataTime)
+                if(this.dataTime){
+                    this.search.startDate = this.dataTime[0]
+                    this.search.endDate = this.dataTime[1]
+                }else{
+                    this.search.startDate = null
+                    this.search.endDate = null
+                }
+                this.getList()
+            },
+            // 自定义部门选择
+            vueCasader(obj) {
+                console.log(obj, '组件传过来的')
+                if(obj.distinction == '1') {
+                    if(obj.id != '') {
+                        let arr = []
+                        arr.push(obj.id)
+                        this.search.departmentIdArray = arr
+                    } else {
+                        this.search.departmentIdArray = []
+                    }
+                    this.getList(1)
+                }
+            },
+            selectCal(obj) {
+                console.log(obj, '过来的数据')
+                // search.userIdArray
+                let userListId = obj.arrUserList
+                let arr = []
+                for(var i in userListId) {
+                    arr.push(userListId[i].id)
+                }
+                this.search.userIdArray = arr
+                console.log(this.search.userIdArray, '数据看看')
+                this.usersSearch(false)
+            },
+            defaultExpandAllFlgCli() {
+                this.defaultExpandAllFlg = !this.defaultExpandAllFlg
+                this.list = JSON.parse(JSON.stringify(this.list))
+                this.$nextTick(()=>{this.$refs.multipleTable.doLayout()})
+                this.showTable = false
+                this.$nextTick(() => {
+                    this.showTable = true
+                })
+            }
+        },
+        created() {
+            let height = window.innerHeight;
+            this.tableHeight = height - 125;
+            const that = this;
+            window.onresize = function temp() {
+                that.tableHeight = window.innerHeight - 125;
+            };
+        },
+        mounted() {
+            this.getList();
+            // this.getDepartment();
+            // this.getProjectList();
+            // this.getUsers()
+        }
+    };
+</script>
+
+<style lang="scss">
+.propsbtn {
+    display: inline-block;
+    padding-left: 20px;
+}
+
+</style>

+ 64 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -1146,13 +1146,13 @@
             </div>
         </el-dialog>
         
-        <el-dialog title="设置分组预估工时" v-if="modGroupManDayDialog" :visible.sync="modGroupManDayDialog" :close-on-click-modal="false" customClass="customWidth" width="450px">
+        <el-dialog title="设置分组预估工时" v-if="modGroupManDayDialog" :visible.sync="modGroupManDayDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
             <el-table :data="groupList" size="small" :key="Math.random()" :height="'400px'" show-summary="true">
                 <el-table-column prop="name" label="分组名称">
                 </el-table-column>
                 <el-table-column prop="manDay" width="200" label="预估工时" >
                     <template slot-scope="scope">
-                        <el-input v-model="scope.row.manDay" type="number"  :placeholder="$t('peaseenterthe')" maxlength="10" :max="99999" style="width:120px;"></el-input>&nbsp;人天
+                        <el-input v-model="scope.row.manDay" type="number"  :placeholder="$t('peaseenterthe')" maxlength="10" :max="99999" style="width:120px;"></el-input>&nbsp;人天&nbsp;<i @click="changeBudget(scope.row)"  class="el-icon-circle-plus-outline"></i>
                     </template>
                 </el-table-column>
             </el-table>
@@ -1161,6 +1161,20 @@
                 <el-button type="primary" @click="setManDayData()" style="width:100%;" >{{ $t('save') }}</el-button>
             </div>
         </el-dialog>
+
+        <el-dialog title="预估工时变更" v-if="changeBudgetDig" :visible.sync="changeBudgetDig" :close-on-click-modal="false" customClass="customWidth" width="500px">
+            <el-form :model="groupBudgetData" label-width="120px">
+                <el-form-item :label="'原预估工时'"><span>{{groupBudgetData.manDay}}{{ '人天' }}</span></el-form-item>
+                <el-form-item :label="'预估工时修改'" prop="changeManDay">
+                   <el-input v-model="groupBudgetData.changeManDay" type="number" @change="changeNowManDay(groupBudgetData)" :placeholder="$t('peaseenterthe')" maxlength="10" :max="99999" style="width:120px;"></el-input>&nbsp;人天
+                </el-form-item>
+                <el-form-item :label="'变更后预估工时'"><span>{{nowManDay}}{{'人天'}}</span></el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click.native="changeBudgetDig = false">{{ $t('btn.cancel') }}</el-button>
+                <el-button type="primary" @click="changeBudgetTrue(groupBudgetData)" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
+            </div>
+        </el-dialog>
         <el-dialog :title="$t('addtemplate')" v-if="addToTmpDialog" :visible.sync="addToTmpDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
             <el-form ref="formTmp" :model="templateForm" :rules="rules" style="margin-top:10px;">
                     <el-form-item prop="name">
@@ -1497,7 +1511,11 @@
                 wxFilterText: '',
 
                 filterNodeFlag: false,
-                filterNodePersonnel: []
+                filterNodePersonnel: [],
+
+                changeBudgetDig:false,
+                groupBudgetData:{},
+                nowManDay:0
             };
             
         },
@@ -2900,6 +2918,49 @@
                     });
                 });
             },
+            //预估工时变更
+            changeBudget(task){
+                this.changeBudgetDig=true,
+                this.groupBudgetData=task,
+                this.nowManDay=(this.groupBudgetData.changeManDay==null?0:parseInt(this.groupBudgetData.changeManDay))+(this.groupBudgetData.manDay==null?0:parseInt(this.groupBudgetData.manDay))
+            },
+            //预估工时变更
+            changeNowManDay(task){
+                console.log(task)
+                this.nowManDay=(this.groupBudgetData.changeManDay==null?0:parseInt(this.groupBudgetData.changeManDay))+(this.groupBudgetData.manDay==null?0:parseInt(this.groupBudgetData.manDay))
+            },
+            changeBudgetTrue(groupBudgetData){
+                let param;
+                if(groupBudgetData){
+                    param={
+                        groupId:groupBudgetData.id,
+                        oldManDay:groupBudgetData.manDay,
+                        changeManDay:groupBudgetData.changeManDay,
+                        nowManDay:this.nowManDay,
+                    }
+                }
+                this.http.post('/group-budget-review/add',param,
+                res => {
+                    if (res.code == "ok") {
+                        this.$message({
+                        message: "操作成功",
+                        type: "success"
+                        });
+                        this.changeBudgetDig=false
+                    } else {
+                        this.$message({
+                        message: res.msg,
+                        type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
             addTask(stage) {
                 this.mileageCup = false
                 this.addFormVisible = true;