| | |
| | | }, |
| | | // 获取产品数量 |
| | | 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() { |