Explorar o código

2022.9.7 项目分组导出,填报时长上限调整

ggooalice %!s(int64=2) %!d(string=hai) anos
pai
achega
bf25d6ddae

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

@@ -88,6 +88,9 @@
                             <el-dropdown-item v-if="permissions.projectExport">
                                 <el-link type="primary" :underline="false" @click="exportProjectData" download="项目导出.xlsx">导出项目</el-link>
                             </el-dropdown-item>
+                            <el-dropdown-item v-if="permissions.projectExport">
+                                <el-link type="primary" :underline="false" @click="exportProjectGroup" download="项目分组导出.xlsx">导出项目分组</el-link>
+                            </el-dropdown-item>
                             <el-dropdown-item v-if="user.company.packageProject == 1 && permissions.projectCostOfItems">
                                 <el-link type="primary" :underline="false" @click="showBaseCostItemDialog">基线成本项</el-link>
                             </el-dropdown-item>
@@ -2090,6 +2093,27 @@ a {
                     }
                 );
             },
+            exportProjectGroup() {
+                //导出项目分组
+                this.http.post('project/exportGroupData',{},
+                res => {
+                    if (res.code == "ok") {
+                        var filePath = res.data;
+                        const a = document.createElement('a'); // 创建a标签
+                        a.setAttribute('download', '项目分组导出.xls');// download属性
+                        a.setAttribute('href', filePath);// href链接
+                        a.click(); //自执行点击事件
+                        a.remove();
+                    } 
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                    }
+                );
+            },
             userssHu() {
                 this.http.post('/time-type/getCompanyTimeSetting',{ 
                     companyId: this.user.companyId

+ 0 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -32,9 +32,7 @@
                     <el-aside :style="'overflow:auto;padding-left:10px;padding-right:5px;height:'+tableHeight+'px;width:'+groupWidth+'px;'">
                         <el-input v-model="groupSearch" size="small" placeholder="搜索分组" @input="startSearchGroup" style="margin-top:10px"/>
                         <p ><span class="heavyTxt">任务分组</span>
-                            <!-- <el-button size="mini">导出</el-button> -->
                             <i class="el-icon-plus pull-right" style="color:#666;margin-right:10px;" @click="createGroup" v-if="projectCreatorId == user.id || projectInchargerId == user.id || permissions.projectManagement"></i>
-                            <i class="iconfont firerock-icondaochu pull-right" style="font-size:14px"></i>
                         </p>
                         <el-menu :default-active="defaultGroupId" ref="defaultMenu"  class="el-menu-vertical-demo" @select="groupChange" style="border-right:none;">
                             <el-menu-item :index="item.id" v-for="item in groupList" :key="item.id"  class="group_style">

+ 22 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -18,7 +18,7 @@
             </el-form-item>    
             <el-form-item label="每日正常工作时长" prop="allday">
-                <el-select v-model="timeType.allday" placeholder="请选择工作时长" style="width:120px;" @change="timeChange">
+                <el-select v-model="timeType.allday" placeholder="请选择工作时长" style="width:120px;" @change="timeAlldayChange">
                     <el-option v-for="item in times" :key="item" :label="item.toFixed(1)" :value="item"></el-option>
                 </el-select>
                 小时
@@ -29,7 +29,9 @@
                     <i class="el-icon-question" style="color:#606266"></i>
                 </el-tooltip>
                 <span style="margin-left:25px">填报时长上限</span>
-                <el-input :disabled="timeType.lockWorktime" :min="timeType.allday" v-model="timeType.maxReportTime" type="number" style="width:120px;margin-left:10px"></el-input><span style="margin-left:5px;color:#409eff">小时</span>
+                <el-select :disabled="timeType.lockWorktime" v-model="timeType.maxReportTime" type="number" style="width:120px;margin-left:10px">
+                    <el-option v-for="item in maxReportTimeRange" :key="item" :label="item.toFixed(1)" :value="item"></el-option>
+                </el-select><span style="margin-left:5px;color:#409eff">小时</span>
                 </span>
                 
             </el-form-item><br>
@@ -488,6 +490,7 @@
                     children: 'children',
                     label: 'label'
                 },
+                maxReportTimeRange: []
             };
         },
         watch: {
@@ -496,8 +499,18 @@
             }
         },
         methods: {
+            timeAlldayChange(){
+                if(this.timeType.maxReportTime < this.timeType.allday || this.timeType.lockWorktime){
+                    this.timeType.maxReportTime = this.timeType.allday
+                }
+                this.maxReportTimeRange = []
+                for(let i=this.timeType.allday; i<=24; i+=0.5){
+                    this.maxReportTimeRange.push(i)
+                }
+                this.timeChange()
+            },
             lockChange(){
-                console.log('lockChange',this.timeType.maxReportTime);
+                // console.log('lockChange',this.timeType.maxReportTime);
                 if(this.timeType.lockWorktime){
                     this.timeType.maxReportTime = this.timeType.allday
                 }
@@ -1007,6 +1020,12 @@
                             this.timeType.customDataMaxValue = this.timeType.customDataMaxValue ? this.timeType.customDataMaxValue : 100
                             this.timeType.reportAutoApproveDays = this.timeType.reportAutoApproveDays ? this.timeType.reportAutoApproveDays : 1
                             this.timeChange();
+
+                            this.maxReportTimeRange = [] // 填报时长上限
+                            for(let i=this.timeType.allday; i<=24; i+=0.5){
+                                this.maxReportTimeRange.push(i)
+                            }
+
                             let userlist = res.data.userList
                             this.whiteList = []
                             for(let i in userlist){

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -518,7 +518,7 @@
                 domainItem.projectAuditorName = null;
                 domainItem.auditUserList = null;
                 //获取项目审核人
-                console.log(domainItem.projectId,this.project);
+                // console.log(domainItem.projectId,this.project);
                 var curProject = this.project.filter(p=>p.id == domainItem.projectId)[0];
                 if (curProject && this.user.timeType.reportAuditType == 0) {
                     this.getProjectAuditorList(domainItem, index);

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit.vue

@@ -432,7 +432,7 @@
                     this.currentForm.domains[0].basecostId = this.reportBasecostList[0].id;
                     this.currentForm.domains[0].basecostName = this.reportBasecostList[0].name;
                 }
-                console.log(this.form);
+                // console.log(this.form);
                 this.getKaoqin()
                 this.getWorkTime()
             },
@@ -1166,7 +1166,7 @@
                 // if (!this.canEdit) return;
                 // this.clickIndex = i;
                 // this.showPickerProject = true;
-                console.log(i, item, this.currentForm)
+                // console.log(i, item, this.currentForm)
                 this.proIdx = i
                 this.showPickerUserddp = true
                 // this.$router.push({