{ "type" : "page", "title" : "人员证书借用登记", "body" : { "type" : "crud", "api" : "/api/flow/HR_CARDBORROWREGISTER_SEARCH", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "APPLYORGID", "label" : "借用(分)公司 ", "type" : "picker", "clearable" : true, "source" : "/api/picker/1a998b23-371d-4ebb-911f-6465a56a6809/list", "labelField" : "_label", "valueField" : "_id", "modalMode" : "dialog", "modalSize" : "lg", "pickerSchema" : { "mode" : "table", "headerToolbar" : [ { "type" : "search-box", "name" : "q", "placeholder" : "输入关键字搜索" } ], "footerToolbar" : [ "pagination" ] } }, { "name" : "PROJECTNAME", "label" : "工程名称", "type" : "input-text" }, { "name" : "BORROWUSE", "label" : "借用人", "type" : "picker", "clearable" : true, "source" : "/api/picker/1b3bad0b-a24b-4347-9466-db78f7432756/list", "labelField" : "_label", "valueField" : "_id", "modalMode" : "dialog", "modalSize" : "lg", "pickerSchema" : { "mode" : "table", "headerToolbar" : [ { "type" : "search-box", "name" : "q", "placeholder" : "输入关键字搜索" } ], "footerToolbar" : [ "pagination" ] }, "placeholder" : "请点击右侧的图标" }, { "name" : "BORROWDATE", "label" : "借用日期", "type" : "input-date-range" }, { "name" : "ISRETURN", "label" : "是否归还", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/YESNO" }, { "name" : "CARDTYPE", "label" : "证书种类", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/CARDTYPE" }, { "name" : "CARDNAME", "label" : "证书名称", "type" : "input-text" } ] }, "columns" : [ { "name" : "HR_CARDBORROWREGISTER_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "CARDNAME", "label" : "证书名称", "width" : 250 }, { "name" : "BORROWUSE_DISPLAY__", "label" : "借用人", "width" : 80 }, { "name" : "BORROWDATE", "label" : "借用日期", "width" : 100, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "APPLYORGID_DISPLAY__", "label" : "借用(分)公司 ", "width" : 200, "toggled" : false }, { "name" : "APPLYDEPARTID_DISPLAY__", "label" : "借用部门", "width" : 250, "toggled" : false }, { "name" : "PROJECTNAME", "label" : "工程名称", "width" : 200 }, { "name" : "BORROWREASON", "label" : "借用原因", "width" : 200 }, { "name" : "PREDICTRETURNDATE", "label" : "预计归还日期", "width" : 100, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "RETURNDATE", "label" : "归还日期", "width" : 100, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "ISRETURN", "label" : "是否归还", "width" : 60, "type" : "mapping", "map" : { "0" : "否", "1" : "是", "false" : "否", "true" : "是" } } ], "headerToolbar" : [ { "type" : "button", "id" : "有申请借用登记", "label" : "有申请借用登记", "level" : "primary", "actionType" : "dialog", "dialog" : { "type" : "dialog", "title" : "有申请借用登记", "size" : "lg", "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/b51779a9-f778-478a-9750-71a4881c6d6a?format=amis", "api" : { "method" : "get", "url" : "/api/form/HR_CARDBORROWREGISTER/defaults?templateId=b51779a9-f778-478a-9750-71a4881c6d6a" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_CARDBORROWREGISTER_ADD2?__egtpl=b51779a9-f778-478a-9750-71a4881c6d6a", "close" : true }, { "type" : "button", "label" : "取消", "actionType" : "close" } ] } }, { "type" : "button", "id" : "无申请借用登记", "label" : "无申请借用登记", "level" : "primary", "actionType" : "dialog", "dialog" : { "type" : "dialog", "title" : "无申请借用登记", "size" : "lg", "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/b4d20b5c-dc90-4093-81c4-8c79745de959?format=amis", "api" : { "method" : "get", "url" : "/api/form/HR_CARDBORROWREGISTER/defaults?templateId=b4d20b5c-dc90-4093-81c4-8c79745de959" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_CARDBORROWREGISTER_ADD?__egtpl=b4d20b5c-dc90-4093-81c4-8c79745de959", "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/0b47270f-b164-4947-8d15-031aaa50c39e?format=amis", "api" : { "method" : "post", "url" : "/api/flow/HR_CARDBORROWREGISTER_LOAD?__egtpl=0b47270f-b164-4947-8d15-031aaa50c39e", "data" : { "HR_CARDBORROWREGISTER_ID" : "${HR_CARDBORROWREGISTER_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${&}", "templateId" : "1c19ab34-97cf-427e-af36-9b6ee3fd37e1" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } } ] } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_CARDBORROWREGISTER_UPDATE?__egtpl=0b47270f-b164-4947-8d15-031aaa50c39e", "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/HR_CARDBORROWREGISTER_DELETE", "data" : { "ids" : "${selectedItems|pick:HR_CARDBORROWREGISTER_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/a9961fbe-2362-4183-9266-a253b5d096b4?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/HR_CARDBORROWREGISTER_LOAD?__egtpl=a9961fbe-2362-4183-9266-a253b5d096b4", "data" : { "HR_CARDBORROWREGISTER_ID" : "${HR_CARDBORROWREGISTER_ID}" }, "responseData" : { "&" : "${result}" } } } } }, "pagination" ], "primaryField" : "HR_CARDBORROWREGISTER_ID", "onEvent" : { "selectedChange" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 3, "item" : "${event.data.selectedItems[0]}", "templateId" : "1c19ab34-97cf-427e-af36-9b6ee3fd37e1" } }, "outputVar" : "scriptResult3" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult3.commands}" } } ] }, "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "1c19ab34-97cf-427e-af36-9b6ee3fd37e1" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } }, { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${&}", "templateId" : "1c19ab34-97cf-427e-af36-9b6ee3fd37e1" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } } ] } } } }