fix: 重写耗材模块
This commit is contained in:
94
src/views/inventory/consumables/config/content.ts
Normal file
94
src/views/inventory/consumables/config/content.ts
Normal file
@@ -0,0 +1,94 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user