{ "type" : "page", "title" : "用车申请", "body" : { "type" : "crud", "api" : "/api/flow/OA_VEHICLEAPPLICATION_SEARCH", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "PLATENUMBER", "label" : "车牌号", "type" : "input-text" }, { "name" : "OUTWARDRUNDATE", "label" : "预计出车时间", "type" : "input-datetime-range" }, { "name" : "TRANSPORTATION", "label" : "目的地距离", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/OA_VEHICLEAPPLICATION_TRANSRANGE" }, { "name" : "STATUS", "label" : "审批状态", "type" : "select", "clearable" : true, "source" : "/api/poc/dict/WFSTATUS" } ] }, "columns" : [ { "name" : "OA_VEHICLEAPPLICATION_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "VEHICLEID_DISPLAY__", "label" : "车牌号", "width" : 100 }, { "name" : "VEHICLETYPEID", "label" : "车辆类型", "width" : 100, "toggled" : false }, { "name" : "BURDEN", "label" : "核定载客人数/载货量", "width" : 100, "toggled" : false }, { "name" : "PROPOSER_DISPLAY__", "label" : "申请人", "width" : 100 }, { "name" : "APPLICATIONDATE", "label" : "申请日期", "width" : 80, "type" : "date", "format" : "YYYY-MM-DD", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "DEPARTSNAME", "label" : "用车部门", "width" : 100 }, { "name" : "USERNAME", "label" : "使用人", "width" : 100 }, { "name" : "OUTWARDRUNDATE", "label" : "预计出车时间", "width" : 150, "type" : "datetime", "format" : "YYYY-MM-DD HH:mm", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "RETURNDATE", "label" : "预计归车时间", "width" : 150, "type" : "datetime", "format" : "YYYY-MM-DD HH:mm", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "TRANSPORTATION", "label" : "目的地距离", "width" : 150, "type" : "mapping", "map" : { "1" : "短途", "2" : "长途" } }, { "name" : "DESTINATION", "label" : "目的地", "width" : 200 }, { "name" : "MATTER", "label" : "用车事由", "width" : 200 }, { "name" : "ALLOCATIONSTATUS", "label" : "派车情况", "width" : 80, "type" : "mapping", "map" : { "1" : "未派车", "2" : "已派车" } }, { "name" : "STATUS", "label" : "审批状态", "width" : 150, "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/f593fed2-5915-47d7-a7fc-ed04ab5d6bba?format=amis", "api" : { "method" : "get", "url" : "/api/form/OA_VEHICLEAPPLICATION/defaults?templateId=f593fed2-5915-47d7-a7fc-ed04ab5d6bba" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/OA_VEHICLEAPPLICATION_ADD?__egtpl=f593fed2-5915-47d7-a7fc-ed04ab5d6bba", "close" : true }, { "type" : "button", "label" : "保存并提交审批", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/OA_VEHICLEAPPLICATION_SAVE_AND_SUBMIT?__egtpl=f593fed2-5915-47d7-a7fc-ed04ab5d6bba", "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/f593fed2-5915-47d7-a7fc-ed04ab5d6bba?format=amis", "api" : { "method" : "post", "url" : "/api/flow/OA_VEHICLEAPPLICATION_LOAD?__egtpl=f593fed2-5915-47d7-a7fc-ed04ab5d6bba", "data" : { "OA_VEHICLEAPPLICATION_ID" : "${OA_VEHICLEAPPLICATION_ID}" }, "responseData" : { "&" : "${result}" } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/OA_VEHICLEAPPLICATION_UPDATE?__egtpl=f593fed2-5915-47d7-a7fc-ed04ab5d6bba", "close" : true }, { "type" : "button", "label" : "保存并提交审批", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/OA_VEHICLEAPPLICATION_SAVE_AND_SUBMIT?__egtpl=f593fed2-5915-47d7-a7fc-ed04ab5d6bba", "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/OA_VEHICLEAPPLICATION_DELETE", "data" : { "ids" : "${selectedItems|pick:OA_VEHICLEAPPLICATION_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/f593fed2-5915-47d7-a7fc-ed04ab5d6bba?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/OA_VEHICLEAPPLICATION_LOAD?__egtpl=f593fed2-5915-47d7-a7fc-ed04ab5d6bba", "data" : { "OA_VEHICLEAPPLICATION_ID" : "${OA_VEHICLEAPPLICATION_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/35151b53-4984-4d9c-95f0-95bf0cad8447?format=amis", "api" : { "method" : "post", "url" : "/api/flow/OA_VEHICLEAPPLICATION_LOADREVOKE?__egtpl=35151b53-4984-4d9c-95f0-95bf0cad8447", "data" : { "OA_VEHICLEAPPLICATION_ID" : "${OA_VEHICLEAPPLICATION_ID}" }, "responseData" : { "&" : "${result}" } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/OA_VEHICLEAPPLICATION_REVOKE?__egtpl=35151b53-4984-4d9c-95f0-95bf0cad8447", "close" : true }, { "type" : "button", "label" : "取消", "actionType" : "close" } ] } }, { "type" : "button", "id" : "提交审批", "label" : "提交审批", "actionType" : "ajax", "disabled" : true, "api" : { "method" : "post", "url" : "/api/flow/OA_VEHICLEAPPLICATION_SUBMIT", "data" : { "OA_VEHICLEAPPLICATION_ID" : "${selectedItems[0].OA_VEHICLEAPPLICATION_ID}" } } }, { "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].OA_VEHICLEAPPLICATION_ID}", "businessTable" : "OA_VEHICLEAPPLICATION", "readOnly" : true, "mode" : "read" } } ] } } }, "pagination" ], "primaryField" : "OA_VEHICLEAPPLICATION_ID", "onEvent" : { "selectedChange" : { "actions" : [ { "actionType" : "disabled", "componentId" : "提交审批" }, { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 3, "item" : "${event.data.selectedItems[0]}", "templateId" : "623fa631-ed8d-47e1-9ec7-762fb4252615" } }, "outputVar" : "scriptResult3" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult3.commands}" } } ] }, "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${&}", "templateId" : "623fa631-ed8d-47e1-9ec7-762fb4252615" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } } ] } } } }