From 917bfeda968449930bf41b33f2a26d723ab0492c Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 03 十一月 2023 14:41:54 +0800
Subject: [PATCH] 查看产品调整重订货规则功能
---
src/views/productManage/reorderRules/index.vue | 20 +++++++++++++++++++-
src/components/makepager/FormBtnsView.vue | 10 +++++++++-
src/views/productManage/product/AddProductDialog.vue | 15 +++++++++++++++
3 files changed, 43 insertions(+), 2 deletions(-)
diff --git a/src/components/makepager/FormBtnsView.vue b/src/components/makepager/FormBtnsView.vue
index 37119ca..653231a 100644
--- a/src/components/makepager/FormBtnsView.vue
+++ b/src/components/makepager/FormBtnsView.vue
@@ -49,7 +49,11 @@
<div class="right-label">BOM</div>
</div>
</div> -->
- <div v-if="!showProduct && !showWarehouse && !showPosition" class="sub-number no-cursor">
+ <div
+ v-if="!showProduct && !showWarehouse && !showPosition"
+ class="sub-number yes-cursor"
+ @click="reorderRulesClick"
+ >
<div class="left"><i class="el-icon-refresh"></i></div>
<div class="right">
<div class="right-label">{{ countObject?.reorderRule ?? 0 }}</div>
@@ -158,6 +162,10 @@
// 涓婃灦瑙勫垯
listingRulesClick() {
this.$emit("listingRulesClick")
+ },
+ // 閲嶈璐ц鍒�
+ reorderRulesClick() {
+ this.$emit("reorderRulesClick")
}
}
}
diff --git a/src/views/productManage/product/AddProductDialog.vue b/src/views/productManage/product/AddProductDialog.vue
index 8be8160..5c63af6 100644
--- a/src/views/productManage/product/AddProductDialog.vue
+++ b/src/views/productManage/product/AddProductDialog.vue
@@ -44,6 +44,7 @@
:countObject="statisticsMap"
:show-sale="showSale"
@listingRulesClick="listingRulesClick"
+ @reorderRulesClick="reorderRulesClick"
/>
<div class="bottom">
<el-tabs v-model="activeName" type="card">
@@ -796,6 +797,20 @@
}
})
},
+ // 閲嶈璐鍒�
+ reorderRulesClick() {
+ this.$refs.form.validate((valid) => {
+ if (valid) {
+ this.$router.push({
+ path: "/productManage/reorderRules",
+ query: {
+ productName: this.editConfig.infomation.name,
+ productId: this.editConfig.title === "鏂板缓" ? "" : this.editConfig.infomation.id
+ }
+ })
+ }
+ })
+ },
// 鍙攢鍞�/鍙噰璐�
checkboxChange(val, param) {
if (val === "閲囪喘") {
diff --git a/src/views/productManage/reorderRules/index.vue b/src/views/productManage/reorderRules/index.vue
index 9384663..57d32fa 100644
--- a/src/views/productManage/reorderRules/index.vue
+++ b/src/views/productManage/reorderRules/index.vue
@@ -7,9 +7,11 @@
:show-apply="false"
:placeholder="'璇疯緭鍏ヤ綅缃�/浜у搧'"
:amount-view="false"
+ :search-task-map="searchTaskMap"
@addCommonClick="addProductClick"
@searchClick="getList"
@discardBtnClick="discardBtnClick"
+ @delSelectClick="delSelectClick"
/>
</div>
<div class="list-view">
@@ -76,11 +78,21 @@
maxInventory: 0,
orderNumber: 0,
unit: "",
- reorderId: 0
+ reorderId: 0,
+ queryProductId: null,
+ searchTaskMap: []
}
},
created() {
this.setTable()
+ let query = this.$route.query
+ if (query) {
+ this.queryProductId = query.productId?.length ? query.productId : null
+ this.pagerOptions.currPage = 1
+ this.searchTaskMap =
+ query.productId?.length > 0 ? [{ productId: this.queryProductId, title: query.productName }] : []
+ console.log(this.searchTaskMap)
+ }
this.getData()
},
methods: {
@@ -105,6 +117,7 @@
// 璇锋眰鏁版嵁
async getData() {
await getReorderRuleList({
+ productId: this.queryProductId ? this.queryProductId : null,
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
}).then((res) => {
@@ -319,6 +332,11 @@
// 鑾峰彇褰撳墠鏃堕棿
currentTime() {
return currentTime()
+ },
+ // 鍒犻櫎浜у搧
+ delSelectClick() {
+ this.queryProductId = ""
+ this.getData()
}
}
}
--
Gitblit v1.8.0