导出领料出库明细

This commit is contained in:
hongchao 2025-09-16 20:43:47 +08:00
parent 4f08d369d0
commit 721482102c
1 changed files with 34 additions and 0 deletions

View File

@ -55,6 +55,7 @@
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExportDetail">导出领料明细</el-button>
</el-form-item>
</el-form>
@ -994,6 +995,39 @@ export default {
)
},
/** 导出领料明细按钮操作 */
handleExportDetail() {
const formatTime = date => {
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
const hours = String(date.getHours()).padStart(2, '0')
const minutes = String(date.getMinutes()).padStart(2, '0')
const seconds = String(date.getSeconds()).padStart(2, '0')
return `${year}${month}${day}_${hours}${minutes}${seconds}`
}
const currentTime = formatTime(new Date())
const params = {
keyWord: this.queryParams.keyWord,
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum,
hasSign: 1
}
if (!this.queryParams.taskStatus) {
params.statusList = [3, 4, 5]
} else {
params.statusList = [this.queryParams.taskStatus]
}
this.download(
'/material/lease_apply_info/exportLeaseOutRecordDetail',
{ ...params },
`领用明细数据_${currentTime}.xlsx`
)
},
/** 查看按钮操作 */
handleView(row) {
console.log('🚀 ~ handleView ~ row:', row.taskType)