| | |
| | | style="width: 85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="上级品类" prop="parentId"> |
| | | <el-form-item label="上级品类" v-if="editConfig.infomation.parentId" prop="parentId"> |
| | | <el-select |
| | | v-model="editConfig.infomation.parentId" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 85%" |
| | | :disabled="!showFooter" |
| | | :disabled="editConfig.infomation.parentId" |
| | | > |
| | | <el-option v-for="item in productCategoryList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | |
| | | }, |
| | | // 获取产品数量 |
| | | 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() { |