From c40afc5b937b625a78cf884284458a3c8d80df1e Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期四, 19 十月 2023 11:14:07 +0800 Subject: [PATCH] "库存报表,位置报表,历史路由跳转参数调整" --- src/views/reportForm/inventoryReport/index.vue | 82 ++++++++++++++++++++++++++++------------- 1 files changed, 56 insertions(+), 26 deletions(-) diff --git a/src/views/reportForm/inventoryReport/index.vue b/src/views/reportForm/inventoryReport/index.vue index 6bd8e38..91e54a1 100644 --- a/src/views/reportForm/inventoryReport/index.vue +++ b/src/views/reportForm/inventoryReport/index.vue @@ -3,8 +3,9 @@ <div class="rightContent"> <div class="top"> <SearchCommonView + :showAdd="false" :add-title="'鏂板缓'" - :placeholder="'璇疯緭鍏ュ弬鑰�'" + :placeholder="'璇疯緭鍏ヤ骇鍝佸悕绉版垨浜у搧绫诲埆'" :amount-view="false" @addCommonClick="addBtnClick" @searchClick="getList" @@ -21,11 +22,11 @@ v-for="(item, index) in warehouseList" :key="index" v-model="stashRadio" - :label="item.name" + :label="item.code" @change="radioHandleChange" >{{ item.name }}</el-radio > - <!-- <el-radio v-model="stashRadio" label="2">澶囬�夐」</el-radio> --> + <!-- @click.prevent.native="checkRadio(item.code)" 鍙栨秷鍗曢�夐」 --> </template> </div> <p style="margin-top: 30px">绫诲埆</p> @@ -85,7 +86,7 @@ import { getInventoryData, getProductCategoryList, getWarehouseList } from "@/api/reportForm/inventoryRwport" export default { - name: "InboundOutboundDetail", + name: "inventoryReport", props: {}, components: { AddOverviewDialog }, mixins: [pageMixin], @@ -143,7 +144,9 @@ warehouseListName: "", // 浠撳簱鍚嶇О stashRadio: "1", pageSizes: [15, 30], - oldRadioBtn: "" + oldRadioBtn: "", + metaTitle: this.$route.meta.title, + searchStr:"" } }, created() { @@ -159,13 +162,17 @@ checkListHandler(e) { this.categoryListId = e this.getData() - console.log(this.categoryListId, e, " 閫変腑鐨勪骇鍝乮d") }, radioHandleChange(e) { this.warehouseListName = e this.getData() - console.log(e, "鍗曢��") }, + // checkRadio(val){ + // console.log(val) + // val == this.stashRadio ? this.stashRadio = '' : this.stashRadio = val + // this.warehouseListName = val + // this.getData() + // }, setTable() { if (this.isIconIndex === "1") { this.pageSizes = [30, 60] @@ -173,7 +180,8 @@ } this.tableList = { tableInfomation: [], - selectBox: true, + selectBox: false, + selectIndex: true, showcol: this.showcol, countcol: this.countcol, allcol: [], @@ -267,7 +275,12 @@ this.tableList.tableColumn = this.setTableColumn(val) }, getList(val) { - console.log(val) + this.searchStr=val + this.getInventoryData({ + page: 1, + pageSize: this.pagerOptions.pageSize, + keyWord:val, + }) }, // 琛岀偣鍑� tableRowClick(row) { @@ -279,8 +292,8 @@ // 鏂板缓 addBtnClick() { // this.editConfig.visible = true; - this.editConfig.title = "鏂板缓" - this.getData() + // this.editConfig.title = "鏂板缓" + // this.getData() }, // 鐘舵�� getStatus(val) { @@ -288,16 +301,32 @@ }, // 鍘嗗彶 handleHistoryClick(row) { - console.log(row) - this.$router.push("/operate/allot") + this.$router.push({ + name: "inboundOutboundDetail", + params: { + keyWord:row.productType, + produceId:row.produceId, + unit:row.unit, + productName:row.productName, + name: "鎶ヨ〃" + } + }) }, + // 琛ヨ揣 handleAddGoods(row) { console.log(row) }, // 浣嶇疆 - handleLocation() { - this.$router.push("/reportForm/locationReport") + handleLocation(row) { + console.log(row,"rowwww") + this.$router.push({ + name:"locationReport", + params:{ + keyWord:row.row.productName, + name:"搴撳瓨鎶ヨ〃" + } + }) }, // 棰勬祴 handleForecast() {}, @@ -317,27 +346,29 @@ unit: item.unit //鍗曚綅 } this.testArr.push(obj) - console.log(this.testArr, "this") }) }, //鎺ュ彛璇锋眰----------------------------------------------------------------------------------------------- // 鑾峰彇搴撳瓨鎶ヨ〃鏁版嵁 - async getData() { + async getInventoryData(params){ + await getInventoryData(params).then((res) => { + if (res.code === 200) { + const list = res.data + this.tableList.tableInfomation = list || [] + this.pagerOptions.totalCount = res.total + } + }) + }, + getData() { let params = { + keyWord:this.searchStr, categoryIds: this.categoryListId, page: this.pagerOptions.currPage, pageSize: this.pagerOptions.pageSize, warehouseCode: this.warehouseListName } - await getInventoryData(params).then((res) => { - if (res.code === 200) { - console.log(res.data, "鎺ュ彛璇锋眰鎴愬姛") - const list = res.data - this.tableList.tableInfomation = list || [] - this.pagerOptions.totalCount = res.total - } - }) + this.getInventoryData(params) }, // 鑾峰彇浜у搧绫诲瀷鍒楄〃鏁版嵁 async getProductCategoryList() { @@ -360,7 +391,6 @@ }).then((res) => { if (res.data.code === 200) { this.warehouseList = res.data.data - console.log(this.warehouseList, "warehouseList") } }) } -- Gitblit v1.8.0