{ "type" : "page", "title" : "人员合同信息", "body" : { "type" : "crud", "api" : "/api/flow/HR_PACT_SEARCH", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "SIGNINTIME", "label" : "签订日期", "type" : "input-date-range" }, { "name" : "STATUS", "label" : "审批状态", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/WFSTATUS" } ] }, "columns" : [ { "name" : "HR_PACT_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "EMPLOYEEID_DISPLAY__", "label" : "姓名", "width" : 200 }, { "name" : "SIGNINTIME", "label" : "签订日期", "width" : 200, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "TYPE", "label" : "合同类型", "width" : 200, "type" : "mapping", "map" : { "1" : "固定期", "2" : "无固定期", "3" : "临时合同" } }, { "name" : "PACTSTARTTIME", "label" : "合同开始日期", "width" : 200, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "PACTENDTIME", "label" : "合同结束日期", "width" : 200, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "TRYSTARTTIME", "label" : "试用开始日期", "width" : 200, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "TRYENDTIME", "label" : "试用结束日期", "width" : 200, "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/a2eba7f7-c934-4e54-98da-0f1c15810a11?format=amis", "api" : { "method" : "get", "url" : "/api/form/HR_PACT/defaults?templateId=a2eba7f7-c934-4e54-98da-0f1c15810a11" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_PACT_ADD?__egtpl=a2eba7f7-c934-4e54-98da-0f1c15810a11", "close" : true }, { "type" : "button", "label" : "保存并提交审批", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_PACT_SAVE_AND_SUBMIT?__egtpl=a2eba7f7-c934-4e54-98da-0f1c15810a11", "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/a2eba7f7-c934-4e54-98da-0f1c15810a11?format=amis", "api" : { "method" : "post", "url" : "/api/flow/HR_PACT_LOAD?__egtpl=a2eba7f7-c934-4e54-98da-0f1c15810a11", "data" : { "HR_PACT_ID" : "${HR_PACT_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${&}", "templateId" : "d604d375-dc54-40ad-806c-496d70f5ca21" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } } ] } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_PACT_UPDATE?__egtpl=a2eba7f7-c934-4e54-98da-0f1c15810a11", "close" : true }, { "type" : "button", "label" : "保存并提交审批", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_PACT_SAVE_AND_SUBMIT?__egtpl=a2eba7f7-c934-4e54-98da-0f1c15810a11", "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_PACT_DELETE", "data" : { "ids" : "${selectedItems|pick:HR_PACT_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/a2eba7f7-c934-4e54-98da-0f1c15810a11?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/HR_PACT_LOAD?__egtpl=a2eba7f7-c934-4e54-98da-0f1c15810a11", "data" : { "HR_PACT_ID" : "${HR_PACT_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${&}", "templateId" : "d604d375-dc54-40ad-806c-496d70f5ca21" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } } ] } } } } }, { "type" : "button", "id" : "提交审批", "label" : "提交审批", "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/flow/HR_PACT_SUBMIT", "data" : { "HR_PACT_ID" : "${selectedItems[0].HR_PACT_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_PACT_ID" : "${selectedItems[0].HR_PACT_ID}" }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/98161b70-66f1-403c-9515-46dff82567da?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_PACT_ID}", "businessTable" : "HR_PACT", "readOnly" : true, "mode" : "read" } } ] } } }, "pagination" ], "primaryField" : "HR_PACT_ID", "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${&}", "templateId" : "d604d375-dc54-40ad-806c-496d70f5ca21" } }, "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" : "d604d375-dc54-40ad-806c-496d70f5ca21" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } } }