From 75970472200ccac40c586f602253fb2eb73ff512 Mon Sep 17 00:00:00 2001 From: zwq Date: Fri, 22 Mar 2024 10:17:03 +0800 Subject: [PATCH 01/19] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=88=90=E6=9C=ACbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cost/energyCost/index.vue | 17 +++++++++++++---- .../cost/rawMaterialConfig/add-or-updata.vue | 4 ++-- src/views/cost/rawMaterialCost/index.vue | 8 ++++++-- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/views/cost/energyCost/index.vue b/src/views/cost/energyCost/index.vue index a0e122aa..7d7ec099 100644 --- a/src/views/cost/energyCost/index.vue +++ b/src/views/cost/energyCost/index.vue @@ -30,6 +30,7 @@ import { } from '@/api/cost/costEneryAutoReport'; import { getEnergyTypeListAll } from '@/api/base/energyType'; import { publicFormatter } from '@/utils/dict'; +import moment from 'moment'; const tableProps = [ { @@ -135,15 +136,23 @@ export default { this.listQuery.pageSize = 10; this.listQuery.energyTypeId = val.energyTypeId; this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null; - this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null; - this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null; + this.listQuery.startTime = val.searchTime + ? moment(val.searchTime[0]).startOf('day').format('x') + : null; + this.listQuery.endTime = val.searchTime + ? moment(val.searchTime[1]).endOf('day').format('x') + : null; this.getDataList(); break; case 'export': const data = { energyTypeId:val.energyTypeId, - startTime : val.searchTime ? val.searchTime[0] : null, - endTime : val.searchTime ? val.searchTime[1] : null, + startTime : val.searchTime + ? moment(val.searchTime[0]).startOf('day').format('x') + : null, + endTime : val.searchTime + ? moment(val.searchTime[1]).endOf('day').format('x') + : null, } this.handleExport(data); break; diff --git a/src/views/cost/rawMaterialConfig/add-or-updata.vue b/src/views/cost/rawMaterialConfig/add-or-updata.vue index 1196e9ae..c2387006 100644 --- a/src/views/cost/rawMaterialConfig/add-or-updata.vue +++ b/src/views/cost/rawMaterialConfig/add-or-updata.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2023-08-01 13:52:10 * @LastEditors: zwq - * @LastEditTime: 2024-02-19 09:36:50 + * @LastEditTime: 2024-03-21 15:59:26 * @Description: --> @@ -113,8 +113,8 @@ {{ scope.row.goodProductPassNow ? parseFloat((scope.row.goodProductPassNow * - 100).toFixed(2)) + - '%' : undefined }} + 100).toFixed(2)) + + '%' : null }} @@ -123,8 +123,8 @@ {{ scope.row.goodProductPassHis ? parseFloat((scope.row.goodProductPassHis * - 100).toFixed(2)) + - '%' : undefined }} + 100).toFixed(2)) + + '%' : null }} @@ -133,8 +133,8 @@ {{ scope.row.goodProductPassTrend ? parseFloat((scope.row.goodProductPassTrend * - 100).toFixed(2)) + - '%' : undefined }} + 100).toFixed(2)) + + '%' : null }} @@ -146,7 +146,7 @@ {{ remark ? remark : '请输入备注' }} --> -
+
@@ -480,8 +480,8 @@ export default { // console.log(val.setHours(7, 0, 0)) // console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) // let time = this.format(val.setHours(7, 0, 0)) - this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000 - this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000 + this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000 + this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 1) - 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000 this.timeTips = this.listQuery.reportTime[0] + ' - ' + this.listQuery.reportTime[1] // console.log(this.listQuery.reportTime); } else { @@ -510,7 +510,7 @@ export default { //返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。 new Blob([wbout], { type: "application/octet-stream" }), //设置导出文件名称 - "许昌安彩月成品生产汇总.xlsx" + "许昌安彩日成品生产汇总.xlsx" ); } catch (e) { if (typeof console !== "undefined") console.log(e, wbout); diff --git a/src/views/report/productionMonthReport/index.vue b/src/views/report/productionMonthReport/index.vue index d0ef5154..2aeb6138 100644 --- a/src/views/report/productionMonthReport/index.vue +++ b/src/views/report/productionMonthReport/index.vue @@ -1,7 +1,7 @@ @@ -78,7 +78,7 @@ - + - +