| | |
| | | <span>打印</span> |
| | | </span> --> |
| | | <span class="btn" style="margin-left: 15px"> |
| | | <el-button |
| | | <i class="el-icon-s-tools"></i> |
| | | <span>动作</span> |
| | | <!-- <el-button |
| | | plain |
| | | size="mini" |
| | | style="margin-left: 15px" |
| | | @click="deleteClick" |
| | | >删除</el-button |
| | | > |
| | | > --> |
| | | </span> |
| | | <el-button |
| | | v-if="showEdit" |
| | |
| | | <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 { |
| | |
| | | delClick() {}, |
| | | // 产品 |
| | | productClick() { |
| | | this.$router.push({ |
| | | path: "/productManage/productList", |
| | | query: { name: "产品" }, |
| | | }); |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | this.$router.push({ |
| | | path: "/productManage/product", |
| | | query: { categoryName:this.editConfig.infomation.name, id: this.editConfig.title === "新建"?'':this.editConfig.infomation.id}, |
| | | }); |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | }, |
| | | }; |