{ "type" : "page", "title" : "转正申请", "body" : { "type" : "crud", "api" : "/api/flow/HR_EMPBEREGULARWORKER_SEARCH", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "POSITIONID", "label" : "职位", "type" : "tree-select", "clearable" : true, "source" : "/api/template/feeee51d-d41b-410b-b7a4-67d61ec8c4df/tree", "searchable" : true, "onlyLeaf" : true }, { "name" : "JOINDATE", "label" : "入职日期", "type" : "input-date-range" }, { "name" : "APPLYDATE", "label" : "申请日期", "type" : "input-date-range" }, { "name" : "TRYSTARTDATE", "label" : "试用期开始日期", "type" : "input-date-range" }, { "name" : "TRYENDDATE", "label" : "试用期结束日期", "type" : "input-date-range" }, { "name" : "STATUS", "label" : "审批状态", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/WFSTATUS" } ] }, "columns" : [ { "name" : "HR_EMPBEREGULARWORKER_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "EMPLOYEE_DISPLAY__", "label" : "姓名", "width" : 150 }, { "name" : "BIRTHDATE", "label" : "出生年月", "width" : 150, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "POSITIONID_DISPLAY__", "label" : "职位", "width" : 300 }, { "name" : "JOINDATE", "label" : "入职日期", "width" : 150, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "APPLYDATE", "label" : "申请日期", "width" : 150, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "TRYSTARTDATE", "label" : "试用期开始日期", "width" : 150, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "TRYENDDATE", "label" : "试用期结束日期", "width" : 150, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "STATUS", "label" : "审批状态", "width" : 80, "type" : "mapping", "map" : { "1" : "未提交", "2" : "处理中", "3" : "通过", "4" : "未通过", "5" : "重新提交", "6" : "作废" } } ], "headerToolbar" : [ { "type" : "button", "id" : "添加", "label" : "添加", "level" : "primary", "actionType" : "dialog", "dialog" : { "type" : "dialog", "title" : "添加", "size" : "lg", "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/8ee457ad-f037-4f45-a317-7707c32de1a8?format=amis", "api" : { "method" : "get", "url" : "/api/form/HR_EMPBEREGULARWORKER/defaults?templateId=8ee457ad-f037-4f45-a317-7707c32de1a8" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_EMPBEREGULARWORKER_ADD?__egtpl=8ee457ad-f037-4f45-a317-7707c32de1a8", "close" : true }, { "type" : "button", "label" : "保存并提交审批", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_EMPBEREGULARWORKER_SAVE_AND_SUBMIT?__egtpl=8ee457ad-f037-4f45-a317-7707c32de1a8", "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/8ee457ad-f037-4f45-a317-7707c32de1a8?format=amis", "api" : { "method" : "post", "url" : "/api/flow/HR_EMPBEREGULARWORKER_LOAD?__egtpl=8ee457ad-f037-4f45-a317-7707c32de1a8", "data" : { "HR_EMPBEREGULARWORKER_ID" : "${HR_EMPBEREGULARWORKER_ID}" }, "responseData" : { "&" : "${result}" } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_EMPBEREGULARWORKER_UPDATE?__egtpl=8ee457ad-f037-4f45-a317-7707c32de1a8", "close" : true }, { "type" : "button", "label" : "保存并提交审批", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_EMPBEREGULARWORKER_SAVE_AND_SUBMIT?__egtpl=8ee457ad-f037-4f45-a317-7707c32de1a8", "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_EMPBEREGULARWORKER_DELETE", "data" : { "ids" : "${selectedItems|pick:HR_EMPBEREGULARWORKER_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/8ee457ad-f037-4f45-a317-7707c32de1a8?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/HR_EMPBEREGULARWORKER_LOAD?__egtpl=8ee457ad-f037-4f45-a317-7707c32de1a8", "data" : { "HR_EMPBEREGULARWORKER_ID" : "${HR_EMPBEREGULARWORKER_ID}" }, "responseData" : { "&" : "${result}" } } } } }, { "type" : "button", "id" : "提交审批", "label" : "提交审批", "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/flow/HR_EMPBEREGULARWORKER_SUBMIT", "data" : { "HR_EMPBEREGULARWORKER_ID" : "${selectedItems[0].HR_EMPBEREGULARWORKER_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_EMPBEREGULARWORKER_ID" : "${selectedItems[0].HR_EMPBEREGULARWORKER_ID}" }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/65399cf4-c480-4fab-9fd4-bf89b4e309a0?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_EMPBEREGULARWORKER_ID}", "businessTable" : "HR_EMPBEREGULARWORKER", "readOnly" : true, "mode" : "read" } } ] } } }, "pagination" ], "primaryField" : "HR_EMPBEREGULARWORKER_ID", "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${&}", "templateId" : "dcd2f8ce-da90-4fec-84ad-8a51c2a5beb9" } }, "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" : "dcd2f8ce-da90-4fec-84ad-8a51c2a5beb9" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } } }