{ "type" : "page", "title" : "薪资方案", "body" : { "type" : "crud", "api" : "/api/flow/HR_PAYSCHEME_SEARCH", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "NAME", "label" : "方案名称", "type" : "input-text" }, { "name" : "CURRENCYTYPE", "label" : "薪资币种", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/HR_PAYSCHEME_CURRENCYTYPE" }, { "name" : "ZEROWAY", "label" : "零头处理方式", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/HR_PAYSCHEME_ZEROWAY" }, { "name" : "MINPAYUNIT", "label" : "最小发放单位", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/HR_PAYSCHEME_MINPAYUNIT" }, { "name" : "ORGID", "label" : "所属公司", "type" : "picker", "clearable" : true, "source" : "/api/picker/35e321b3-a511-4cfb-ba29-ce8541cef747/list", "labelField" : "_label", "valueField" : "_id", "modalMode" : "dialog", "modalSize" : "lg", "pickerSchema" : { "mode" : "table", "headerToolbar" : [ { "type" : "search-box", "name" : "q", "placeholder" : "输入关键字搜索" } ], "footerToolbar" : [ "pagination" ] } }, { "name" : "STATUS", "label" : "审批状态", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/WFSTATUS" } ] }, "columns" : [ { "name" : "HR_PAYSCHEME_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "NAME", "label" : "方案名称", "width" : 200 }, { "name" : "ORGID_DISPLAY__", "label" : "所属公司", "width" : 200 }, { "name" : "CURRENCYTYPE", "label" : "薪资币种", "width" : 200, "type" : "mapping", "map" : { "1" : "人民币", "2" : "美元", "3" : "欧元" } }, { "name" : "ZEROWAY", "label" : "零头处理方式", "width" : 200, "type" : "mapping", "map" : { "1" : "四舍五入", "2" : "扣除零头", "3" : "零头进整", "4" : "结转下次" } }, { "name" : "MINPAYUNIT", "label" : "最小发放单位", "width" : 200, "type" : "mapping", "map" : { "1" : "0.01", "2" : "0.1", "3" : "1" } }, { "name" : "STATUS", "label" : "审批状态", "width" : 200, "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/76e2bc89-d224-4327-a8b3-08119101d34e?format=amis", "api" : { "method" : "get", "url" : "/api/form/HR_PAYSCHEME/defaults?templateId=76e2bc89-d224-4327-a8b3-08119101d34e" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_PAYSCHEME_ADD?__egtpl=76e2bc89-d224-4327-a8b3-08119101d34e", "close" : true }, { "type" : "button", "label" : "保存并提交审批", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_PAYSCHEME_ADDSUBMIT?__egtpl=76e2bc89-d224-4327-a8b3-08119101d34e", "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/76e2bc89-d224-4327-a8b3-08119101d34e?format=amis", "api" : { "method" : "post", "url" : "/api/flow/HR_PAYSCHEME_LOAD?__egtpl=76e2bc89-d224-4327-a8b3-08119101d34e", "data" : { "HR_PAYSCHEME_ID" : "${HR_PAYSCHEME_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${&}", "templateId" : "9d690abb-916b-427c-9bd6-4a8001ac0813" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } } ] } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_PAYSCHEME_UPDATE?__egtpl=76e2bc89-d224-4327-a8b3-08119101d34e", "close" : true }, { "type" : "button", "label" : "保存并提交审批", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_PAYSCHEME_ADDSUBMIT?__egtpl=76e2bc89-d224-4327-a8b3-08119101d34e", "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_PAYSCHEME_DELETE", "data" : { "ids" : "${selectedItems|pick:HR_PAYSCHEME_ID|join:','}" } } }, { "type" : "button", "id" : "提交审批", "label" : "提交审批", "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/flow/HR_PAYSCHEME_SUBMIT", "data" : { "HR_PAYSCHEME_ID" : "${selectedItems[0].HR_PAYSCHEME_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" : { "&" : "${selectedItems[0]}", "__readonly" : true }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/01ecfc3a-3e87-4b32-8a3b-66cc9b7f118a?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/HR_PAYSCHEME_LOAD?__egtpl=01ecfc3a-3e87-4b32-8a3b-66cc9b7f118a", "data" : { "HR_PAYSCHEME_ID" : "${HR_PAYSCHEME_ID}" }, "responseData" : { "&" : "${result}" } } } } }, { "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/c3def84d-f072-4690-bd5e-3faf1e9d4a1a?format=amis", "api" : { "method" : "post", "url" : "/api/flow/HR_PAYSCHEME_LOAD?__egtpl=c3def84d-f072-4690-bd5e-3faf1e9d4a1a", "data" : { "HR_PAYSCHEME_ID" : "${HR_PAYSCHEME_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 3, "item" : "${&}", "templateId" : "9d690abb-916b-427c-9bd6-4a8001ac0813" } }, "outputVar" : "scriptResult3" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult3.commands}" } } ] } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_PAYSCHEME_SETTINGUSERS?__egtpl=c3def84d-f072-4690-bd5e-3faf1e9d4a1a", "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/ba8ea3bb-d177-46f0-a0dd-786572f063e5?format=amis", "api" : { "method" : "post", "url" : "/api/flow/HR_PAYSCHEME_LOAD?__egtpl=ba8ea3bb-d177-46f0-a0dd-786572f063e5", "data" : { "HR_PAYSCHEME_ID" : "${HR_PAYSCHEME_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 4, "item" : "${&}", "templateId" : "9d690abb-916b-427c-9bd6-4a8001ac0813" } }, "outputVar" : "scriptResult4" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult4.commands}" } } ] } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/HR_PAYSCHEME_UPDATEITEMS?__egtpl=ba8ea3bb-d177-46f0-a0dd-786572f063e5", "close" : true }, { "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_PAYSCHEME_ID}", "businessTable" : "HR_PAYSCHEME", "readOnly" : true, "mode" : "read" } } ] } } }, "pagination" ], "primaryField" : "HR_PAYSCHEME_ID", "onEvent" : { "selectedChange" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${event.data.selectedItems[0]}", "templateId" : "9d690abb-916b-427c-9bd6-4a8001ac0813" } }, "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" : "9d690abb-916b-427c-9bd6-4a8001ac0813" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } }, { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 3, "item" : "${&}", "templateId" : "9d690abb-916b-427c-9bd6-4a8001ac0813" } }, "outputVar" : "scriptResult3" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult3.commands}" } }, { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 4, "item" : "${&}", "templateId" : "9d690abb-916b-427c-9bd6-4a8001ac0813" } }, "outputVar" : "scriptResult4" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult4.commands}" } } ] } } } }