{ "type" : "page", "title" : "用品档案", "body" : { "type" : "grid", "columns" : [ { "md" : 3, "body" : { "type" : "input-tree", "name" : "tree", "showOutline" : true, "initiallyOpen" : true, "virtualThreshold" : 100000, "className" : "eip4-treegrid-tree", "id" : "treegrid_tree", "source" : "/api/template/f91a6d73-ac2a-44f8-bd4f-697569c87364/tree" } }, { "md" : 9, "body" : { "type" : "crud", "id" : "treegrid_crud", "syncLocation" : false, "api" : "/api/template/treegrid?treeRef=f91a6d73-ac2a-44f8-bd4f-697569c87364&gridTable=OA_OFFICE_GOODS&rcol=GOODSSORT_ID&node=${tree}&page=${page}&perPage=${perPage}", "selectable" : true, "checkOnItemClick" : true, "headerToolbar" : [ { "type" : "button", "id" : "添加", "label" : "添加", "level" : "primary", "actionType" : "dialog", "dialog" : { "type" : "dialog", "title" : "添加", "size" : "lg", "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/cf7cdbf8-f45b-43ee-9094-30065b8fe193?format=amis", "api" : { "method" : "get", "url" : "/api/form/OA_OFFICE_GOODS/defaults?templateId=cf7cdbf8-f45b-43ee-9094-30065b8fe193" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/OA_OFFICE_GOODS_ADD?__egtpl=cf7cdbf8-f45b-43ee-9094-30065b8fe193", "close" : true }, { "type" : "button", "label" : "取消", "actionType" : "close" } ] } }, { "type" : "button", "id" : "修改", "label" : "修改", "actionType" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "修改", "size" : "lg", "data" : { "&" : "${selectedItems[0]}" }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/cf7cdbf8-f45b-43ee-9094-30065b8fe193?format=amis", "api" : { "method" : "post", "url" : "/api/flow/OA_OFFICE_GOODS_LOAD?__egtpl=cf7cdbf8-f45b-43ee-9094-30065b8fe193", "data" : { "OA_OFFICE_GOODS_ID" : "${OA_OFFICE_GOODS_ID}" }, "responseData" : { "&" : "${result}" } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/OA_OFFICE_GOODS_UPDATE?__egtpl=cf7cdbf8-f45b-43ee-9094-30065b8fe193", "close" : true }, { "type" : "button", "label" : "取消", "actionType" : "close" } ] } }, { "type" : "button", "id" : "删除", "label" : "删除", "level" : "danger", "actionType" : "ajax", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "confirmText" : "确定删除此记录吗?", "api" : { "method" : "post", "url" : "/api/flow/OA_OFFICE_GOODS_DELETE", "data" : { "ids" : "${selectedItems|pick:OA_OFFICE_GOODS_ID|join:','}" } } }, { "type" : "button", "id" : "查看", "label" : "查看", "actionType" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "查看", "size" : "lg", "data" : { "&" : "${selectedItems[0]}", "__readonly" : true }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/cf7cdbf8-f45b-43ee-9094-30065b8fe193?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/OA_OFFICE_GOODS_LOAD?__egtpl=cf7cdbf8-f45b-43ee-9094-30065b8fe193", "data" : { "OA_OFFICE_GOODS_ID" : "${OA_OFFICE_GOODS_ID}" }, "responseData" : { "&" : "${result}" } } } } }, { "type" : "button", "id" : "停用", "label" : "停用", "actionType" : "ajax", "confirmText" : "确认要停用此用品吗?", "api" : { "method" : "post", "url" : "/api/flow/OA_OFFICE_GOODS_OFF", "data" : { "OA_OFFICE_GOODS_ID" : "${selectedItems[0].OA_OFFICE_GOODS_ID}" } }, "disabledOn" : "${!selectedItems || selectedItems.length === 0}" }, { "type" : "button", "id" : "启用", "label" : "启用", "actionType" : "ajax", "confirmText" : "确认要启用此用品吗?", "api" : { "method" : "post", "url" : "/api/flow/OA_OFFICE_GOODS_ON", "data" : { "OA_OFFICE_GOODS_ID" : "${selectedItems[0].OA_OFFICE_GOODS_ID}" } }, "disabledOn" : "${!selectedItems || selectedItems.length === 0}" }, "pagination" ], "primaryField" : "OA_OFFICE_GOODS_ID", "filter" : { "title" : "查询", "body" : [ { "name" : "GOODS_NAME", "label" : "用品名称:", "type" : "input-text" }, { "name" : "GOODS_IMPORTANCE", "label" : "重要性", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/OFFICE_SIZE" }, { "name" : "USESTATUS", "label" : "使用状态", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/OFFICE_USERSTATUS" } ] }, "columns" : [ { "name" : "OA_OFFICE_GOODS_ID", "label" : "主键", "width" : 100, "toggled" : false }, { "name" : "GOODS_NAME", "label" : "用品名称", "width" : 100 }, { "name" : "GOODS_UNIT", "label" : "计量单位", "width" : 100 }, { "name" : "GOODS_STANDARD", "label" : "规格", "width" : 100 }, { "name" : "GOODSSORT_ID_DISPLAY__", "label" : "用品类别", "width" : 100 }, { "name" : "GOODS_IMPORTANCE", "label" : "重要性", "width" : 100, "type" : "mapping", "map" : { "1" : "大件", "2" : "小件" } }, { "name" : "MAXIMUMINVENTORY", "label" : "库存上限", "width" : 100 }, { "name" : "MININUMINVENTORY", "label" : "库存下限", "width" : 100 }, { "name" : "USESTATUS", "label" : "使用状态", "width" : 100, "type" : "mapping", "map" : { "0" : "停用", "1" : "启用" } }, { "name" : "REMARK", "label" : "备注", "width" : 100, "toggled" : false } ] } } ] } }