/invoicing/WebRoot/views/limit/memberSet.html
HTML | 262 lines | 236 code | 25 blank | 1 comment | 0 complexity | ba1e36c052747542dba9de897b4b92d9 MD5 | raw file
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html>
- <head>
- <title>????</title>
- <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
- <meta http-equiv="description" content="this is my page">
-
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-
- <link rel="stylesheet"
- href="../../script/themes/base/jquery.ui.all.css">
- <link rel="stylesheet" type="text/css"
- href="../../themes/gray/easyui.css" />
- <link rel="stylesheet" type="text/css" href="../../themes/icon.css" />
- <script type="text/javascript" src="../../script/jquery-1.4.4.min.js"></script>
- <script type="text/javascript"
- src="../../script/jquery.easyui.min.1.2.2.js"></script>
- <script type="text/javascript" src="../../script/jquery.json-2.2.js"></script>
- <script src="../../locale/easyui-lang-zh_CN.js"></script>
- <script type="text/javascript" src="memberSet.js"></script>
- <script src="../../script/external/jquery.bgiframe-2.1.2.js"></script>
- <script src="../../script/ui/jquery.ui.core.js"></script>
- <script src="../../script/ui/jquery.ui.widget.js"></script>
- <script src="../../script/ui/jquery.ui.mouse.js"></script>
- <script src="../../script/ui/jquery.ui.button.js"></script>
- <script src="../../script/ui/jquery.ui.draggable.js"></script>
- <script src="../../script/ui/jquery.ui.position.js"></script>
- <script src="../../script/ui/jquery.ui.resizable.js"></script>
- <script src="../../script/ui/jquery.ui.dialog.js"></script>
- <script src="../../script/ui/jquery.effects.core.js"></script>
- <link rel="stylesheet" href="../../style/demos.css">
- <style>
- body { font-size: 62.5%; }
- label, input { display:block; }
- input.text { margin-bottom:12px; width:95%; padding: .4em; }
- fieldset { padding:0; border:0; margin-top:25px; }
- h1 { font-size: 1.2em; margin: .6em 0; }
- div#users-contain { width: 350px; margin: 20px 0; }
- div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
- div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
- .ui-dialog .ui-state-error { padding: .3em; }
- .validateTips { border: 1px solid transparent; padding: 0.3em; }
- </style>
- <script>
- var temp_roleId;
- function tc(){
- $( "#dialog-form" ).dialog( "open" );
- }
- function tc_update(){
- var row = $('#member').datagrid('getSelected');
- if(row){
- //var rows = $('#member').datagrid("getSelected");
- var userName =row.userName;
- var userId = row.userId;
- var password= row.password;
- var telephone= row.telephone;
- var address = row.address;
- var roleId = row.roleId;
- $("#userId_u").attr('value',userId);
- $("#userName_u").attr('value',userName);
- $("#password_u").attr('value',password);
- $("#telephone_u").attr('value',telephone);
- $("#address_u").attr('value',address);
- //$("#roleId_u").attr('value',roleName);
- var m;
- $.each(temp_roleId,function(index, c){
- if(roleId ==c.roleId){
- m +="<option value='"+c.roleId+"' selected>"+c.roleName+"</option>";
- }else{
- m +="<option value='"+c.roleId+"'>"+c.roleName+"</option>";
- }
- });
- $('#roleId_u').append(m);
- $("#dialog-form-update" ).dialog( "open" );
- }else{
-
- $.messager.show( {
- title :'????',
- msg :'???????????',
- timeout :3000,
- showType :'fade'
- });
- }
- }
- $( function() {
-
- // a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
- $("#dialog:ui-dialog").dialog("destroy");
- //?????
- $.ajax({
- url :"../../item/findSelectOptionRoles.action",
- cache :true,
- async: false,
- success : function(data) {
- var m;
- var p = $.evalJSON(data);
- temp_roleId =p;
- $.each(p,function(index, c){
- m +="<option value='"+c.roleId+"'>"+c.roleName+"</option>";
- });
- $('#roleId').append(m);
- }
- });
- //
- $("#dialog-form-update").dialog( {
- autoOpen :false,
- height :450,
- resizable :false,
- width :350,
- modal :true,
- buttons : {
- "??" : function() {
- //var roleName = $("#roleName_update").val();
- var rows =$("#member").datagrid("getSelected");
- var userId = $("#userId_u").val();
- var userName=$("#userName_u").val();
- var password=$("#password_u").val();
- var telephone=$("#telephone_u").val();
- var address=$("#address_u").val();
- var roleId=$("#roleId_u").val();
- var ucode=rows.ucode;
- $.post("../../member/updateMember.action", {
- userId :userId,
- userName :userName,
- password :password,
- telephone :telephone,
- address :address,
- roleId :roleId,
- ucode:ucode
- }, function(data) {
- $("#dialog-form-update").dialog("close");
- $('#member').datagrid("reload");
- $.messager.show( {
- title :'????',
- msg :data,
- timeout :3000,
- showType :'fade'
- });
- });
- },
- "??" : function() {
- $(this).dialog("close");
- }
- },
- close : function() {
- //allFields.val("").removeClass("ui-state-error");
- }
- });
-
- $("#dialog-form").dialog( {
- autoOpen :false,
- height :450,
- resizable :false,
- width :350,
- modal :true,
- buttons : {
- "??" : function() {
- var userId = $("#userId").val();
- var userName = $("#userName").val();
- var password = $("#password").val();
- var telephone = $("#telephone").val();
- var address = $("#address").val();
- var roleId = $("#roleId").val();
-
- $.post("../../member/addMember.action", {
- userId :userId,
- userName :userName,
- password :password,
- telephone :telephone,
- address :address,
- roleId :roleId
- }, function(data) {
- $("#dialog-form").dialog("close");
- $('#member').datagrid("reload");
- $.messager.show( {
- title :'????',
- msg :data,
- timeout :3000,
- showType :'fade'
- });
- });
- },
- "??" : function() {
- $(this).dialog("close");
- }
- },
- close : function() {
- //allFields.val("").removeClass("ui-state-error");
- }
- });
-
- });
- </script>
-
-
-
-
-
- </head>
-
- <body>
- <div style="padding:5px;background:#efefef;width:99%;">
- <a href="javascript:void(0)" class="easyui-linkbutton" plain="true" iconCls="icon-add" onclick="tc()">??</a>
- <a href="javascript:void(0)" class="easyui-linkbutton" plain="true" iconCls="icon-remove" onclick="delAllSelections()">??</a>
- <a href="javascript:void(0)" class="easyui-linkbutton" plain="true" iconCls="icon-edit" onclick="tc_update()">??</a>
- <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-search">??</a>
- </div>
- <div id="member"></div>
-
-
-
- <div class="demo">
-
- <div id="dialog-form" title="??????" style="display:none">
- <p class="validateTips"></p>
- <form>
- <fieldset>
- <label for="name">??ID:</label>
- <input type="text" name="userId" id="userId" class="text ui-widget-content ui-corner-all" />
- <label for="name">????:</label>
- <input type="text" name="userName" id="userName" class="text ui-widget-content ui-corner-all" />
- <label for="name">????:</label>
- <input type="text" name="password" id="password" class="text ui-widget-content ui-corner-all" />
- <label for="name">????:</label>
- <input type="text" name="telephone" id="telephone" class="text ui-widget-content ui-corner-all" />
- <label for="name">????:</label>
- <input type="text" name="address" id="address" class="text ui-widget-content ui-corner-all" />
- <label for="name">????:</label>
- <!-- <input type="text" name="roleName" id="roleName" class="text ui-widget-content ui-corner-all" /> -->
- <select id="roleId" class="text ui-widget-content ui-corner-all" name="state" style="width:200px;" ></select>
- </fieldset>
- </form>
- </div>
-
-
-
- <div id="dialog-form-update" title="??????" style="display:none">
- <p class="validateTips"></p>
- <form>
- <fieldset>
- <label for="name">??ID:</label>
- <input type="text" name="userId_u" id="userId_u" class="text ui-widget-content ui-corner-all" />
- <label for="name">????:</label>
- <input type="text" name="userName_u" id="userName_u" class="text ui-widget-content ui-corner-all" />
- <label for="name">????:</label>
- <input type="text" name="password_u" id="password_u" class="text ui-widget-content ui-corner-all" />
- <label for="name">????:</label>
- <input type="text" name="telephone_u" id="telephone_u" class="text ui-widget-content ui-corner-all" />
- <label for="name">????:</label>
- <input type="text" name="address_u" id="address_u" class="text ui-widget-content ui-corner-all" />
- <label for="name">????:</label>
- <select id="roleId_u" class="text ui-widget-content ui-corner-all" name="state" style="width:200px;" ></select> </fieldset>
- </form>
- </div>
-
-
- </div>
-
- </body>
-
-
- </html>