{ "type" : "page", "title" : "客户信息维护", "body" : { "type" : "crud", "api" : "/api/flow/SYS_BUNDLE_CUSTOMER_SEARCH", "syncLocation" : false, "selectable" : true, "checkOnItemClick" : true, "filter" : { "title" : "查询", "body" : [ { "name" : "CUSTOMERNAME", "label" : "客户名称", "type" : "input-text" }, { "name" : "REMARK", "label" : "备注", "type" : "input-text" } ] }, "columns" : [ { "name" : "BUNDLE_CUSTOMER_ID", "label" : "主键", "width" : 200, "toggled" : false }, { "name" : "CUSTOMERNAME", "label" : "客户名称", "width" : 200 }, { "name" : "REMARK", "label" : "备注", "width" : 200 }, { "name" : "BUNDLELIST", "label" : "模块", "width" : 200, "toggled" : false } ], "headerToolbar" : [ { "type" : "button", "id" : "添加", "label" : "添加", "level" : "primary", "actionType" : "dialog", "dialog" : { "type" : "dialog", "title" : "添加", "size" : "lg", "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/02152add-fe8e-4fce-bf49-cd741f5c907e?format=amis", "api" : { "method" : "get", "url" : "/api/form/BUNDLE_CUSTOMER/defaults?templateId=02152add-fe8e-4fce-bf49-cd741f5c907e" } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/SYS_BUNDLE_CUSTOMER_ADD?__egtpl=02152add-fe8e-4fce-bf49-cd741f5c907e", "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/02152add-fe8e-4fce-bf49-cd741f5c907e?format=amis", "api" : { "method" : "post", "url" : "/api/flow/SYS_BUNDLE_CUSTOMER_LOAD?__egtpl=02152add-fe8e-4fce-bf49-cd741f5c907e", "data" : { "BUNDLE_CUSTOMER_ID" : "${BUNDLE_CUSTOMER_ID}" }, "responseData" : { "&" : "${result}" } }, "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "f897e7a6-a7c4-4e79-96d8-5f02b5f0a5ca" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } } ] } } }, "actions" : [ { "type" : "button", "label" : "保存", "level" : "primary", "actionType" : "submit", "api" : "POST:/api/flow/SYS_BUNDLE_CUSTOMER_UPDATE?__egtpl=02152add-fe8e-4fce-bf49-cd741f5c907e", "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/SYS_BUNDLE_CUSTOMER_DELETE", "data" : { "ids" : "${selectedItems|pick:BUNDLE_CUSTOMER_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/12c0701d-30f9-47f6-89b2-385a7a30edeb?format=amis", "static" : true, "api" : { "method" : "post", "url" : "/api/flow/SYS_BUNDLE_CUSTOMER_LOAD?__egtpl=12c0701d-30f9-47f6-89b2-385a7a30edeb", "data" : { "BUNDLE_CUSTOMER_ID" : "${BUNDLE_CUSTOMER_ID}" }, "responseData" : { "&" : "${result}" } } } } }, { "type" : "button", "id" : "升级历史", "label" : "升级历史", "actionType" : "dialog", "disabledOn" : "${!selectedItems || selectedItems.length === 0}", "dialog" : { "type" : "dialog", "title" : "客户升级历史", "size" : "lg", "data" : { "BUNDLE_CUSTOMER_ID" : "${selectedItems[0].BUNDLE_CUSTOMER_ID}" }, "body" : { "type" : "service", "schemaApi" : "get:/api/page/schema/edbba1d9-33cc-4b81-ac9d-1e6bd26511d0?format=amis" }, "actions" : [ { "type" : "button", "label" : "关闭", "actionType" : "close" } ] } }, "pagination" ], "primaryField" : "BUNDLE_CUSTOMER_ID", "onEvent" : { "inited" : { "actions" : [ { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 1, "item" : "${&}", "templateId" : "f897e7a6-a7c4-4e79-96d8-5f02b5f0a5ca" } }, "outputVar" : "scriptResult1" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult1.commands}" } }, { "actionType" : "ajax", "api" : { "method" : "post", "url" : "/api/script/execute-template", "data" : { "seq" : 2, "item" : "${&}", "templateId" : "f897e7a6-a7c4-4e79-96d8-5f02b5f0a5ca" } }, "outputVar" : "scriptResult2" }, { "actionType" : "replayScriptCommands", "args" : { "commands" : "${event.data.scriptResult2.commands}" } } ] } } } }