1
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button type="warning" size="small" icon="el-icon-download" @click="handleExport" v-hasPermi="['system:jdorder:export']">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -137,6 +138,15 @@ export default {
|
||||
const num = Number(n)
|
||||
if (Number.isNaN(num)) return n
|
||||
return num.toFixed(2)
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const params = { ...this.queryParams }
|
||||
if (this.dateRange && this.dateRange.length === 2) {
|
||||
params.beginTime = this.dateRange[0]
|
||||
params.endTime = this.dateRange[1]
|
||||
}
|
||||
this.download('/system/jdorder/export', params, `京东订单数据_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user