From dce9fa7cdb1fbc19a4425fa4f710632407976e9f Mon Sep 17 00:00:00 2001 From: GaoHao <1210693421@qq.com> Date: Wed, 9 Apr 2025 18:27:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=AD=9B=E9=80=89=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E5=A2=9E=E5=8A=A0=E6=97=B6=E5=88=86=E7=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/data/index.vue | 3 +++ src/views/data/sales.vue | 9 +++++++++ src/views/data/table.vue | 27 ++++++++++++++------------- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/views/data/index.vue b/src/views/data/index.vue index 5a3f855..22f3c35 100644 --- a/src/views/data/index.vue +++ b/src/views/data/index.vue @@ -562,6 +562,9 @@ export default { async summarytrade() { try { this.tradeLoading = true; + if( this.query.createdAt[1] ){ + this.query.createdAt.splice(1,1,this.query.createdAt[1].replace("00:00:00","23:59:59")) + } const res = await dataSummaryApi.trade({ beginDate: this.query.createdAt[0], endDate: this.query.createdAt[1], diff --git a/src/views/data/sales.vue b/src/views/data/sales.vue index 23576ef..b46ff2f 100644 --- a/src/views/data/sales.vue +++ b/src/views/data/sales.vue @@ -229,6 +229,9 @@ export default { // 获取订单汇总 async daycount() { try { + if (this.query.createdAt[1]) { + this.query.createdAt.splice(1, 1, this.query.createdAt[1].replace("00:00:00", "23:59:59")) + } const res = await saleSummaryApi.count({ beginDate: this.query.createdAt[0], endDate: this.query.createdAt[1], @@ -246,6 +249,9 @@ export default { async downloadHandle() { try { this.downloadLoading = true; + if (this.query.createdAt[1]) { + this.query.createdAt.splice(1, 1, this.query.createdAt[1].replace("00:00:00", "23:59:59")) + } const file = await saleSummaryApi.export({ beginDate: this.query.createdAt[0], endDate: this.query.createdAt[1], @@ -281,6 +287,9 @@ export default { this.tableData.loading = true; try { this.daycount(); + if (this.query.createdAt[1]) { + this.query.createdAt.splice(1, 1, this.query.createdAt[1].replace("00:00:00", "23:59:59")) + } const res = await saleSummaryApi.page({ page: this.tableData.page, size: this.tableData.size, diff --git a/src/views/data/table.vue b/src/views/data/table.vue index b90b648..b42c15f 100644 --- a/src/views/data/table.vue +++ b/src/views/data/table.vue @@ -18,17 +18,12 @@ 自定义
- +
- +
@@ -147,10 +142,10 @@ export default { this.geiShopList(); }, methods: { - /** - * 获取分店列表 - */ - async geiShopList() { + /** + * 获取分店列表 + */ + async geiShopList() { let res = await ShopApi.getBranchList() this.branchList = res; }, @@ -169,6 +164,9 @@ export default { async downloadHandle() { try { this.downloadLoading = true; + if (this.query.createdAt[1]) { + this.query.createdAt.splice(1, 1, this.query.createdAt[1].replace("00:00:00", "23:59:59")) + } const file = await tableSummaryApi.export({ beginDate: this.query.createdAt[0], endDate: this.query.createdAt[1], @@ -201,6 +199,9 @@ export default { async getTableData() { this.tableData.loading = true; try { + if (this.query.createdAt[1]) { + this.query.createdAt.splice(1, 1, this.query.createdAt[1].replace("00:00:00", "23:59:59")) + } const res = await tableSummaryApi.list({ page: this.tableData.page, size: this.tableData.size,