| | |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <div style="margin-left: 20px">类别</div> |
| | | <div style="margin-left: 20px"><span class="color_F56C6C">*</span>类别</div> |
| | | <el-form-item label="" prop="name" label-width="20px"> |
| | | <el-input |
| | | v-model="editConfig.infomation.name" |
| | |
| | | updateProductCategory, |
| | | deleteProductCategory, |
| | | } from "@/api/product/productCategory"; |
| | | |
| | | import { getDataByType } from "@/api/data"; |
| | | export default { |
| | | name: "AddProductCategoryDialog", |
| | |
| | | deleteProductCategory({ id: data.id }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("刪除成功"); |
| | | this.$message.success("刪除成功!"); |
| | | this.$emit("refresh"); |
| | | } |
| | | } else { |
| | | this.$message.warning(res.msg?res.msg:"删除失败!") |
| | | } |
| | | }); |
| | | }, |
| | | // 编辑 |
| | |
| | | addProductCategory(params).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("添加成功"); |
| | | this.$message.success("添加成功!"); |
| | | this.$emit("refresh"); |
| | | } |
| | | } else { |
| | | this.$message.warning(res.msg?res.msg:"添加失败!") |
| | | } |
| | | }); |
| | | } else { |
| | | updateProductCategory(params).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("编辑成功"); |
| | | this.$message.success("编辑成功!"); |
| | | this.$emit("refresh"); |
| | | } |
| | | } else { |
| | | this.$message.warning(res.msg?res.msg:"编辑失败!") |
| | | } |
| | | }); |
| | | } |
| | | } else { |