QuYueTing 1 day ago
parent
commit
4444dca82e

+ 6 - 6
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -44,7 +44,7 @@
                         <el-button @click="backToParentDept" size="small">返回上级</el-button>
                     </div>
 
-                    <template v-if="singleChoiceType == '工单'">
+                    <template v-if="singleChoiceType == '工单' || singleChoiceType == namess">
                         <el-cascader v-model="departmentValue" :options="departmentList" :props="{ checkStrictly: true, value: 'id' }" clearable filterable size="small" placeholder="请选择部门" @change="filterConditionSwitching"></el-cascader>
                     </template>
 
@@ -99,7 +99,7 @@
 
         <!-- 报表导出 -->
         <cost-report-export v-model="reportExportVisable" ref="reportExportDisRef" :singleChoiceType="singleChoiceType"
-            :hasReportUserList="hasReportUserList" :chartDate="chartDate" :theCustomListId="theCustomListId"
+            :hasReportUserList="hasReportUserList" :chartDate="chartDate" :theCustomListId="theCustomListId" :namess="namess"
             :theCustomListPlant="theCustomListPlant"></cost-report-export>
     </div>
 </template>
@@ -230,7 +230,7 @@ export default {
                 },
                 [this.namess]: {
                     url: '/project/getDegreeCost',
-                    extraParams: { projectId: this.chartProjectId }
+                    extraParams: { projectId: this.chartProjectId,departmentId: this.departmentValue[this.departmentValue.length - 1]  }
                 }
             };
 
@@ -293,7 +293,7 @@ export default {
             // additionName // 未转译的数据另外存储一份,用作 DOM 上渲染
             if (userNameNeedTranslate == 1) {
                 for (var i in costList) {
-                    costList[i].additionName = data.costList[i].departmentName
+                    costList[i].additionName = costList[i].departmentName
                 }
             }
 
@@ -1143,9 +1143,9 @@ export default {
             this.scrollFunction()
         }, 300)
 
-        if(this.user.companyId == '7536') {
+        // if(this.user.companyId == '7536') {
             this.obtainDepartment()
-        }
+        // }
     }
 }
 </script>

+ 8 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/costReportExport.vue

@@ -3,7 +3,7 @@
     :before-close="handleClose">
     <el-form ref="exportFormRef" :model="exportParam">
       <!-- 头部 -->
-      <div style="text-align: center;margin-bottom: 20px" v-if="singleChoiceType != '设备'">
+      <div style="text-align: center;margin-bottom: 20px" v-if="singleChoiceType != '设备' && singleChoiceType != namess">
         <el-radio-group size="medium" v-model="exportParam.reportType">
           <el-radio-button :label="0">常规报表</el-radio-button>
           <el-radio-button :label="1">月度报表</el-radio-button>
@@ -38,7 +38,7 @@
             </el-select>
           </el-form-item>
 
-          <el-form-item :label="$t('departmentchoice')" v-if="singleChoiceType == $t('other.project')">
+          <el-form-item :label="$t('departmentchoice')" v-if="singleChoiceType == $t('other.project') || singleChoiceType == namess">
             <el-cascader v-if="user.userNameNeedTranslate != 1" v-model="exportParam.deptId" :options="departmentList"
               :placeholder="$t('defaultText.pleaseChoose')" :props="{ checkStrictly: true, expandTrigger: 'hover' }"
               clearable filterable style="width:350px;"></el-cascader>
@@ -177,6 +177,10 @@ export default {
       type: String,
       default: '项目'
     },
