From 7ae5a1ab125536607eb785f99cd033602b42fd8f Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期一, 06 十一月 2023 15:10:30 +0800
Subject: [PATCH] 新建产品类别的时候产品数为0
---
src/views/productManage/productCategory/AddProductCategoryDialog.vue | 34 ++++++++++++++++++----------------
1 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/src/views/productManage/productCategory/AddProductCategoryDialog.vue b/src/views/productManage/productCategory/AddProductCategoryDialog.vue
index 63c4f32..b4330aa 100644
--- a/src/views/productManage/productCategory/AddProductCategoryDialog.vue
+++ b/src/views/productManage/productCategory/AddProductCategoryDialog.vue
@@ -268,23 +268,25 @@
},
// 鑾峰彇浜у搧鏁伴噺
getProductCount() {
- getProductList({
- keyWord: "",
- categoryId: this.editConfig.title === "鏂板缓" ? null : this.editConfig.infomation.id,
- page: 1,
- pageSize: 1
- })
- .then((res) => {
- if (res.code === 200) {
- this.statisticsMap.product = res?.total ?? 0
- } else {
+ if (this.editConfig.title !== "鏂板缓") {
+ getProductList({
+ keyWord: "",
+ categoryId: this.editConfig.title === "鏂板缓" ? null : this.editConfig.infomation.id,
+ page: 1,
+ pageSize: 1
+ })
+ .then((res) => {
+ if (res.code === 200) {
+ this.statisticsMap.product = res?.total ?? 0
+ } else {
+ this.statisticsMap.product = 0
+ }
+ })
+ .catch((err) => {
+ console.error(err)
this.statisticsMap.product = 0
- }
- })
- .catch((err) => {
- console.error(err)
- this.statisticsMap.product = 0
- })
+ })
+ }
},
// 璁剧疆鍒犻櫎/鎵撳嵃/缂栬緫鏄惁鏄剧ず
setBottonView() {
--
Gitblit v1.8.0