|
@@ -92,7 +92,12 @@
|
|
|
|
|
|
<!--导出报表条件选择 -->
|
|
|
<el-dialog :title="$t('timeReportExport')" v-if="exportDialog" :visible.sync="exportDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
|
- <el-form ref="form3" :model="exportParam" >
|
|
|
+ <el-form ref="form4" v-if="user.companyId == 10">
|
|
|
+ <el-form-item :label="this.$t('Selectmonth')" >
|
|
|
+ <el-date-picker size="small" v-model="exportParam.date" :editable="false" format="yyyy-MM" value-format="yyyy-MM" :clearable="false" type="month" :placeholder="$t('Selectmonth')" style="margin-right: 20px"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form ref="form3" :model="exportParam" v-else>
|
|
|
<el-form-item prop="projectCategoryId" :label="$t('projectclassification')" v-if="radio == $t('projectclassification')||radio==$t('other.project')">
|
|
|
<el-select v-model="exportParam.projectCategoryId" :placeholder="$t('classificationitems')" clearable style="width:350px;" filterable="true" @change="filterCategory">
|
|
|
<el-option v-for="item in categoryList" :key="item.id" :label="item.name" :value="item.id">
|
|
@@ -226,7 +231,7 @@
|
|
|
hasReportUserList:[],
|
|
|
projectList:[],
|
|
|
categoryList: [],
|
|
|
- exportParam:{projectId:null,dateRange:[],userId: null,type: '0', withPercent: false},
|
|
|
+ exportParam:{projectId:null,dateRange:[],userId: null,type: '0', withPercent: false, date: null},
|
|
|
exportDialog:false,
|
|
|
dateRange:[],
|
|
|
user: JSON.parse(sessionStorage.getItem("user")),
|
|
@@ -327,7 +332,6 @@
|
|
|
},
|
|
|
|
|
|
showExportDialog() {
|
|
|
- // console.log(12345)
|
|
|
// 清空选择的人
|
|
|
if(this.radio == this.$t('ren-yuan')) {
|
|
|
this.exportParam.userIds = new Array()
|
|
@@ -336,7 +340,10 @@
|
|
|
|
|
|
this.exportDialog = true;
|
|
|
this.exportParam.dateRange = this.dateRange;
|
|
|
- // console.log(this.hasReportUserList)
|
|
|
+ var array = this.exportParam.dateRange[0].split('-');
|
|
|
+ this.exportParam.date = array[0] + '-' + array[1];
|
|
|
+ console.log(this.exportParam.date)
|
|
|
+ this.$forceUpdate();
|
|
|
if (this.radio == this.$t('ren-yuan')) {
|
|
|
// this.exportParam.userIds = [];
|
|
|
}
|
|
@@ -406,6 +413,11 @@
|
|
|
if (this.exportParam.withPercent) {
|
|
|
param.withPercent = 1;
|
|
|
}
|
|
|
+ if (this.user.companyId == 10) {
|
|
|
+ param.date = this.exportParam.date;
|
|
|
+ url = '/project/exportTimeByProjectAndEmployee';
|
|
|
+ fileName = param.date + '月度工时成本统计表.xlsx';
|
|
|
+ }
|
|
|
}
|
|
|
if (this.radio == this.$t('ren-yuan') ) {
|
|
|
// console.log(this.exportParam.userIds);
|