{ "type" : "page", "title" : "归车登记", "body" : { "type" : "crud", "api" : "/api/flow/OA_VEHICLESEND_SEARCH_RETURNINFO", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "PLATENUMBER", "label" : "车牌号", "type" : "input-text" } ] }, "columns" : [ { "name" : "VEHICLEID_DISPLAY__", "label" : "车牌号", "width" : 100 }, { "name" : "DRIVERID_DISPLAY__", "label" : "驾驶员", "width" : 100 }, { "name" : "USERSNAME", "label" : "使用人", "width" : 150 }, { "name" : "DESTINATION", "label" : "目的地", "width" : 150 }, { "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" : "DISPATCHPLACE", "label" : "发车地点", "width" : 150, "toggled" : false }, { "name" : "ACTUALRETURNDATE", "label" : "实际归车时间", "width" : 150, "type" : "datetime", "format" : "YYYY-MM-DD HH:mm", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ" }, { "name" : "FRONTMILEAGE", "label" : "发车公里数", "width" : 100 }, { "name" : "BEHINDMILEAGE", "label" : "返回公里数", "width" : 100 }, { "name" : "ISRETURN", "label" : "是否归车", "width" : 70, "type" : "mapping", "map" : { "0" : "否", "1" : "是", "false" : "否", "true" : "是" } }, { "name" : "OPERATOR_DISPLAY__", "label" : "派车人", "width" : 80, "toggled" : false }, { "name" : "SENDDATE", "label" : "派车时间", "width" : 150, "type" : "datetime", "format" : "YYYY-MM-DD HH:mm", "inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ", "toggled" : false }, { "name" : "REMARK", "label" : "备注", "width" : 200, "toggled" : false }, { "name" : "OA_VEHICLESEND_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "DEPARTS", "label" : "用车部门", "width" : 200, "toggled" : false } ], "headerToolbar" : [ { "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/24722408-5b10-4ea4-8071-fe03e03a8335?format=amis", "api" : { "method" : "post", "url" : "/api/flow/OA_VEHICLESEND_LOAD?__egtpl=24722408-5b10-4ea4-8071-fe03e03a8335", "data" : { "OA_VEHICLESEND_ID" : "${OA_VEHICLESEND_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "566fb63e-3386-4c4c-ab4e-f185e6cfd7c3" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/OA_VEHICLESEND_UPDATE_RETURNINFO?__egtpl=24722408-5b10-4ea4-8071-fe03e03a8335", "close" : true }, { "type" : "button", "label" : "取消", "actionType" : "close" } ] } }, { "type" : "button", "id" : "取消归车登记", "label" : "取消归车登记", "actionType" : "ajax", "disabled" : true, "api" : { "method" : "post", "url" : "/api/flow/OA_VEHICLESEND_UPDATE_RETURNINFOCANCEL", "data" : { "OA_VEHICLESEND_ID" : "${selectedItems[0].OA_VEHICLESEND_ID}" } } }, { "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/24722408-5b10-4ea4-8071-fe03e03a8335?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/OA_VEHICLESEND_LOAD?__egtpl=24722408-5b10-4ea4-8071-fe03e03a8335", "data" : { "OA_VEHICLESEND_ID" : "${OA_VEHICLESEND_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "566fb63e-3386-4c4c-ab4e-f185e6cfd7c3" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } } } }, "pagination" ], "primaryField" : "OA_VEHICLESEND_ID", "onEvent" : { "selectedChange" : { "actions" : [ { "actionType" : "disabled", "componentId" : "取消归车登记" }, { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${event.data.selectedItems[0]}", "templateId" : "566fb63e-3386-4c4c-ab4e-f185e6cfd7c3" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } } ] }, "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "566fb63e-3386-4c4c-ab4e-f185e6cfd7c3" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } } }