feat: 商品列表添加完成一半

This commit is contained in:
duan
2025-02-19 18:27:12 +08:00
parent 2a7e200015
commit dc5f664143
11 changed files with 547 additions and 228 deletions

View File

@@ -2,12 +2,17 @@ import UserAPI from "@/api/product/index";
import RoleAPI from "@/api/system/role";
import type { UserPageQuery } from "@/api/system/user";
import type { IContentConfig } from "@/components/CURD/types";
import { id } from "element-plus/es/locale";
const contentConfig: IContentConfig<UserPageQuery> = {
pageName: "sys:user",
table: {
border: true,
highlightCurrentRow: true,
rowKey: 'id',
treeProps: {
children: 'skuList' // 指定子节点存储的字段为 customChildren
}
},
pagination: {
background: true,
@@ -22,6 +27,14 @@ const contentConfig: IContentConfig<UserPageQuery> = {
obj.createEndTime = obj['1']
return UserAPI.getPage(obj);
},
modifyAction: function (data) {
let obj = {
type: data.isGrounding ? 'sku' : 'product',
id: data.id,
isSale: data.value
}
// return UserAPI.onOff(obj);
},
deleteAction: UserAPI.deleteByIds,
// importAction(file) {
// return UserAPI.import(1, file);
@@ -64,12 +77,6 @@ const contentConfig: IContentConfig<UserPageQuery> = {
prop: "isSale",
templet: "switch",
slotName: "status",
}, {
label: "是否启用库存",
align: "center",
prop: "isStock",
templet: "switch",
slotName: "status",
},
{
label: "操作",