Browse Source

2022.6.16

ggooalice 2 years ago
parent
commit
d24dcae881

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet/src/permissions.js

@@ -48,6 +48,7 @@ const StringUtil = {
         reportCost: false, // 查看加班成本 //
         reportCostWarning: false, // 工时成本预警表 //
         reportPhaseCost: false, // 查看阶段成本 //
+        reportTimeDivide: false, // 人员工时分配表 //
 
         // 请假模块
         leaveFil : false, // 请假填报 // 
@@ -131,6 +132,7 @@ const StringUtil = {
         arr[i] == '下拨成本预算' ? obj.projectAllocate = true : ''
         arr[i] == '工时成本预警表' ? obj.reportCostWarning = true : ''
         arr[i] == '查看阶段成本' ? obj.reportPhaseCost = true : ''
+        arr[i] == '查看人员工时分配' ? obj.reportTimeDivide = true : ''
     }
 
     return obj

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

@@ -20,7 +20,7 @@
                 <el-menu-item index="1-1" ><p @click="ssl(0)">项目报表</p></el-menu-item>
                 <el-menu-item index="1-2" v-if="permissions.reportTask"><p @click="ssl(1)">项目任务报表</p></el-menu-item>
                 <el-menu-item index="1-3" v-if="permissions.reportCostOf"><p @click="ssl(2)">项目成本报表</p></el-menu-item>
-                <el-menu-item index="1-9" v-if="permissions.reportCostWarning"><p @click="ssl(8)">人员工时分配表</p></el-menu-item>
+                <el-menu-item index="1-9" v-if="permissions.reportTimeDivide"><p @click="ssl(8)">人员工时分配表</p></el-menu-item>
                 <el-menu-item index="1-4" v-if="permissions.reportCostWarning"><p @click="ssl(7)">工时成本预警表</p></el-menu-item>
                 <el-menu-item index="1-5" v-if="permissions.reportBalance"><p @click="ssl(3)">项目收支平衡表</p></el-menu-item>
                 <el-menu-item index="1-6" v-if="user.company.packageCustomer == 1 && permissions.reportProfits"><p @click="ssl(4)">客户项目利润表</p></el-menu-item>
@@ -755,7 +755,7 @@ export default {
           
         });
 
-        console.log(sums, 123)
+        // console.log(sums, 123)
         this.$nextTick(()=>{ this.$refs.tab.doLayout()})
         return sums;
       },
@@ -962,7 +962,7 @@ export default {
         startDate: this.rangeDatas[0],
         endDate: this.rangeDatas[1],
       }
