{ "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/fdd10db0-963d-4e67-bf2a-584ba48fca33/tree" } }, { "md" : 9, "body" : { "type" : "crud", "id" : "treegrid_crud", "syncLocation" : false, "api" : "/api/template/treegrid?treeRef=fdd10db0-963d-4e67-bf2a-584ba48fca33&gridTable=PM_MATERIALREPOSITORY&rcol=RESOURCETYPEID&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/babab39a-d650-4a4f-9831-2afe6064dcda?format=amis", "api" : { "method" : "get", "url" : "/api/form/PM_MATERIALREPOSITORY/defaults?templateId=babab39a-d650-4a4f-9831-2afe6064dcda" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/PM_MATERIALREPOSITORY_ADD?__egtpl=babab39a-d650-4a4f-9831-2afe6064dcda", "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/6df61e2a-d184-4c72-afff-6ccbb66107fc?format=amis", "api" : { "method" : "post", "url" : "/api/flow/PM_MATERIALREPOSITORY_LOAD?__egtpl=6df61e2a-d184-4c72-afff-6ccbb66107fc", "data" : { "PM_MATERIALREPOSITORY_ID" : "${PM_MATERIALREPOSITORY_ID}" }, "responseData" : { "&" : "${result}" } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/PM_MATERIALREPOSITORY_UPDATE?__egtpl=6df61e2a-d184-4c72-afff-6ccbb66107fc", "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/PM_MATERIALREPOSITORY_DELETE", "data" : { "ids" : "${selectedItems|pick:PM_MATERIALREPOSITORY_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/fa2f9af1-99ac-4a72-9c5e-9fd1c29daa11?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/PM_MATERIALREPOSITORY_LOAD?__egtpl=fa2f9af1-99ac-4a72-9c5e-9fd1c29daa11", "data" : { "PM_MATERIALREPOSITORY_ID" : "${PM_MATERIALREPOSITORY_ID}" }, "responseData" : { "&" : "${result}" } } } } }, { "type" : "button", "id" : "历史成交价", "label" : "历史成交价", "actionType" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "历史成交价", "size" : "lg", "data" : { "PM_MATERIALREPOSITORY_ID" : "${selectedItems[0].PM_MATERIALREPOSITORY_ID}" }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/fab4b2e2-4bd0-4420-9b28-097e7a524294?format=amis" }, "actions" : [ { "type" : "button", "label" : "关闭", "actionType" : "close" } ] } }, { "type" : "button", "id" : "历史成交价", "label" : "历史成交价", "actionType" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "历史成交价", "size" : "lg", "data" : { "PM_MATERIALREPOSITORY_ID" : "${selectedItems[0].PM_MATERIALREPOSITORY_ID}" }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/1bb942c4-e5cd-405c-96e8-acc26754e39d?format=amis" }, "actions" : [ { "type" : "button", "label" : "关闭", "actionType" : "close" } ] } }, { "type" : "button", "id" : "供应商报价", "label" : "供应商报价", "actionType" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "供应商报价", "size" : "lg", "data" : { "PM_MATERIALREPOSITORY_ID" : "${selectedItems[0].PM_MATERIALREPOSITORY_ID}" }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/2c2184ba-2aa1-469c-8844-5819e069a308?format=amis" }, "actions" : [ { "type" : "button", "label" : "关闭", "actionType" : "close" } ] } }, "pagination" ], "primaryField" : "PM_MATERIALREPOSITORY_ID", "filter" : { "title" : "查询", "body" : [ { "name" : "MATERIALCODE", "label" : "材料编码", "type" : "input-text" }, { "name" : "MATERIALNAME", "label" : "材料名称", "type" : "input-text" }, { "name" : "SPECIFICATIONS", "label" : "规格", "type" : "input-text" }, { "name" : "ISFEEITEM", "label" : "费用项", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/YESNO" } ] }, "columns" : [ { "name" : "PM_MATERIALREPOSITORY_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "MATERIALCODE", "label" : "材料编码", "width" : 150 }, { "name" : "MATERIALNAME", "label" : "材料名称", "width" : 250 }, { "name" : "SPECIFICATIONS", "label" : "规格", "width" : 150 }, { "name" : "UNIT_DISPLAY__", "label" : "计量单位", "width" : 80 }, { "name" : "RESOURCETYPEID_DISPLAY__", "label" : "物资分类", "width" : 100 }, { "name" : "ISFEEITEM", "label" : "费用项", "width" : 80, "type" : "mapping", "map" : { "0" : "否", "1" : "是" } }, { "name" : "REMARK", "label" : "备注", "width" : 200 } ] } } ] } }