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