zuozhengqing
2023-11-06 f9b2a039afe6f674908e483bf19915c0ba06eb71
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() {