From dfcf1c54fe3cbfcd237f2baab8b4997225a232d3 Mon Sep 17 00:00:00 2001 From: songshankun <songshankun@foxmail.com> Date: 星期三, 18 十月 2023 16:37:48 +0800 Subject: [PATCH] feat: 产品详情页,在库数量跳转到库存报表中,并且把商品带过去 --- src/views/overview/OverviewListView.vue | 26 ++++++++++++++++++++------ 1 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue index 555dab7..4f5a945 100644 --- a/src/views/overview/OverviewListView.vue +++ b/src/views/overview/OverviewListView.vue @@ -60,19 +60,34 @@ infomation: {} }, workType: this.$route.params.workType, - keyword: "" + keyword: "", + params: {} } }, created() { this.setTable() + var paramsData = sessionStorage.getItem("paramsData") + let params = {} + if (paramsData) { + params = JSON.parse(sessionStorage.getItem("paramsData")) + } else { + params = this.$route.params + sessionStorage.setItem("paramsData", JSON.stringify(params)) + } + this.params = params this.getData() - console.log(this.$route.params.workType) + // console.log(this.$route.params.workType) + }, + // 椤甸潰閿�姣佷箣鍓� + beforeDestroy() { + sessionStorage.removeItem("paramsData") }, methods: { setTable() { this.tableList = { tableInfomation: [], - selectBox: true, + selectBox: false, + selectIndex: true, showcol: this.showcol, allcol: [], tableColumn: this.setTableColumn(this.showcol) @@ -182,10 +197,9 @@ async getData() { await getOperation({ number: this.keyword, - operationTypeId: this.$route.params.id, + operationTypeId: this.params.id, page: this.pagerOptions.currPage, - pageSize: this.pagerOptions.pageSize, - sourceNumber: this.keyword + pageSize: this.pagerOptions.pageSize }).then((res) => { console.log(res.data) if (res.code === 200) { -- Gitblit v1.8.0