Browse Source

2022.7.25

ggooalice 2 years ago
parent
commit
f06fef7abb

+ 19 - 11
fhKeeper/formulahousekeeper/timesheet/src/permissions.js

@@ -42,12 +42,16 @@ const StringUtil = {
         setFinanceAuditor: false, //设置财务审核人
 
         // 项目报表服务 // 
-        reportProject: false, // 项目报表 //
-        reportTask : false, // 项目任务报表 //
-        reportCostOf : false, // 项目成本报表 // 
-        reportBalance : false, // 项目收支平衡表 // 
+        reportProject: false, // 全部项目报表 //
+        reportAllTask : false, // 全部项目任务报表 //
+        reportTask : false, // 负责项目任务报表 //
+        reportAllCostOf : false, // 全部项目成本报表 // 
+        reportCostOf : false, // 负责项目成本报表 // 
+        reportAllBalance : false, // 全部项目收支平衡表 // 
+        reportBalance : false, // 负责项目收支平衡表 // 
         reportProfits : false, // 客户项目利润表 // 
-        reportPhase : false, // 项目阶段工时表 // 
+        reportAllPhase : false, // 全部项目阶段工时表 // 
+        reportPhase : false, // 负责项目阶段工时表 // 
         reportAllOvertime : false, // 全公司加班情况 //
         reportOvertime : false, // 负责部门加班情况 //
         reportCost: false, // 查看加班成本 //
@@ -57,7 +61,7 @@ const StringUtil = {
         reportTimeDivide: false, // 负责部门工时分配 //
         reportAllTimely: false, // 全公司填报及时率 //
         reportTimely: false, // 负责部门填报及时率 //
-        reportAuditRate: false, // 查看日报待审核统计 // 
+        reportAuditRate: false, // 日报待审核统计 // 
         reportPersonnel: false, // 全公司工时统计 //
         reportResponsible: false, // 负责部门工时统计 //
 
@@ -121,11 +125,15 @@ const StringUtil = {
         arr[i] == '薪资数据上传' ? obj.financialUpload = true : ''
         arr[i] == '薪资数据导出' ? obj.financialExport = true : ''
         arr[i] == '导出分摊数据' ? obj.financialShare = true : ''
-        arr[i] == '项目任务报表' ? obj.reportTask = true : ''
-        arr[i] == '项目成本报表' ? obj.reportCostOf = true : ''
-        arr[i] == '项目收支平衡表' ? obj.reportBalance = true : ''
+        arr[i] == '负责项目任务报表' ? obj.reportTask = true : ''
+        arr[i] == '全部项目任务报表' ? obj.reportAllTask = true : ''
+        arr[i] == '负责项目成本报表' ? obj.reportCostOf = true : ''
+        arr[i] == '全部项目成本报表' ? obj.reportAllCostOf = true : ''
+        arr[i] == '负责项目收支平衡表' ? obj.reportBalance = true : ''
+        arr[i] == '全部项目收支平衡表' ? obj.reportAllBalance = true : ''
         arr[i] == '客户项目利润表' ? obj.reportProfits = true : ''
-        arr[i] == '项目阶段工时表' ? obj.reportPhase = true : ''
+        arr[i] == '负责项目阶段工时表' ? obj.reportPhase = true : ''
+        arr[i] == '全部项目阶段工时表' ? obj.reportAllPhase = true : ''
         arr[i] == '全公司加班情况' ? obj.reportAllOvertime = true : ''
         arr[i] == '负责部门加班情况' ? obj.reportOvertime = true : ''
         arr[i] == '请假填报' ? obj.leaveFil = true : ''
@@ -157,7 +165,7 @@ const StringUtil = {
         arr[i] == '日报待审核统计' ? obj.reportAuditRate = true : ''
         arr[i] == '查看工时统计' ? obj.countHours = true : ''
         arr[i] == '查看成本统计' ? obj.countCost = true : ''
-        arr[i] == '项目报表' ? obj.reportProject = true : ''
+        arr[i] == '全部项目报表' ? obj.reportProject = true : ''
         arr[i] == '批量填报' ? obj.reportBatch = true : ''
         arr[i] == '项目阶段管理' ? obj.projectPhase = true : ''
         arr[i] == '全公司工时统计' ? obj.reportPersonnel = true : ''

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

@@ -93,6 +93,9 @@
                             <el-dropdown-item v-if="permissions.projectPhase && user.company.packageProject == 1">
                                 <el-link type="primary" :underline="false" @click="phaseProjectDialog = true">项目阶段管理</el-link>
                             </el-dropdown-item>
+                            <el-dropdown-item v-if="user.timeType.projectLevelState == 1">
+                                <el-link type="primary" :underline="false" @click="projectLevelDialog = true">项目级别管理</el-link>
+                            </el-dropdown-item>
                         </el-dropdown-menu>
                         </el-dropdown>
                 </el-form-item>
@@ -630,6 +633,43 @@
                 <el-button type="primary" @click="addPanthPro()" >新增项目阶段</el-button>
             </div>
         </el-dialog>
+
+        <!-- 项目级别管理 -->
+        <el-dialog title="项目级别管理" show-header="false" v-if="projectLevelDialog" :visible.sync="projectLevelDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
+            <el-table :data="levelList" highlight-current-row  height="400" style="width: 100%;">
+                <el-table-column type="index" width="60" label="序号">
+                    <template slot-scope="scope" >
+                            {{scope.$index+1+(page-1)*size}}
+                        </template>
+                </el-table-column>
+                <el-table-column prop="projectLevelName" label="级别名称" ></el-table-column>
+                <el-table-column label="操作" width="150">
+                    <template slot-scope="scope" >
+                        <el-button size="small" type="primary" @click="addProjectLevel(scope.row)">编辑</el-button>
+                        <el-button size="small" type="danger" @click="deleteProjectLevel(scope.row)">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <div slot="footer" class="dialog-footer">
+                <el-button type="primary" @click="projectLevelDialog = false" >关闭</el-button>
+                <el-button type="primary" @click="addProjectLevel()" >新增项目级别</el-button>
+            </div>
+        </el-dialog>
+
+        <!-- 新增/编辑项目级别 -->
+        <el-dialog title="新增/修改项目级别" v-if="addProjectLevelDialog" :visible.sync="addProjectLevelDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
+            <el-form ref="form2" :model="addLevelForm" :rules="rules" label-width="120px">
+                <el-form-item label="项目级别名称" prop="projectLevelName">
+                    <el-input v-model="addLevelForm.projectLevelName" placeholder="请输入名称" clearable></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click="addProjectLevelDialog = false">取消</el-button>
+                <el-button type="primary" @click="submitLevelPro" :loading="addLoading">提交</el-button>
+            </div>
+        </el-dialog>
+
+
         <!-- 新增/编辑 分类条目 -->
         <el-dialog title="新增/修改分类条目" v-if="addClfDialog" :visible.sync="addClfDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
             <el-form ref="form2" :model="addClf" :rules="rules" label-width="100px">
@@ -864,8 +904,10 @@ a {
             return {
                 addFlgmainProjectDialog: false,
                 addFlgPanthProjectDialog: false,
+                addProjectLevelDialog: false,
                 mainProjectList: [],
                 mainProjectDialog: false,
+                projectLevelDialog: false,
                 showImportResult: false,
                 importResultMsg:null,
                 isganttshow: false,
@@ -947,6 +989,7 @@ a {
                     name: [{ required: true, message: "请输入名称", trigger: "blur" }],
                     code: [{ required: true, message: "请输入编号", trigger: "blur" }],
                     projectStageName: [{ required: true, message: "请输入名称", trigger: "blur" }],
+                    projectLevelName: [{ required: true, message: "请输入名称", trigger: "blur" }],
                 },
                 ause: [],
                 auseList: [],
@@ -966,6 +1009,10 @@ a {
                     id: '',
                     projectStageName: ''
                 },
+                addLevelForm: {
+                    id: '',
+                    projectStageName: ''
+                },
                 statusClf:null,
                 permissionsObj: {},
 
@@ -997,6 +1044,7 @@ a {
                 listHeader: [], // 列表表头
                 rowid: '',
                 phaseProjectDialog: false, // 项目阶段
+                levelList: [],  // 项目级别
             };
         },
         // 过滤器
@@ -1063,6 +1111,66 @@ a {
                     });
                 });
             },
+            // 获取级别
+            getProjectLevel(){
+                this.http.post('/project-level/list', {},
+                res => {
+                    if (res.code == "ok") {
+                        this.levelList = res.data
+                        // this.$set(this, 'levelList', res.data)
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+            addProjectLevel(row){
+                this.addProjectLevelDialog = true
+                if(!row) {
+                    this.addLevelForm = {
+                        projectLevelName: '',
+                        id: ''
+                        // companyId:''
+                    }
+                } else {
+                    this.addLevelForm = {
+                        id: row.id,
+                        projectLevelName: row.projectLevelName
+                        // companyId: row.companyId
+                    }
+                }
+            },
+            submitLevelPro(){
+                this.http.post('/project-level/addOrMod',this.addLevelForm,
+                    res => {
+                        if (res.code == "ok") {
+                            this.addProjectLevelDialog = false;
+                            this.getProjectLevel()
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                        }
+                    );
+            },
+
+
             // 表格点击
             tableCellClassName({row, column, rowIndex, columnIndex}) {
                 row.index=rowIndex;
@@ -3190,6 +3298,9 @@ a {
             if(this.user.timeType.mainProjectState == 1){
                 this.getMainProject()
             }
+            if(this.user.timeType.projectLevelState == 1){
+                this.getProjectLevel()
+            }
 
             // 判断释放为专业版
             if(this.user.company.packageProject == 1) {

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

@@ -307,6 +307,13 @@
             <span v-if="timeType.needDeptAudit == 1" style="margin-left:10px;color:#999;">审核人为各部门直属领导</span>
         </div>
 
+        <!-- 是否开启项目级别管理 -->
+        <div class="yanjiu">
+            <p style="margin-left:10px;color:#666;">是否开启项目级别管理</p>
+            <el-switch style="margin-left: 55px" v-model="timeType.projectLevelState" active-color="#13ce66" inactive-color="#ff4949"> </el-switch>
+            <!-- <span v-if="timeType.needDeptAudit == 1" style="margin-left:10px;color:#999;">审核人为各部门直属领导</span> -->
+        </div>
+
         <!-- 是否开启主项目管理 -->
         <!-- <div class="yanjiu">
             <p style="margin-left:10px;color:#666;">是否开启主项目管理</p>
@@ -909,7 +916,7 @@
                         } else {
                             param.customTextActive = 0
                         }
-                        
+                        param.projectLevelState = param.projectLevelState ? 1 : 0
                         param.fillOvertime = param.fillOvertime ? 1 : 0
                         param.lockWorktime = param.lockWorktime ? 1 : 0
                         param.fillAhead = param.fillAhead ? 1 : 0
@@ -985,6 +992,7 @@
                             this.timeType.customDataStatus = this.timeType.customDataStatus ? true : false
                             this.timeType.fillAhead = this.timeType.fillAhead ? true : false
                             this.timeType.mainProjectState = this.timeType.mainProjectState ? true : false
+                            this.timeType.projectLevelState = this.timeType.projectLevelState ? true : false
                             this.timeChange();
                             let userlist = res.data.userList
                             this.whiteList = []