diff --git a/src/views/material/back/component/home.vue b/src/views/material/back/component/home.vue index b3e4dbb4..e156104f 100644 --- a/src/views/material/back/component/home.vue +++ b/src/views/material/back/component/home.vue @@ -93,6 +93,9 @@ 导出 + + 导出退料明细 + @@ -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'], @@ -506,29 +511,41 @@ export default { this.rowObj = row }, /** 导出按钮操作 */ - 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}`; - }; + 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 currentTime = formatTime(new Date()); + const currentTime = formatTime(new Date()) - this.download( - 'material/back_apply_info/export', - { - ...this.queryParams, - startTime: this.queryParams.time[0], - endTime: this.queryParams.time[1] - }, - `退料申请单_${currentTime}.xlsx`, - ) - }, + this.download( + 'material/back_apply_info/export', + { + ...this.queryParams, + startTime: this.queryParams.time[0], + endTime: this.queryParams.time[1] + }, + `退料申请单_${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`, + ) + }, }, } diff --git a/src/views/material/report/leaseOutReport.vue b/src/views/material/report/leaseOutReport.vue index 14f54978..3c8710f8 100644 --- a/src/views/material/report/leaseOutReport.vue +++ b/src/views/material/report/leaseOutReport.vue @@ -1,7 +1,6 @@