Files
cashier-web/src/views/inventory/consumables/config/content.ts
2025-03-07 18:53:31 +08:00

95 lines
1.8 KiB
TypeScript

import Api from "@/api/product/cons";
import type { IContentConfig } from "@/components/CURD/types";
const contentConfig: IContentConfig = {
pageName: "sys:user",
table: {
border: true,
highlightCurrentRow: true,
},
pagination: {
background: true,
layout: "prev,pager,next,jumper,total,sizes",
pageSize: 10,
pageSizes: [10, 20, 30, 50],
},
indexAction: function (params) {
return Api.getList(params);
},
// deleteAction: Api.delete,
// modifyAction: function (data) {
// // return Api.edit(data);
// },
pk: "id",
toolbar: [
"add",
{
text: "入库",
name: 'ruku',
auth: 'ruku'
},
{
text: "出库",
name: 'chuku',
auth: ''
},
{
text: "分类管理",
name: 'category',
auth: ''
},
{
text: "供应商管理",
name: 'gongyinsahng',
auth: ''
},
],
defaultToolbar: ["refresh", "filter", "search"],
cols: [
{ type: "selection", width: 50, align: "center" },
// { label: "id", align: "center", prop: "id", width: 100, show: true },
{
label: "耗材名称",
align: "center",
prop: "conName",
},
{
label: "单位",
align: "center",
prop: "conUnit",
},
{
label: "所属商品",
align: "center",
templet: 'custom',
slotName: 'goods'
},
{
label: "库存数量",
align: "center",
prop: "stockNumber",
},
{
label: "预警值",
align: "center",
prop: "conWarning",
},
{
label: "是否启用",
align: "center",
prop: "status",
templet: "custom",
slotName: "status",
},
{
label: "操作",
align: "center",
fixed: "right",
width: 150,
templet: "custom",
slotName: 'operate'
},
],
};
export default contentConfig;