|
@@ -54,7 +54,7 @@
|
|
|
<div class="contents" v-if="allWrong">
|
|
|
<div class="headine headConCon" ref="headine" :style="'width:'+(windowWidth - 400)+'px'">
|
|
|
<h3 ref="headHe" style="padding-left: 10px;float:left;width:15%">{{shuz[ins]}}</h3>
|
|
|
- <div class="headScreen" style="width:70%">
|
|
|
+ <div class="headScreen" :style="ins == 9 ? 'width:60%' : 'width:70%'">
|
|
|
<!-- 客户项目利润表的筛选 -->
|
|
|
<template v-if="ins == 4">
|
|
|
<el-select v-model="customerId" :placeholder="$t('pleaseelectcustomers')" clearable filterable size="small" @change="selcts(4)" style="margin-right:20px">
|
|
@@ -132,7 +132,11 @@
|
|
|
<el-option v-for="item in firstStages" :key="item" :label="item" :value="item"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
- <p style="float: right;margin-right: 25px;width:10%" ><el-button type="primary" @click="exportExcel" size="mini">{{ $t('reporderived') }}</el-button></p>
|
|
|
+ <p :style="ins == 9 ? 'float: right;margin-right: 25px;width:20%' : 'float: right;margin-right: 25px;width:10%'" >
|
|
|
+ <el-button type="primary" @click="exportExcel" size="mini">{{ $t('reporderived') }}</el-button>
|
|
|
+ <el-button type="primary" @click="exportExcelByQuarter" size="mini" v-if="ins == 9">按季度导出</el-button>
|
|
|
+ </p>
|
|
|
+
|
|
|
</div>
|
|
|
<div ref="staff" style="margin: 5px 0px 0px 10px; width: 98%">
|
|
|
<div class="staff" ref="tabless" :style="'width:'+(windowWidth - 430)+'px'">
|
|
@@ -905,6 +909,32 @@
|
|
|
<el-table-column prop="detail" :label="$t('fillincase')"></el-table-column>
|
|
|
</el-table>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="按季度导出" :visible.sync="byQuarterDialog" width="500px">
|
|
|
+ <el-form>
|
|
|
+ <el-form-item label="选择年份">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="quarterParameter.year"
|
|
|
+ type="year"
|
|
|
+ value-format="yyyy"
|
|
|
+ :clearable="false"
|
|
|
+ style="width:200px"
|
|
|
+ placeholder="选择年">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="选择季度">
|
|
|
+ <el-select v-model="quarterParameter.quarter" style="width:200px">
|
|
|
+ <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>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" style="text-align: center;">
|
|
|
+ <el-button @click.native="quarterExport" type="primary">导出</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</section>
|
|
|
</template>
|
|
|
|
|
@@ -1024,7 +1054,12 @@ export default {
|
|
|
monthlyPersonnelList: [],
|
|
|
monthPersonnel: '',
|
|
|
|
|
|
- tableList: []
|
|
|
+ tableList: [],
|
|
|
+ byQuarterDialog: false,
|
|
|
+ quarterParameter: {
|
|
|
+ year: '2022',
|
|
|
+ quarter: 1
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
@@ -1461,6 +1496,35 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+ exportExcelByQuarter(){
|
|
|
+ this.byQuarterDialog = true
|
|
|
+ },
|
|
|
+ quarterExport(){
|
|
|
+ this.http.post('/project/exportReportTimelinessRateByQuarter', this.quarterParameter,
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ var filePath = res.data;
|
|
|
+ var fName = this.$t('personnelfillingtimelyratestatistics') + '(' + this.quarterParameter.year + '第' + this.quarterParameter.quarter + '季度).xls'
|
|
|
+ const a = document.createElement('a'); // 创建a标签
|
|
|
+ a.setAttribute('download', fName);// download属性
|
|
|
+ a.setAttribute('href', filePath);// href链接
|
|
|
+ a.click(); //自执行点击事件
|
|
|
+ a.remove();
|
|
|
+ this.byQuarterDialog = false
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
ssl(index) {
|
|
|
this.z = index
|
|
|
this.ins = index;
|