From 79e1282c68a71e1c93a0be9c97b4628f210ccefa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=8F=E5=95=BE?= <1144797966@qq.com> Date: Mon, 5 Aug 2024 15:12:49 +0800 Subject: [PATCH] 11 --- src/views/home/data_record.vue | 42 +++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/src/views/home/data_record.vue b/src/views/home/data_record.vue index 1a07db5..4ac8cee 100644 --- a/src/views/home/data_record.vue +++ b/src/views/home/data_record.vue @@ -36,20 +36,25 @@ - + + + +
@@ -57,6 +62,13 @@ @current-change="paginationChange" @size-change="sizeChange" layout="total, sizes, prev, pager, next, jumper">
+ + + + + + + @@ -83,8 +95,17 @@ export default { loading: false, total: 0 }, + tableDatainfo: { + data: [], + page: 0, + size: 10, + loading: false, + total: 0 + }, payCountList: "", - payCountTotal: 0 + payCountTotal: 0, + dialogshow: false, //弹框显示 + }; }, filters: { @@ -99,7 +120,6 @@ export default { methods: { //携带table id跳转到订单列表页面 toTableOrderList(data) { - console.log(data) this.$router.push({ path: '/order_manage/order_list', query: { @@ -126,17 +146,17 @@ export default { }, async getTableData() { this.tableData.loading = true; - try { let urlData = null if (this.query.createdAt.length == 0) { // 为什么这么写 因为后端让我有时候传key值有时候不传 为啥不按照框架走后端处理起来太麻烦 前端处理 -- 魏文政 2024.7.30 15:50 - urlData = `/api/tbHandover?page=${this.tableData.page + 1}&size=${this.tableData.size}&shopId=${localStorage.getItem("shopId")}&sort=${this.query.sort}` + urlData = `/api/tbHandover?page=${this.tableData.page}&size=${this.tableData.size}&shopId=${localStorage.getItem("shopId")}&sort=${this.query.sort}` } else { - urlData = `/api/tbHandover?page=${this.tableData.page + 1}&size=${this.tableData.size}&shopId=${localStorage.getItem("shopId")}&tradeDay=${this.query.createdAt[0] ? this.query.createdAt[0] : ''}&tradeDay=${this.query.createdAt[1] ? this.query.createdAt[1] : ''}&sort=${this.query.sort}` + urlData = `/api/tbHandover?page=${this.tableData.page}&size=${this.tableData.size}&shopId=${localStorage.getItem("shopId")}&tradeDay=${this.query.createdAt[0] ? this.query.createdAt[0] : ''}&tradeDay=${this.query.createdAt[1] ? this.query.createdAt[1] : ''}&sort=${this.query.sort}` } const res = await tbHandoverGet(urlData); this.tableData.loading = false; this.tableData.data = res.content; + console.log(this.tableData.productInfos) this.tableData.total = res.totalElements; } catch (error) { console.log(error); @@ -216,6 +236,12 @@ export default { default: break; } + }, + // 查看 + clicksee(e) { + this.dialogshow = true + console.log(JSON.parse(e.productInfos)) + this.tableDatainfo.data = JSON.parse(e.productInfos) } } };