-      console.log(this.userId == false)
+      // console.log(this.userId == false)
       if(this.userId == '' || this.userId == null) {
         
       } else {
@@ -1069,7 +1069,7 @@ export default {
         res => {
             if (res.code == "ok") {
                 this.list5 = res.data.records;
-                console.log(this.list);
+                // console.log(this.list);
                 this.total = res.data.total;
                 this.stages = res.data.stages;
                 this.listLoading = false; 
@@ -1306,12 +1306,12 @@ export default {
        return  _this.gettime
     },
     selcts() {
-      console.log(this.customerId);
+      // console.log(this.customerId);
       this.getList()
     },
     // 成本查看明细
     costBtn(item) {
-      console.log(item, '明细')
+      // console.log(item, '明细')
       this.dialogVisibleDetails = true
       this.listLoading = true
       this.http.post('/project/getOvertimeDetail', {
@@ -1323,7 +1323,7 @@ export default {
       res => {
           this.listLoading = false
           if (res.code == "ok") {
-              console.log(res.data, '看看详情数据')
+              // console.log(res.data, '看看详情数据')
               this.detailsList = res.data
           } else {
               this.$message({

+ 12 - 12
fhKeeper/formulahousekeeper/timesheet/src/views/project/finance.vue

@@ -591,7 +591,7 @@ import { error } from 'dingtalk-jsapi';
         methods: {
             deleteSel(sel){
                 this.deleteSelList = sel
-                console.log(sel);
+                // console.log(sel);
             },
             deleteUsers(){
                 this.$confirm('是否确认删除?','提示',{
@@ -672,7 +672,7 @@ import { error } from 'dingtalk-jsapi';
                 },
                     res => {
                         if (res.code == "ok") {
-                            console.log(res.data, '数据')
+                            // console.log(res.data, '数据')
                             if(res.data) {
                                 this.reviewerRuleForm.auditorId = res.data.auditorId
                             } else {
@@ -791,7 +791,7 @@ import { error } from 'dingtalk-jsapi';
                             //上次如果没有配置过,需要初始化
                             for (var i=0;i<this.noReportUserList.length; i++) {
                                 var rUser = this.noReportUserList[i];
-                                console.log('userId====='+rUser.userId);
+                                // console.log('userId====='+rUser.userId);
                                 //检查当前列表中的无项目人员是否在之前的里面存在,如果不在需要加上去
                                 if (this.userCostSettingList.filter(c=>c.id == rUser.userId).length == 0) {
                                     var item = {name: rUser.name, id: rUser.userId};
@@ -941,7 +941,7 @@ import { error } from 'dingtalk-jsapi';
             downloadByA(row) {
                 const a = document.createElement('a'); // 创建a标签
                 a.setAttribute('download', row.name);// download属性
-                console.log(row.url);
+                // console.log(row.url);
                 a.setAttribute('href', row.url);// href链接
                 a.click();// 自执行点击事件
                 a.remove();
@@ -1030,7 +1030,7 @@ import { error } from 'dingtalk-jsapi';
                 this.http.post('/finance-tblcuscol/getAll', {companyId: this.user.companyId},
                     res => {
                         if (res.code == "ok") {
-                            console.log("获取自定义字段",res.data);
+                            // console.log("获取自定义字段",res.data);
                             this.customColsi = res.data;
                             this.tblCols = [];
                             this.tblCols.push(this.customColsi.monthCost);
@@ -1095,7 +1095,7 @@ import { error } from 'dingtalk-jsapi';
                             }
                         }
 
-                        console.log(res.data, '图表数据', this.widthHtval)
+                        // console.log(res.data, '图表数据', this.widthHtval)
 
                         var xList = [], yList = [], list = res.data.costList, 
                         
@@ -1295,7 +1295,7 @@ import { error } from 'dingtalk-jsapi';
                     // this.http.uploadFile('/finance/importData', formData,
                     this.http.uploadFile(urls, formData,
                     res => {
-                        console.log(this.user.timeType.financeAudit, '看看数据')
+                        // console.log(this.user.timeType.financeAudit, '看看数据')
                         this.$refs.upload.clearFiles();
                         this.listLoading = false;
                         this.isUploading = false;
@@ -1402,7 +1402,7 @@ import { error } from 'dingtalk-jsapi';
                 res => {
                     this.listLoading = false;
                     if (res.code == "ok") {
-                        console.log(res.data, '审核状态')
+                        // console.log(res.data, '审核状态')
                         if(res.data) {
                             if(res.data.state == '0') {
                                 this.revaelse = '待审核'
@@ -1444,7 +1444,7 @@ import { error } from 'dingtalk-jsapi';
                 },
                 res => {
                     if (res.code == "ok") {
-                       console.log(res.data, '拿到的数据')
+                    //    console.log(res.data, '拿到的数据')
                        this.ovReviewLis = res.data
                        if(this.tabPosition == 0) {
                            this.reviewLis = res.data.pendingList
@@ -1455,7 +1455,7 @@ import { error } from 'dingtalk-jsapi';
                        } else {
                            this.reviewLis = res.data.cancelList
                        }
-                       console.log(this.reviewLis, '数据')
+                    //    console.log(this.reviewLis, '数据')
                     } else {
                         this.$message({
                             message: res.msg,
@@ -1482,7 +1482,7 @@ import { error } from 'dingtalk-jsapi';
                 } else {
                     this.reviewLis = sss.cancelList
                 }
-                console.log(this.reviewLis, '数据')
+                // console.log(this.reviewLis, '数据')
             },
             // 审核操作
             operationList(zhi, id) {
@@ -1527,7 +1527,7 @@ import { error } from 'dingtalk-jsapi';
                 },
                 res => {
                     if (res.code == "ok") {
-                       console.log('123',res.data)
+                    //    console.log('123',res.data)
                        this.xzList = res.data.passList
                     } else {
                         this.$message({

+ 96 - 52
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -258,8 +258,8 @@
                     :options="option" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false"  clearable></el-cascader>
                 </el-form-item>
                 <el-form-item label="直属上级">
-                    <el-select v-model="insertForm.superiorId" placeholder="请选择角色" style="width: 100%" filterable>
-                        <el-option v-for="item in users" :label="item.name" :value="item.id" :key="item.id">
+                    <el-select v-model="insertForm.superiorId" placeholder="请选择" style="width: 100%" filterable clearable>
+                        <el-option v-for="item in users" :label="item.name" :value="item.id" :key="item.id" :disabled="item.id == insertForm.id">
                             <span style="float: left">{{item.name}}</span>
                             <span style="float: right; color: #8492a6; font-size: 13px">{{item.departmentName}}</span>
                         </el-option>
@@ -340,6 +340,14 @@
                     :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" 
                     clearable></el-cascader>
                 </el-form-item>
+                <el-form-item label="直属上级">
+                    <el-select v-model="insertForm.superiorId" placeholder="请选择" style="width: 100%" filterable clearable>
+                        <el-option v-for="item in users" :label="item.name" :value="item.id" :key="item.id" :disabled="item.id == insertForm.id">
+                            <span style="float: left">{{item.name}}</span>
+                            <span style="float: right; color: #8492a6; font-size: 13px">{{item.departmentName}}</span>
+                        </el-option>
+                    </el-select>
+                </el-form-item>
             </el-form>
             <span slot="footer" class="dialog-footer">
                 <el-button @click="dialogVisible1=false">取消</el-button>
@@ -468,8 +476,8 @@
             </div>
             <div slot="footer" class="dialog-footer">
                 <el-button type="primary" @click="customConfigDialog = false" >关闭</el-button>
-                <el-button type="primary" @click="customConfigListAdd" :disabled="customConfigList.length >= 5">新增</el-button>
-                <el-button type="primary" @click="customConfigListSave" >保存</el-button>
+                <!-- <el-button type="primary" @click="customConfigListAdd" :disabled="customConfigList.length >= 5">新增</el-button> -->
+                <el-button type="primary" @click="customConfigListSave" :loading="saveBtnLoading">保存</el-button>
                 
             </div>
 
@@ -691,7 +699,8 @@
                 tableLoading: false,
 
                 suoying: ['plate1','plate2','plate3','plate4','plate5'],
-                insertFormPlates: []
+                insertFormPlates: [],
+                saveBtnLoading: false
             };
         },
         filters: {
@@ -747,21 +756,21 @@
                         let lists = JSON.parse(JSON.stringify(res.data))
                         this.userCustomConfig = JSON.parse(JSON.stringify(res.data))
                         // let lists = res.data
-                        this.customConfigList = res.data
-                        // this.customConfigList = [
-                        //     { name: '', id: null, type: 1, companyId: null },
-                        //     { name: '', id: null, type: 1, companyId: null },
-                        //     { name: '', id: null, type: 1, companyId: null },
-                        //     { name: '', id: null, type: 1, companyId: null },
-                        //     { name: '', id: null, type: 1, companyId: null },
-                        // ]
-                        // for(let i in lists){
-                        //     this.$set(this.customConfigList[i],'name',lists[i].name)
-                        //     this.$set(this.customConfigList[i],'id',lists[i].id)
-                        //     this.$set(this.customConfigList[i],'type',lists[i].type)
-                        //     this.$set(this.customConfigList[i],'companyId',lists[i].companyId)
-                        // }
-                        console.log('customConfigList',this.customConfigList);
+                        // this.customConfigList = res.data
+                        this.customConfigList = [
+                            { name: '', id: null, type: 1, companyId: null },
+                            { name: '', id: null, type: 1, companyId: null },
+                            { name: '', id: null, type: 1, companyId: null },
+                            { name: '', id: null, type: 1, companyId: null },
+                            { name: '', id: null, type: 1, companyId: null },
+                        ]
+                        for(let i in lists){
+                            this.$set(this.customConfigList[i],'name',lists[i].name)
+                            this.$set(this.customConfigList[i],'id',lists[i].id)
+                            this.$set(this.customConfigList[i],'type',lists[i].type)
+                            this.$set(this.customConfigList[i],'companyId',lists[i].companyId)
+                        }
+                        // console.log('customConfigList',this.customConfigList);
                         this.cusItemTypes = []
                         for(let j in this.customConfigList){
                             if(this.customConfigList[j].type == null || this.customConfigList[j].type == 0){
@@ -793,30 +802,28 @@
                 // }
                 // jsonStr = jsonStr.substring(0,jsonStr.length - 1)
                 // let jsonStr = []
-                for(let i in this.customConfigList){
-                    let text = this.customConfigList[i].name.trim()
-                    if(!text){
-                        this.customConfigList.splice(i,1)
-                    }
-                }
+                this.saveBtnLoading = true
+                let parameter = this.customConfigList.filter(item => item.name.trim() != '')
                 
                 this.http.post('/user-custom/addOrMod',{
-                    json: JSON.stringify(this.customConfigList)
+                    json: JSON.stringify(parameter)
                 },res => {
                     if(res.code == 'ok'){
                         this.getCustomConfigList()
-                        this.customConfigDialog = false
+                        this.saveBtnLoading = false
                         this.$message({
                             message: '保存成功',
                             type: 'success'
                         })
                     }else {
+                        this.saveBtnLoading = false
                         this.$message({
                             message: res.msg,
                             type: 'error'
                         })
                     }
                 },err => {
+                    this.saveBtnLoading = false
                     this.$message({
                         message: err,
                         type: 'error'
@@ -946,8 +953,8 @@
                         }
                         this.$nextTick(()=>{
                             // let opt = this.users[0].plateMap[this.userCustomConfig[0].name]
-                            console.log('userCustomConfig',this.userCustomConfig);
-                            console.log('insertForm',this.insertForm);
+                            // console.log('userCustomConfig',this.userCustomConfig);
+                            // console.log('insertForm',this.insertForm);
                         })
                     }else {
                         this.$message({
@@ -962,12 +969,12 @@
                     })
                 })
             },
-            customConfigListAdd(){
-                this.customConfigList.push({
-                    name: '',
-                    type: 1
-                })
-            },
+            // customConfigListAdd(){
+            //     this.customConfigList.push({
+            //         name: '',
+            //         type: 1
+            //     })
+            // },
             // 批量修改部门
             handleSelectionZzjg(e){
                 // if (e.length == 0) {
@@ -1587,7 +1594,7 @@
                     this.title = "新增人员"
                     this.getUserCustomConfig()
                     // this.insertForm.plateMap['定义测试文本'] = '测试文本'
-                    console.log('insertForm123',this.insertForm);
+                    // console.log('insertForm',this.insertForm);
                 }
                 this.dialogVisible = true;
             },
@@ -1646,7 +1653,7 @@
                         //     }
                         // }
 
-                        console.log(form, 'form')
+                        // console.log(form, 'form')
                         
                         if (this.insertForm.id != null) {
                             form.id = this.insertForm.id;
@@ -1778,20 +1785,54 @@
                 for(var i in arr1) {
                     array1.push(parseInt(arr1[i]))
                 }
+                this.http.post('/user/getUserInfo', {
+                        userId: list1.id
+                    },
+                    res => {
+                        if (res.code == "ok") {
+                            this.insertForm = {
+                                id: res.data.id,
+                                name: res.data.name,
+                                phone: res.data.phone,
+                                roleId: res.data.roleId,
+                                monthCost:res.data.monthCost,
+                                cost: res.data.cost,
+                                departmentId: array1.reverse(),
+                                salaryType: res.data.salaryType,
+                                costApplyDate: res.data.costApplyDate,
+                                inductionDate: res.data.inductionDate,
+                                position: res.data.position,
+                                certJson: res.data.certList,
+                                plateMap: {},
+                                superiorId: res.data.superiorId,
+                            }
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }},
+                        error => {
+                                this.listLoading = false;
+                                this.$message({
+                                    message: error,
+                                    type: "error"
+                                });
+                            });
                 // console.log(list1)
-                this.insertForm = {
-                    id: list1.id,
-                    name: list1.name,
-                    phone: list1.phone,
-                    roleId: list1.roleId,
-                    monthCost:list1.monthCost,
-                    cost: list1.cost,
-                    departmentId: array1.reverse(),
-                    salaryType: list1.salaryType,
-                    name: list1.name,
-                    position: list1.position,
-                    certJson: list1.certJson
-                };
+                // this.insertForm = {
+                //     id: list1.id,
+                //     name: list1.name,
+                //     phone: list1.phone,
+                //     roleId: list1.roleId,
+                //     monthCost:list1.monthCost,
+                //     cost: list1.cost,
+                //     departmentId: array1.reverse(),
+                //     salaryType: list1.salaryType,
+                //     name: list1.name,
+                //     position: list1.position,
+                //     certJson: list1.certJson
+                // };
                 this.dialogVisible1 = true;
             },
 
@@ -1817,6 +1858,9 @@
                         if (this.insertForm.costApplyDate != null) {
                             form.costApplyDate = this.insertForm.costApplyDate;
                         }
+                        if (this.insertForm.superiorId){
+                            form.superiorId = this.insertForm.superiorId
+                        }
                     }
                 });
 
@@ -2238,7 +2282,7 @@
                         });
                     });
                 } else {
-                    console.log('error submit!!');
+                    // console.log('error submit!!');
                     return false;
                 }
                 });

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

@@ -76,7 +76,7 @@
                     <!--系统管理员和部门负责人 -->
                     <div class="report_title" >
                         
-                        <span>工作日报 </span>
+                        <span>工作日报 ({{curDate}})</span>
                         <span v-if="permissions.reportsCompany||user.manageDeptId != 0 || permissions.reportsDept">| {{depData != null ?depData.label:""}}
                         <span v-if="targetUid == null">
                          - 已填写
@@ -5101,7 +5101,7 @@
     color:red;
 }
 .waitSubmitStyle{
-    color: #999;
+    color: #409eff;
 }
 .chooseDate {
     .waiting {

+ 14 - 6
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue

@@ -223,7 +223,10 @@
                     <el-table-column prop="date" label="操作" width="100">
                         <template slot-scope="scope">
                             <div>
-                                <el-button type="warning" size="mini" v-if="scope.row.membdateList.length < 2 && scope.row.flg" @click="undoCli(scope.row, 0)">撤销</el-button>
+                                <template v-if="scope.row.membdateList.length < 2 && scope.row.flg">
+                                    <el-button type="warning" size="mini" v-if="scope.row.membdateList[0].state == 1" @click="undoCli(scope.row, 0)">撤销</el-button>
+                                    <el-link type="info" v-else :underline="false">{{scope.row.membdateList[0].state == 2 ? '已驳回' : '已撤销'}}</el-link>
+                                </template>
                                 <el-button size="mini" v-if="scope.row.membdateList.length >= 2 && scope.row.flg" @click="detailsClick(scope.row, scope.$index)">详情</el-button>
                             </div>
                         </template>
@@ -385,11 +388,16 @@
                 });
             },
             undoCli(item, i) {
-                console.log(item)
+                // console.log(item)
                 this.undoFormDialog = true
                 this.undoForm = {reason: ''}
                 // this.undoForm.reason = ''
-                this.undoForm.hisId = item.id
+                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]
@@ -533,7 +541,7 @@
                     this.listLoading = false;
                     if (res.code == "ok") {
                         this.list = res.data;
-                        console.log(this.port.report.portList);
+                        // console.log(this.port.report.portList);
                     } else {
                         this.$message({
                         message: res.msg,
@@ -552,7 +560,7 @@
 
             // 通过日报
             approve(id,date, item) {
-                console.log(item);
+                // console.log(item);
                 this.logining = true;
                 
                 var ids = '';
@@ -688,7 +696,7 @@
             },
             // 选择日期后触发
             dataTimes() {
-                console.log(this.dataTime)
+                // console.log(this.dataTime)
                 this.search.startDate = this.dataTime[0]
                 this.search.endDate = this.dataTime[1]
                 this.getList()