From 58ac82fceff96784dd9e16872d1e2316fa2cfdec Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期五, 24 十一月 2023 14:36:12 +0800 Subject: [PATCH] 入库明细报表修改状态进度展示 --- src/views/operate/orderPoint/index.vue | 121 ++++++++++++++-------------------------- 1 files changed, 42 insertions(+), 79 deletions(-) diff --git a/src/views/operate/orderPoint/index.vue b/src/views/operate/orderPoint/index.vue index d53c274..d9167c5 100644 --- a/src/views/operate/orderPoint/index.vue +++ b/src/views/operate/orderPoint/index.vue @@ -7,9 +7,14 @@ :show-apply="false" :placeholder="'璇疯緭鍏ヤ綅缃�/浜у搧'" :amount-view="false" + :search-task-map="searchTaskMap" + :show-sreen="false" + :screen-array="screenArray" @addCommonClick="addProductClick" @searchClick="getList" @discardBtnClick="discardBtnClick" + @delSelectClick="delSelectClick" + @switchKeywords="switchKeywords" /> </div> <div class="content_wrap"> @@ -81,41 +86,6 @@ data() { return { datas: [], - // datas: [{ - // label: '涓�绾� 1', - // children: [{ - // label: '浜岀骇 1-1', - // children: [{ - // label: '涓夌骇 1-1-1' - // }] - // }] - // }, { - // label: '涓�绾� 2', - // children: [{ - // label: '浜岀骇 2-1', - // children: [{ - // label: '涓夌骇 2-1-1' - // }] - // }, { - // label: '浜岀骇 2-2', - // children: [{ - // label: '涓夌骇 2-2-1' - // }] - // }] - // }, { - // label: '涓�绾� 3', - // children: [{ - // label: '浜岀骇 3-1', - // children: [{ - // label: '涓夌骇 3-1-1' - // }] - // }, { - // label: '浜岀骇 3-2', - // children: [{ - // label: '涓夌骇 3-2-1' - // }] - // }] - // }], defaultProps: { children: "children", label: "jointName" @@ -136,12 +106,24 @@ maxInventory: 0, orderNumber: 0, unit: "", - reorderId: 0 + reorderId: 0, + searchTaskMap: [], + type: "bh", + screenArray: [{ id: "0", type: "bh", title: "閲嶆柊璁㈣喘" }] } }, created() { + if (this.$route.params.productId) { + this.getData({ + productId: this.$route.params.productId, + pageSize: 15, + page: 1 + }) + } else { + this.getData() + } this.setTable() - this.getData() + this.searchTaskMap = [{ id: "0", type: this.type, title: "閲嶆柊璁㈣喘" }] this.getLocationList() }, methods: { @@ -164,14 +146,18 @@ } }, // 璇锋眰鏁版嵁 - async getData() { + async getData(data) { await getReorderRuleList({ + locationId: data?.id, + type: this.type, + keyWord: data?.jointName, page: this.pagerOptions.currPage, - pageSize: this.pagerOptions.pageSize + pageSize: this.pagerOptions.pageSize, + productId: data?.productId }).then((res) => { if (res.code === 200) { console.log(res) - const list = res.data.map((item) => { + const list = res.data?.map((item) => { let orderNum = 0 if (parseFloat(item.minInventory) - parseFloat(item.prediction) > 0) { orderNum = this.caculateOrderNumber( @@ -229,7 +215,7 @@ }, // 鏂板 addProductClick() { - console.log(this.addTitle) + console.log(this.addTitle, "qqqqqqqqqqqq") this.isSel() if (this.isNoProduct && this.addTitle === "鏂板缓") { this.$refs.tablelistRef.getProductList() @@ -255,6 +241,7 @@ editable: false, isOrder: true }) + this.tableList.tableData = this.tableData this.locationId = 0 this.productId = 0 } else { @@ -369,8 +356,10 @@ }, // 閫変腑浜у搧鏂规硶 selProductClick(item) { - this.productId = item.value + this.productId = item.productId this.unit = item.unit + this.amount = item.amount + this.prediction = item.prediction }, // 閫変腑璺嚎鏂规硶 selRouteClick(item, prop) { @@ -384,42 +373,7 @@ //鏍戠偣鍑� handleNodeClick(data) { console.log(data, "sss") - getReorderRuleList({ - locationId: data.id, - page: 1, - pageSize: 15, - type: "", - keyWord: data.jointName - }).then((res) => { - console.log(res, "res999") - if (res.code === 200) { - console.log(res) - const list = res.data.map((item) => { - let orderNum = 0 - if (parseFloat(item.minInventory) - parseFloat(item.prediction) > 0) { - orderNum = this.caculateOrderNumber( - parseFloat(item.minInventory), - parseFloat(item.maxInventory), - parseFloat(item.prediction) - ) - } - return { - ...item, - productName: item.product.name, - locationName: item.location.name, - isSet: false, - isEdit: true, - editable: true, - isOrder: true, - isView: item?.minInventory - item?.prediction > 0 ? true : false, - orderNumber: orderNum - } - }) - this.tableList.tableData = list || [] - this.tableData = list || [] - this.pagerOptions.totalCount = res.total - } - }) + this.getData(data) }, async getLocationList() { await getLocationTreeList().then((res) => { @@ -431,8 +385,17 @@ }, ...res.data ] - console.log(res, "res666") }) + }, + // 鍒犻櫎type + delSelectClick() { + this.type = "" + this.getData() + }, + switchKeywords(item) { + console.log(item, "switchKeywords") + this.type = item?.length > 0 ? "bh" : "" + this.getData() } } } -- Gitblit v1.8.0