+    namess: {
+      type: String,
+      default: '自定义列表'
+    },
     hasReportUserList: {
       type: Array,
       default: []
@@ -344,12 +348,14 @@ export default {
         param.exportContent = this.exportParam.exportContent
       }
 
+      console.log('222', this.namess)
       if (this.singleChoiceType == this.namess) {
         url = '/project/exportDegreeCost'
         param = {
           startDate: this.exportParam.dateRange[0],
           endDate: this.exportParam.dateRange[1],
           projectId: this.exportParam.projectId,
+          deptId: this.exportParam.deptId[0]
         }
         fileName = this.singleChoiceType + this.$t('chenBenTongJi') + '.xlsx'
       }

+ 18 - 6
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -88,7 +88,7 @@
                             <el-dropdown-item v-if="user.timeType.mainProjectState == 1">
                                 <el-link type="primary" :underline="false" @click="mainProjectDialog = true">{{ $t('masterprojectmanagement') }}</el-link>
                             </el-dropdown-item>
-                            <el-dropdown-item v-if="permissions.projectPhase && user.company.packageProject == 1">
+                            <el-dropdown-item v-if="permissions.projectPhase">
                                 <el-link type="primary" :underline="false" @click="phaseProjectDialog = true">{{ $t('projectstagemanagement') }}</el-link>
                             </el-dropdown-item>
                             <el-dropdown-item v-if="user.timeType.projectLevelState == 1">
@@ -206,7 +206,7 @@
             
             <!-- 项目阶段 -->
             <!-- 换位置之前看下项目阶段发起的请求  -->
-            <el-table-column prop="currentStage" :label="$t('projectphase')" sortable="custom" min-width="150" width="220" v-if="user.company.packageProject == 1">
+            <el-table-column prop="currentStage" :label="$t('projectphase')" sortable="custom" min-width="150" width="220" >
                 <template slot-scope="scope">
                     {{scope.row.currentStageId == null ? $t('nostage') : scope.row.currentStageName}}
                     <el-link v-if="(permissions.projectManagement || user.id==scope.row.inchargerId || user.id==scope.row.creatorId)" type="primary" :underline="false" @click="showChangeStageDialog(scope.row.id, scope.row.currentStageId)">
@@ -357,7 +357,7 @@
                         <el-dropdown-item><el-button type="text" @click="batchProjectTaskParticipant()">{{ $t('piLiangTianJiaRenWuChanYuRen') }}</el-button></el-dropdown-item>
                         <el-dropdown-item><el-button type="text" @click="addProPreson()">{{ $t('projectparticipantsinbatches') }}</el-button></el-dropdown-item>
                         <el-dropdown-item><el-button type="text" v-if="permissions.projectManagement" @click="batchIncharger()">{{ $t('projectmanagersinbatches') }}</el-button></el-dropdown-item>
-                        <el-dropdown-item><el-button type="text" v-if="user.company.packageProject" @click="batchProjectStage()">{{ $t('piLiangXiuGaiXiangMuJieDuan') }}</el-button></el-dropdown-item>
+                        <el-dropdown-item><el-button type="text" @click="batchProjectStage()">{{ $t('piLiangXiuGaiXiangMuJieDuan') }}</el-button></el-dropdown-item>
                         <el-dropdown-item><el-button type="text" v-if="user.roleName=($t('role.superAdministrator'))" @click="batchDelete()" :loading="isDeleting">{{ $t('Batchdelete') }}</el-button></el-dropdown-item>
                     </template>
                 </el-dropdown-menu>
@@ -420,6 +420,11 @@
                             </el-select>
                         </div>
                     </el-form-item>
+                    <el-form-item label="项目阶段"  prop="category">
+                        <el-select v-model="addForm.currentStageId"  style="width:32%;" filterable :disabled="canOnlyModParticipator">
+                            <el-option v-for="(item, index) in phaseList" :key="index" :label="item.projectStageName" :value="item.id"> </el-option>
+                        </el-select>
+                    </el-form-item>
                     <el-form-item :label="$t('subordinatedepartments')" :prop="false" v-if="user.timeType.projectWithDept">
                         <el-cascader v-model="addForm.deptId" :options="departmentList" :placeholder="$t('defaultText.pleaseChoose')" :disabled="canOnlyModParticipator"
                             :props="{ checkStrictly: true, expandTrigger: 'hover' }" clearable filterable @change="cascaderChange" style="width: 100%"
@@ -5177,7 +5182,9 @@ a {
                         manDayStartDate:item.manDayStartDate,
                         manDayDisable:item.manDay,
                         fromOutside:item.fromOutside,
-                        deptIds: (item.departmentList || []).map(item => item.departmentId)
+                        deptIds: (item.departmentList || []).map(item => item.departmentId),
+                        currentStageId: item.currentStageId, 
+                        currentStageName: item.currentStageName
                     }
                     for(var i in this.dataList) {
                         var str = 'plate' + (+i + 1)
@@ -5571,6 +5578,11 @@ a {
                         if((this.addForm.leaderId || []).length > 0) {
                             formData.append('leaderIds', this.addForm.leaderId);
                         }
+                        if (this.addForm.currentStageId) {
+                            formData.append('currentStageId', this.addForm.currentStageId);
+                            //设置名称
+                            formData.append('currentStageName', this.phaseList.filter(ph=>ph.id==this.addForm.currentStageId)[0].projectStageName);
+                        }
 
                         const deptListNew = this.addForm.deptIds.filter(item => item)
                         formData.append('deptIds', deptListNew.join(','))
@@ -6182,9 +6194,9 @@ a {
                 this.getSupplierList()
                 // this.getPhase()
             }
-            if(this.user.company.packageProject == 1) {
+            // if(this.user.company.packageProject == 1) {
                 this.obtainPhase()
-            }
+            // }
             // this.getSupplierList()
 
             if(this.user.timeType.mainProjectState == 1){