PageRenderTime 20ms CodeModel.GetById 29ms RepoModel.GetById 1ms app.codeStats 0ms

/invoicing/WebRoot/views/limit/memberSet.html

http://svnbasic.googlecode.com/
HTML | 262 lines | 236 code | 25 blank | 1 comment | 0 complexity | ba1e36c052747542dba9de897b4b92d9 MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html>
  3. <head>
  4. <title>????</title>
  5. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  6. <meta http-equiv="description" content="this is my page">
  7. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  8. <link rel="stylesheet"
  9. href="../../script/themes/base/jquery.ui.all.css">
  10. <link rel="stylesheet" type="text/css"
  11. href="../../themes/gray/easyui.css" />
  12. <link rel="stylesheet" type="text/css" href="../../themes/icon.css" />
  13. <script type="text/javascript" src="../../script/jquery-1.4.4.min.js"></script>
  14. <script type="text/javascript"
  15. src="../../script/jquery.easyui.min.1.2.2.js"></script>
  16. <script type="text/javascript" src="../../script/jquery.json-2.2.js"></script>
  17. <script src="../../locale/easyui-lang-zh_CN.js"></script>
  18. <script type="text/javascript" src="memberSet.js"></script>
  19. <script src="../../script/external/jquery.bgiframe-2.1.2.js"></script>
  20. <script src="../../script/ui/jquery.ui.core.js"></script>
  21. <script src="../../script/ui/jquery.ui.widget.js"></script>
  22. <script src="../../script/ui/jquery.ui.mouse.js"></script>
  23. <script src="../../script/ui/jquery.ui.button.js"></script>
  24. <script src="../../script/ui/jquery.ui.draggable.js"></script>
  25. <script src="../../script/ui/jquery.ui.position.js"></script>
  26. <script src="../../script/ui/jquery.ui.resizable.js"></script>
  27. <script src="../../script/ui/jquery.ui.dialog.js"></script>
  28. <script src="../../script/ui/jquery.effects.core.js"></script>
  29. <link rel="stylesheet" href="../../style/demos.css">
  30. <style>
  31. body { font-size: 62.5%; }
  32. label, input { display:block; }
  33. input.text { margin-bottom:12px; width:95%; padding: .4em; }
  34. fieldset { padding:0; border:0; margin-top:25px; }
  35. h1 { font-size: 1.2em; margin: .6em 0; }
  36. div#users-contain { width: 350px; margin: 20px 0; }
  37. div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
  38. div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
  39. .ui-dialog .ui-state-error { padding: .3em; }
  40. .validateTips { border: 1px solid transparent; padding: 0.3em; }
  41. </style>
  42. <script>
  43. var temp_roleId;
  44. function tc(){
  45. $( "#dialog-form" ).dialog( "open" );
  46. }
  47. function tc_update(){
  48. var row = $('#member').datagrid('getSelected');
  49. if(row){
  50. //var rows = $('#member').datagrid("getSelected");
  51. var userName =row.userName;
  52. var userId = row.userId;
  53. var password= row.password;
  54. var telephone= row.telephone;
  55. var address = row.address;
  56. var roleId = row.roleId;
  57. $("#userId_u").attr('value',userId);
  58. $("#userName_u").attr('value',userName);
  59. $("#password_u").attr('value',password);
  60. $("#telephone_u").attr('value',telephone);
  61. $("#address_u").attr('value',address);
  62. //$("#roleId_u").attr('value',roleName);
  63. var m;
  64. $.each(temp_roleId,function(index, c){
  65. if(roleId ==c.roleId){
  66. m +="<option value='"+c.roleId+"' selected>"+c.roleName+"</option>";
  67. }else{
  68. m +="<option value='"+c.roleId+"'>"+c.roleName+"</option>";
  69. }
  70. });
  71. $('#roleId_u').append(m);
  72. $("#dialog-form-update" ).dialog( "open" );
  73. }else{
  74. $.messager.show( {
  75. title :'????',
  76. msg :'???????????',
  77. timeout :3000,
  78. showType :'fade'
  79. });
  80. }
  81. }
  82. $( function() {
  83. // a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
  84. $("#dialog:ui-dialog").dialog("destroy");
  85. //?????
  86. $.ajax({
  87. url :"../../item/findSelectOptionRoles.action",
  88. cache :true,
  89. async: false,
  90. success : function(data) {
  91. var m;
  92. var p = $.evalJSON(data);
  93. temp_roleId =p;
  94. $.each(p,function(index, c){
  95. m +="<option value='"+c.roleId+"'>"+c.roleName+"</option>";
  96. });
  97. $('#roleId').append(m);
  98. }
  99. });
  100. //
  101. $("#dialog-form-update").dialog( {
  102. autoOpen :false,
  103. height :450,
  104. resizable :false,
  105. width :350,
  106. modal :true,
  107. buttons : {
  108. "??" : function() {
  109. //var roleName = $("#roleName_update").val();
  110. var rows =$("#member").datagrid("getSelected");
  111. var userId = $("#userId_u").val();
  112. var userName=$("#userName_u").val();
  113. var password=$("#password_u").val();
  114. var telephone=$("#telephone_u").val();
  115. var address=$("#address_u").val();
  116. var roleId=$("#roleId_u").val();
  117. var ucode=rows.ucode;
  118. $.post("../../member/updateMember.action", {
  119. userId :userId,
  120. userName :userName,
  121. password :password,
  122. telephone :telephone,
  123. address :address,
  124. roleId :roleId,
  125. ucode:ucode
  126. }, function(data) {
  127. $("#dialog-form-update").dialog("close");
  128. $('#member').datagrid("reload");
  129. $.messager.show( {
  130. title :'????',
  131. msg :data,
  132. timeout :3000,
  133. showType :'fade'
  134. });
  135. });
  136. },
  137. "??" : function() {
  138. $(this).dialog("close");
  139. }
  140. },
  141. close : function() {
  142. //allFields.val("").removeClass("ui-state-error");
  143. }
  144. });
  145. $("#dialog-form").dialog( {
  146. autoOpen :false,
  147. height :450,
  148. resizable :false,
  149. width :350,
  150. modal :true,
  151. buttons : {
  152. "??" : function() {
  153. var userId = $("#userId").val();
  154. var userName = $("#userName").val();
  155. var password = $("#password").val();
  156. var telephone = $("#telephone").val();
  157. var address = $("#address").val();
  158. var roleId = $("#roleId").val();
  159. $.post("../../member/addMember.action", {
  160. userId :userId,
  161. userName :userName,
  162. password :password,
  163. telephone :telephone,
  164. address :address,
  165. roleId :roleId
  166. }, function(data) {
  167. $("#dialog-form").dialog("close");
  168. $('#member').datagrid("reload");
  169. $.messager.show( {
  170. title :'????',
  171. msg :data,
  172. timeout :3000,
  173. showType :'fade'
  174. });
  175. });
  176. },
  177. "??" : function() {
  178. $(this).dialog("close");
  179. }
  180. },
  181. close : function() {
  182. //allFields.val("").removeClass("ui-state-error");
  183. }
  184. });
  185. });
  186. </script>
  187. </head>
  188. <body>
  189. <div style="padding:5px;background:#efefef;width:99%;">
  190. <a href="javascript:void(0)" class="easyui-linkbutton" plain="true" iconCls="icon-add" onclick="tc()">??</a>
  191. <a href="javascript:void(0)" class="easyui-linkbutton" plain="true" iconCls="icon-remove" onclick="delAllSelections()">??</a>
  192. <a href="javascript:void(0)" class="easyui-linkbutton" plain="true" iconCls="icon-edit" onclick="tc_update()">??</a>
  193. <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-search">??</a>
  194. </div>
  195. <div id="member"></div>
  196. <div class="demo">
  197. <div id="dialog-form" title="??????" style="display:none">
  198. <p class="validateTips"></p>
  199. <form>
  200. <fieldset>
  201. <label for="name">??ID:</label>
  202. <input type="text" name="userId" id="userId" class="text ui-widget-content ui-corner-all" />
  203. <label for="name">????:</label>
  204. <input type="text" name="userName" id="userName" class="text ui-widget-content ui-corner-all" />
  205. <label for="name">????:</label>
  206. <input type="text" name="password" id="password" class="text ui-widget-content ui-corner-all" />
  207. <label for="name">????:</label>
  208. <input type="text" name="telephone" id="telephone" class="text ui-widget-content ui-corner-all" />
  209. <label for="name">????:</label>
  210. <input type="text" name="address" id="address" class="text ui-widget-content ui-corner-all" />
  211. <label for="name">????:</label>
  212. <!-- <input type="text" name="roleName" id="roleName" class="text ui-widget-content ui-corner-all" /> -->
  213. <select id="roleId" class="text ui-widget-content ui-corner-all" name="state" style="width:200px;" ></select>
  214. </fieldset>
  215. </form>
  216. </div>
  217. <div id="dialog-form-update" title="??????" style="display:none">
  218. <p class="validateTips"></p>
  219. <form>
  220. <fieldset>
  221. <label for="name">??ID:</label>
  222. <input type="text" name="userId_u" id="userId_u" class="text ui-widget-content ui-corner-all" />
  223. <label for="name">????:</label>
  224. <input type="text" name="userName_u" id="userName_u" class="text ui-widget-content ui-corner-all" />
  225. <label for="name">????:</label>
  226. <input type="text" name="password_u" id="password_u" class="text ui-widget-content ui-corner-all" />
  227. <label for="name">????:</label>
  228. <input type="text" name="telephone_u" id="telephone_u" class="text ui-widget-content ui-corner-all" />
  229. <label for="name">????:</label>
  230. <input type="text" name="address_u" id="address_u" class="text ui-widget-content ui-corner-all" />
  231. <label for="name">????:</label>
  232. <select id="roleId_u" class="text ui-widget-content ui-corner-all" name="state" style="width:200px;" ></select> </fieldset>
  233. </form>
  234. </div>
  235. </div>
  236. </body>
  237. </html>