{ "type" : "page", "title" : "培训计划", "body" : { "type" : "crud", "api" : "/api/flow/HR_TRAIN_PLAN_SEARCH", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "NAME", "label" : "计划名称", "type" : "input-text" }, { "name" : "PLAN_WAY", "label" : "培训方式", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/Training_way" }, { "name" : "COURSETYPE", "label" : "培训课程", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/HR_TRIAN_COURSETYPE" }, { "name" : "STARTDATE", "label" : "开始日期", "type" : "input-date-range" }, { "name" : "ENDDATE", "label" : "结束日期", "type" : "input-date-range" }, { "name" : "DO_STATUS", "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_TRAIN_PLAN_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "NAME", "label" : "计划名称", "width" : 200 }, { "name" : "DEPART_ID_DISPLAY__", "label" : "计划部门", "width" : 200 }, { "name" : "PRINCIPAL_DISPLAY__", "label" : "负责人", "width" : 70 }, { "name" : "PLAN_WAY", "label" : "培训方式", "width" : 70, "type" : "mapping", "map" : { "1" : "外部培训", "2" : "内部培训" } }, { "name" : "COURSETYPE", "label" : "培训课程", "width" : 100, "type" : "mapping", "map" : { "1" : "建造师注册证", "3" : "ABC三类人员证", "4" : "技术工人证", "5" : "十大员", "6" : "职称", "100" : "其他" } }, { "name" : "PERSON_COUNT", "label" : "计划人数", "width" : 70 }, { "name" : "STARTDATE", "label" : "开始日期", "width" : 100, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "ENDDATE", "label" : "结束日期", "width" : 100, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "CREATEBY_DISPLAY__", "label" : "制定人", "width" : 70 }, { "name" : "STATUS", "label" : "审批状态", "width" : 70, "type" : "mapping", "map" : { "1" : "未提交", "2" : "处理中", "3" : "通过", "4" : "未通过", "5" : "重新提交", "6" : "作废" } }, { "name" : "DO_STATUS", "label" : "执行状态", "width" : 70, "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/3d938886-631a-4a4f-902a-18b78cd1aaa0?format=amis", "api" : { "method" : "get", "url" : "/api/form/HR_TRAIN_PLAN/defaults?templateId=3d938886-631a-4a4f-902a-18b78cd1aaa0" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_TRAIN_PLAN_ADD?__egtpl=3d938886-631a-4a4f-902a-18b78cd1aaa0", "close" : true }, { "type" : "button", "label" : "保存并提交审批", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_TRAIN_PLAN_SAVE_AND_SUBMIT?__egtpl=3d938886-631a-4a4f-902a-18b78cd1aaa0", "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/3d938886-631a-4a4f-902a-18b78cd1aaa0?format=amis", "api" : { "method" : "post", "url" : "/api/flow/HR_TRAIN_PLAN_LOAD?__egtpl=3d938886-631a-4a4f-902a-18b78cd1aaa0", "data" : { "HR_TRAIN_PLAN_ID" : "${HR_TRAIN_PLAN_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${&}", "templateId" : "093cd444-7bff-4f47-ad30-3b9187ce8c4a" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } } ] } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_TRAIN_PLAN_UPDATE?__egtpl=3d938886-631a-4a4f-902a-18b78cd1aaa0", "close" : true }, { "type" : "button", "label" : "保存并提交审批", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_TRAIN_PLAN_SAVE_AND_SUBMIT?__egtpl=3d938886-631a-4a4f-902a-18b78cd1aaa0", "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_TRAIN_PLAN_DELETE", "data" : { "ids" : "${selectedItems|pick:HR_TRAIN_PLAN_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/3d938886-631a-4a4f-902a-18b78cd1aaa0?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/HR_TRAIN_PLAN_LOAD?__egtpl=3d938886-631a-4a4f-902a-18b78cd1aaa0", "data" : { "HR_TRAIN_PLAN_ID" : "${HR_TRAIN_PLAN_ID}" }, "responseData" : { "&" : "${result}" } } } } }, { "type" : "button", "id" : "提交审批", "label" : "提交审批", "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/flow/HR_TRAIN_PLAN_SUBMIT", "data" : { "HR_TRAIN_PLAN_ID" : "${selectedItems[0].HR_TRAIN_PLAN_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" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "打印培训计划", "size" : "lg", "data" : { "HR_TRAIN_PLAN_ID" : "${selectedItems[0].HR_TRAIN_PLAN_ID}" }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/c867185f-fbaf-423c-97b2-fd37a1399ab3?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_TRAIN_PLAN_ID}", "businessTable" : "HR_TRAIN_PLAN", "readOnly" : true, "mode" : "read" } } ] } } }, "pagination" ], "primaryField" : "HR_TRAIN_PLAN_ID", "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${&}", "templateId" : "093cd444-7bff-4f47-ad30-3b9187ce8c4a" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } }, { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "093cd444-7bff-4f47-ad30-3b9187ce8c4a" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } } }