Files
cashier-web/src/views/inventory/consumables/config/content.ts

152 lines
3.0 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) {
let obj = { ...params };
if (obj.createAt) {
obj.beginTime = obj.createAt[0];
obj.endTime = obj.createAt[1];
delete obj.createAt;
}
return Api.getList(obj);
},
// deleteAction: Api.delete,
// modifyAction: function (data) {
// // return Api.edit(data);
// },
indexActionData: {},
pk: "id",
toolbar: [
{
icon: "plus",
text: "新增",
type: "primary",
name: "add",
auth: "import",
},
{
icon: "refresh",
text: "同步",
type: "danger",
name: "sync",
auth: "import",
},
{
text: "入库",
name: "ruku",
auth: "ruku",
},
{
text: "出库",
name: "chuku",
auth: "",
},
{
text: "分类管理",
name: "category",
auth: "",
},
{
text: "供应商管理",
name: "gongyinsahng",
auth: "",
},
{
text: "入库记录",
name: "manual-in",
auth: "",
},
{
text: "出库记录",
name: "manual-out",
auth: "",
},
{
text: "报损记录",
name: "damage-out",
auth: "",
},
{
text: "报损",
name: "reportinglosses",
auth: "",
},
{
text: "批量入库",
name: "batchWarehousing",
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",
// templet: "custom",
// slotName: "conUnit",
// },
{
label: "所属商品",
align: "center",
templet: "custom",
slotName: "goods",
},
{
label: "库存数量",
align: "left",
prop: "stockNumber",
templet: "custom",
slotName: "stockNumber",
},
{
label: "预警值",
align: "center",
prop: "conWarning",
},
{
width: '120',
label: "是否检测耗材",
align: "center",
prop: "isStock",
templet: "custom",
slotName: "isStock",
},
{
label: "是否启用",
align: "center",
prop: "status",
templet: "custom",
slotName: "status",
},
{
label: "操作",
align: "center",
fixed: "right",
width: 150,
templet: "custom",
slotName: "operate",
},
],
};
export default contentConfig;