Bläddra i källkod

提交重置工时的弹窗和工时成本统计的项目状态

Lijy 3 veckor sedan
förälder
incheckning
89b1a0727f

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

@@ -238,7 +238,7 @@
             <div class="monthlyFinance">
               <div class="monthlyFinance-item">
                 <el-date-picker v-model="obtainMonthlyFinancialStatementsYmonth" type="month" placeholder="选择月" :clearable="false" @change="selcts()" size="small" value-format="yyyy-MM" style="width: 160px"></el-date-picker>
-                <el-button size="small" style="margin-left: 15px;" @click="getObtainMonthlyFinancialStatements(1)">重置工时</el-button>
+                <el-button size="small" style="margin-left: 15px;" @click="resetWorkingHours()">重置工时</el-button>
                 <el-tooltip class="item" effect="dark" placement="bottom">
                   <div slot="content">
                     以当月人工填报工时进行统计,公共工时自动分摊 <br/><br/>
@@ -4952,6 +4952,16 @@ export default {
         this.projectMainIdList = res.data || []
       })
     },
+    // 重置工时
+    resetWorkingHours() {
+      this.$confirm('确定重置工时吗?', '重置工时', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.getObtainMonthlyFinancialStatements(1)
+      })
+    },
     // 获取月度财务工时表
     getObtainMonthlyFinancialStatements(reGenerate = '') {
       this.obtainMonthlyFinancialStatementsLoading = true

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

@@ -43,6 +43,13 @@
                         <el-button @click="backToParentDept" size="small">返回上级</el-button>
                     </div>
 
+                    <el-select v-model="projectStatus" placeholder="请选择项目状态" clearable @change="filterConditionSwitching" v-if="singleChoiceType == '项目'" size="small" style="margin-right: 10px">
+                        <el-option label="进行中" value="1"></el-option>
+                        <el-option label="已完成" value="2"></el-option>
+                        <el-option label="已撤销" value="3"></el-option>
+                        <el-option label="暂停" value="4"></el-option>
+                    </el-select>
+
                     <select-project v-model="chartProjectId" :size="'small'" :placeholder="'请选择项目'" clearable
                         v-if="singleChoiceType == '项目' || singleChoiceType == '设备' || singleChoiceType == namess"
                         @change="filterConditionSwitching"></select-project>
@@ -141,6 +148,7 @@ export default {
             reportExportVisable: false,
             hasReportUserList: [],
             theCustomListFlgBtnLoading: false,
+            projectStatus: '',
         }
     },
 
@@ -188,7 +196,7 @@ export default {
             const urlMap = {
                 ['项目']: {
                     url: this.port.project.listCost,
-                    extraParams: { projectId: this.chartProjectId, type: this.chartYAxisVal[this.chartYAxis] }
+                    extraParams: { projectId: this.chartProjectId, type: this.chartYAxisVal[this.chartYAxis], status: this.projectStatus ? this.projectStatus : '0' }
                 },
                 ['主项目']: { url: '/project/getTimeCostByMainProject' },
                 ['项目分类']: { url: '/project/getTimeCostByCategory' },