{"hidden":false,"children":[{"configs":{"itemId":"module","serverScript":"var id, ids = [];\nvar username = app.get('sys.username'); \nvar recs = Wb.decode(request.getParameter('create'));\nWb.each(recs, function (rec) {\n    id = SysUtil.getId(); //getSeqId(0);\n    rec.MENU_RES_ID = id;\n    rec.CREATED_BY=username;\n    rec.CREATED_ON=new Date();\n    ids.push({\n      MENU_RES_ID: id,\n      CREATED_BY:username,\n      CREATED_ON:new Date()\n    });\n});\nrequest.setAttribute('create', Wb.encode(recs)); //重置create记录\nvar upds = Wb.decode(request.getParameter('update'));\nWb.each(upds, function (rec) {\n  rec.UPDATED_BY=username;\n  rec.UPDATED_ON=new Date();\n  ids.push({\n    UPDATED_BY:username,\n    UPDATED_ON:new Date()\n    });\n});\nrequest.setAttribute('update', Wb.encode(upds));\napp.update({\n    tableName: 'WB_MENU_RES'\n});\n// app.send(ids); //把id列表发送到客户端以同步到表格\napp.send(ids);//如果需要同时同步新建和修改的记录以及其他参\n\n"},"expanded":false,"children":[],"type":"module"}],"roles":{"default":1},"title":"保存按钮","iconCls":"","inframe":false,"pageLink":""}