feat: 商品列表添加完成一半
This commit is contained in:
@@ -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: "操作",
|
||||
|
||||
Reference in New Issue
Block a user