🔨 CRM:优化产品分类代码的实现

This commit is contained in:
YunaiV 2023-12-06 12:56:55 +08:00
parent b3d66cd0aa
commit f8c4700c2e
2 changed files with 3 additions and 4 deletions

View File

@ -7,7 +7,7 @@
label-width="100px" label-width="100px"
v-loading="formLoading" v-loading="formLoading"
> >
<el-form-item label="父级id" prop="parentId"> <el-form-item label="父级分类" prop="parentId">
<el-select v-model="formData.parentId" placeholder="请选择上级分类"> <el-select v-model="formData.parentId" placeholder="请选择上级分类">
<el-option :key="0" label="顶级分类" :value="0" /> <el-option :key="0" label="顶级分类" :value="0" />
<el-option <el-option

View File

@ -1,5 +1,4 @@
<template> <template>
<!-- TODO @zange挪到 product 建个 category 挪进去哈 -->
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form <el-form
@ -36,7 +35,8 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="list" row-key="id" default-expand-all> <el-table v-loading="loading" :data="list" row-key="id" default-expand-all>
<el-table-column label="名称" align="center" prop="name" /> <el-table-column label="分类编号" align="center" prop="id" />
<el-table-column label="分类名称" align="center" prop="name" />
<el-table-column <el-table-column
label="创建时间" label="创建时间"
align="center" align="center"
@ -73,7 +73,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import * as ProductCategoryApi from '@/api/crm/product/productCategory' import * as ProductCategoryApi from '@/api/crm/product/productCategory'
import ProductCategoryForm from './ProductCategoryForm.vue' import ProductCategoryForm from './ProductCategoryForm.vue'
import { handleTree } from '@/utils/tree' import { handleTree } from '@/utils/tree'