{
 "hidden": false,
 "children": [{
  "configs": {
   "serverScript": "var userRoleRows, id = SysUtil.getId(),\
  data = app.get();\
var base64Util = com.ag.util.Base64Util;\
var USER_NAME = data.USER_NAME;\
var PASSWORD = base64Util.decode(data.PASSWORD);\
if (USER_NAME.equals('-'))\
  Wb.error('无效的用户名。');\
if (PASSWORD.equals('******'))\
  Wb.error('无效的密码。');\
app.run(\"select 1 from WB_USER where USER_NAME='\"+USER_NAME+\"'\", {\
  errorText: '用户名称 \"' + USER_NAME + '\" 已经存在。'\
});\
\
\
var rs = app.run('select * from user_pwd_config');\
if(rs.next()){\
  var pwd_length = rs.getInt('pwd_length');\
  var contains_num = rs.getInt('contains_num');\
  var contains_uppchar = rs.getInt('contains_uppchar');\
  var contains_lowchar = rs.getInt('contains_lowchar');\
  var contains_lowchar = rs.getInt('contains_lowchar');\
}\
\
userRoleRows = Wb.decode(data.roleGrid);\
app.set({\
  USER_ID: id,\
  PASSWORD: Encrypter.getMD5(data.PASSWORD),\
  CREATE_DATE: new JavaDate(),\
  LOGIN_TIMES: 0,\
  USER_NAME: USER_NAME\
});\
app.update({\
  tableName: 'WB_USER',\
  mode: 'insert'\
}); //updater默认启用事务\
Wb.each(userRoleRows, function(rec) {\
  rec.USER_ID = id;\
});\
request.setAttribute('create', Wb.encode(userRoleRows));\
app.update({\
  tableName: 'WB_USER_ROLE'\
});\
app.send({\
  USER_ID: id\
});",
   "itemId": "module"
  },
  "expanded": true,
  "children": [],
  "type": "module"
 }],
 "roles": {},
 "title": "添加",
 "iconCls": "",
 "inframe": false,
 "pageLink": ""
}