haoxuan
2023-09-21 c87a6f7310ca992d7f058a8f286b095c9a632c90
src/views/productManage/productCategory/AddProductCategoryDialog.vue
@@ -48,7 +48,7 @@
          <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"
@@ -191,6 +191,7 @@
  updateProductCategory,
  deleteProductCategory,
} from "@/api/product/productCategory";
import { getDataByType } from "@/api/data";
export default {
  name: "AddProductCategoryDialog",
@@ -259,9 +260,11 @@
      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:"删除失败!")
         }
      });
    },
    // 编辑
@@ -294,17 +297,21 @@
            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 {