{ "type" : "page", "title" : "绩效管理-考核方案", "body" : { "type" : "crud", "api" : "/api/flow/HR_ASSESSPLAN_SEARCH", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "NAME", "label" : "方案名称", "type" : "input-text" }, { "name" : "STARTTIME", "label" : "开始日期", "type" : "input-date-range" }, { "name" : "ENDTIME", "label" : "结束日期", "type" : "input-date-range" }, { "name" : "DOSTATUS", "label" : "执行状态", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/HR_PLAN_DOSTATUS" }, { "name" : "STATUS", "label" : "审批状态", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/WFSTATUS" } ] }, "columns" : [ { "name" : "HR_ASSESSPLAN_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "NAME", "label" : "方案名称", "width" : 200 }, { "name" : "STARTTIME", "label" : "开始日期", "width" : 200, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "ENDTIME", "label" : "结束日期", "width" : 200, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "CREATEBY_DISPLAY__", "label" : "制定人", "width" : 200 }, { "name" : "CREATETIME", "label" : "制定日期", "width" : 200, "type" : "datetime", "format" : "YYYY-MM-DD HH:mm", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "SCORE", "label" : "总分", "width" : 200 }, { "name" : "STATUS", "label" : "审批状态", "width" : 200, "type" : "mapping", "map" : { "1" : "未提交", "2" : "处理中", "3" : "通过", "4" : "未通过", "5" : "重新提交", "6" : "作废" } }, { "name" : "DOSTATUS", "label" : "执行状态", "width" : 200, "type" : "mapping", "map" : { "1" : "执行中", "2" : "已执行", "3" : "未执行" } } ], "headerToolbar" : [ { "type" : "button", "id" : "添加", "label" : "添加", "level" : "primary", "actionType" : "dialog", "dialog" : { "type" : "dialog", "title" : "添加", "size" : "lg", "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/a0e6a278-4777-4793-b126-9be6f05e6975?format=amis", "api" : { "method" : "get", "url" : "/api/form/HR_ASSESSPLAN/defaults?templateId=a0e6a278-4777-4793-b126-9be6f05e6975" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_ASSESSPLAN_ADD?__egtpl=a0e6a278-4777-4793-b126-9be6f05e6975", "close" : true }, { "type" : "button", "label" : "保存并提交审批", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_ASSESSPLAN_SAVE_AND_SUBMIT?__egtpl=a0e6a278-4777-4793-b126-9be6f05e6975", "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/a0e6a278-4777-4793-b126-9be6f05e6975?format=amis", "api" : { "method" : "post", "url" : "/api/flow/HR_ASSESSPLAN_LOAD?__egtpl=a0e6a278-4777-4793-b126-9be6f05e6975", "data" : { "HR_ASSESSPLAN_ID" : "${HR_ASSESSPLAN_ID}" }, "responseData" : { "&" : "${result}" } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_ASSESSPLAN_UPDATE?__egtpl=a0e6a278-4777-4793-b126-9be6f05e6975", "close" : true }, { "type" : "button", "label" : "保存并提交审批", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_ASSESSPLAN_SAVE_AND_SUBMIT?__egtpl=a0e6a278-4777-4793-b126-9be6f05e6975", "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_ASSESSPLAN_DELETE", "data" : { "ids" : "${selectedItems|pick:HR_ASSESSPLAN_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/fddbc506-f435-4bff-9814-e75b457aa1cc?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/HR_ASSESSPLAN_LOAD?__egtpl=fddbc506-f435-4bff-9814-e75b457aa1cc", "data" : { "HR_ASSESSPLAN_ID" : "${HR_ASSESSPLAN_ID}" }, "responseData" : { "&" : "${result}" } } } } }, { "type" : "button", "id" : "提交审批", "label" : "提交审批", "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/flow/HR_ASSESSPLAN_SUBMIT", "data" : { "HR_ASSESSPLAN_ID" : "${selectedItems[0].HR_ASSESSPLAN_ID}" } }, "disabledOn" : "${!selectedItems || selectedItems.length === 0 || (selectedItems[0].STATUS && selectedItems[0].STATUS != 1 && selectedItems[0].STATUS != 4 && selectedItems[0].STATUS != 5)}" }, { "type" : "button", "id" : "执行完成", "label" : "执行完成", "actionType" : "ajax", "disabled" : true, "api" : { "method" : "post", "url" : "/api/flow/HR_ASSESSPLAN_UPDATE_DOSTATUS", "data" : { "HR_ASSESSPLAN_ID" : "${selectedItems[0].HR_ASSESSPLAN_ID}" } } }, { "type" : "button", "id" : "打印绩效考核方案", "label" : "打印绩效考核方案", "actionType" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "打印绩效考核方案", "size" : "lg", "data" : { "HR_ASSESSPLAN_ID" : "${selectedItems[0].HR_ASSESSPLAN_ID}" }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/57fd6001-37aa-46b5-897c-9f592e3b0abf?format=amis" }, "actions" : [ { "type" : "button", "label" : "关闭", "actionType" : "close" } ] } }, { "type" : "button", "id" : "查看审批", "label" : "查看审批", "icon" : "fa fa-search", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "onEvent" : { "click" : { "actions" : [ { "actionType" : "openApprovalDrawer", "args" : { "taskName" : "审批详情", "processInstanceId" : "${selectedItems[0].processInstanceId || selectedItems[0].PROCESSINSTANCEID || ''}", "businessKey" : "${selectedItems[0].HR_ASSESSPLAN_ID}", "businessTable" : "HR_ASSESSPLAN", "readOnly" : true, "mode" : "read" } } ] } } }, "pagination" ], "primaryField" : "HR_ASSESSPLAN_ID", "onEvent" : { "selectedChange" : { "actions" : [ { "actionType" : "disabled", "componentId" : "执行完成" }, { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${event.data.selectedItems[0]}", "templateId" : "94a5aafe-bf94-45fe-a335-3545ce19e34d" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] }, "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${&}", "templateId" : "94a5aafe-bf94-45fe-a335-3545ce19e34d" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } } ] } } } }