This commit is contained in:
jiangfuzhuang
2020-02-11 10:11:08 +08:00
parent ac32df04d7
commit 06506ad5d9
5 changed files with 109 additions and 4 deletions

View File

@@ -45,6 +45,7 @@
<el-button class="button111" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">新增</el-button>
<!--<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px;background: #fdf6ec;border-color: #ff9759;color: #ff9759;" @click="ADD()">新增</el-button>-->
</el-tooltip>
<el-button type="success" plain size="small" @click="exportExcel()">导出</el-button>
</div>
</el-card>
<el-row>
@@ -231,6 +232,7 @@ export default {
startTime: '',
endTime: '',
date: null,
time_check: 0,
PageCurrent: 1,
PageSize: 10,
total: null,
@@ -279,6 +281,28 @@ export default {
// this.fetchTableData1()
},
methods: {
// EXCEL 导出
// 姜福壮
exportExcel() {
if (this.contractNumber === '' || this.contractNumber === null) { this.contractNumber_check = 0 } else { this.contractNumber_check = 1 }
if (this.date !== null) {
this.time_check = 1
this.startTime = this.datetoYYMMDD(this.date[0])
this.endTime = this.datetoYYMMDD(this.date[1])
} else {
this.time_check = 0
this.startTime = ''
this.endTime = ''
}
var param = []
param[0] = ['项目流水号_check', this.contractNumber_check]
param[1] = ['项目流水号', this.contractNumber]
param[2] = ['日期_check', this.time_check]
param[3] = ['开始日期', this.startTime]
param[4] = ['结束日期', this.endTime]
var Data = this.CreateData('00', '报表_自家项目报表_查询', param)
this.exportExcel_NPOI(Data)
},
init() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
},