From 4610d87bfa8c8330c8f3c0b2db0ee5cc30352117 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期三, 15 十一月 2023 19:20:31 +0800 Subject: [PATCH] 重订货规则添加和修改修复 --- src/views/productManage/reorderRules/index.vue | 36 ++++++++++++++++++------------------ src/components/makepager/CommonFormTableView.vue | 2 +- src/views/reportForm/locationReport/index.vue | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/components/makepager/CommonFormTableView.vue b/src/components/makepager/CommonFormTableView.vue index 36a861b..11126c9 100644 --- a/src/components/makepager/CommonFormTableView.vue +++ b/src/components/makepager/CommonFormTableView.vue @@ -515,6 +515,7 @@ }) }, async handleSelectClient(value, item) { + this.$emit("selProductClick",value,item) if (value === "product") { if(item.categoryId===0||item.categoryName===""){ this.productTypeNameOptions =[] @@ -536,7 +537,6 @@ }else if(value==="productType"){ console.log("浜у搧绫诲瀷閫変腑") } - this.$emit("selProductClick",value,item) }, querySearchAsync(queryString, cb, value) { let restaurants='' diff --git a/src/views/productManage/reorderRules/index.vue b/src/views/productManage/reorderRules/index.vue index cbf2af2..9a66f15 100644 --- a/src/views/productManage/reorderRules/index.vue +++ b/src/views/productManage/reorderRules/index.vue @@ -80,7 +80,8 @@ unit: "", reorderId: 0, queryProductId: null, - searchTaskMap: [] + searchTaskMap: [], + currentRowId:-1 } }, created() { @@ -214,20 +215,17 @@ this.showDiscard = false let requestUrl = this.currentRowId === 0 ? addReorderRule : updateReorderRule let params = this.saveParams() - requestUrl(params) - .then((res) => { - console.log(res) - if (res.code === 200) { - let tipStr = this.currentRowId === 0 ? "娣诲姞鎴愬姛" : "淇敼鎴愬姛" - this.$message.success(tipStr) - this.getData() - } - }) - .catch((err) => { - console.log(err) + requestUrl(params).then((res) => { + if (res.code === 200) { + let tipStr = this.currentRowId === 0 ? "娣诲姞鎴愬姛" : "淇敼鎴愬姛" + this.$message.success(tipStr) this.getData() - }) - // } + } + }) + .catch((err) => { + this.getData() + console.log(err) + }) } }, saveParams() { @@ -283,7 +281,7 @@ if (!this.isNoProduct && this.currentRowId === 0) { this.$message.error("璇峰畬鎴愬綋鍓嶆柊寤烘垨鍙栨秷鏂板缓") } else { - this.currentRowId = row.id + this.currentRowId = row.id||0 this.addTitle = "淇濆瓨" this.showDiscard = true this.isRowClick = true @@ -320,9 +318,11 @@ this.locationId = item?.value ?? item?.id }, // 閫変腑浜у搧鏂规硶 - selProductClick(item) { - this.productId = item.value - this.unit = item.unit + selProductClick(value,item){ + if(value==="product"){ + this.productId=item.id + this.unit=item.unit + } }, // 閫変腑璺嚎鏂规硶 selRouteClick(item, prop) { diff --git a/src/views/reportForm/locationReport/index.vue b/src/views/reportForm/locationReport/index.vue index a26c37d..3832e68 100644 --- a/src/views/reportForm/locationReport/index.vue +++ b/src/views/reportForm/locationReport/index.vue @@ -60,7 +60,7 @@ data() { return { tableList: {}, - showcol: ["瀛樺偍绫诲埆", "浜у搧绫诲埆", "棰勭暀鏁伴噺", "浠峰��"], + showcol: [ "浜у搧绫诲埆", "棰勭暀鏁伴噺", "浠峰��"], // countcol: [ // { label: "鍦ㄥ簱鏁伴噺", unit: "" }, // { label: "棰勭暀鏁伴噺", unit: "" }, -- Gitblit v1.8.0