This commit is contained in:
parent
7a5e2d085c
commit
f135e0a1a4
|
|
@ -93,6 +93,9 @@
|
|||
<el-col :span="1.5">
|
||||
<el-button icon="el-icon-download" size="mini" @click="handleExport" >导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button icon="el-icon-download" size="mini" @click="handleExportDetails" >导出退料明细</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" ></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
|
@ -217,6 +220,8 @@ import {
|
|||
import dialogFormByCq from '@/views/material/back/component/dialogFormByCq.vue'
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import { formatTime } from '@/utils/bonus'
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
dicts: ['back_task_status'],
|
||||
|
|
@ -507,17 +512,17 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
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 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 currentTime = formatTime(new Date())
|
||||
|
||||
this.download(
|
||||
'material/back_apply_info/export',
|
||||
|
|
@ -529,6 +534,18 @@ export default {
|
|||
`退料申请单_${currentTime}.xlsx`,
|
||||
)
|
||||
},
|
||||
handleExportDetails() {
|
||||
const currentTime = formatTime(new Date())
|
||||
this.download(
|
||||
'back_apply_info/exportBackDetailsList',
|
||||
{
|
||||
...this.queryParams,
|
||||
startTime: this.queryParams.time[0],
|
||||
endTime: this.queryParams.time[1]
|
||||
},
|
||||
`退料明细_${currentTime}.xlsx`,
|
||||
)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item prop="startTime">
|
||||
<el-form-item label="领料日期" prop="dateRange">
|
||||
<el-date-picker
|
||||
v-model="queryParams.startTime"
|
||||
|
|
|
|||
Loading…
Reference in New Issue