首页 > 代码库 > ajax提交
ajax提交
ajax提交
//初始化加载档案列表信息 $(function(){ loadAccount(); }); function loadAccount(){ var account = {}; account.accountName = $("#queryEmpCode").val(); account.name = $("#queryName").val(); $.ajax({ type: "post", url: "<%=context%>/rest/account/accountManage", data: account, dataType: "json", success: function(result){ $("#tb_account").bootstrapTable("destroy"); $("#tb_account").bootstrapTable({ data:result, idField: "accountId", pagination: true, pageSize: 15, checkboxHeader:true, columns:[ { field: "accountId", title: "主键", class: "col-sm-3", visible: false }, { field: "empId", title: "员工ID", class: "col-sm-2", visible: false }, { field: "accountName", title: "工号", class: "col-sm-2" }, { field: "name", title: "姓名", class: "col-sm-2", }, { field: "accountStatus", title: "账户状态", class: "col-sm-3", formatter: function(value) { return accountStatus[value]; } }, { field: "isWechartPucn", title: "是否开启微信打卡", class: "col-sm-3", formatter: function(value) { return isWechartPunch[value]; } }, { field: "createTimeStr", title: "创建时间", class: "col-sm-2", }, { title: "操作", class: "col-sm-1", formatter: function(value, row, index) { return ‘<button data-bindfunction="resetPassword" class="btn btn-primary btn-xs" data-rowid="‘ + row.empId +‘">重置密码</button>‘ +‘ <button data-bindfunction="modifyStatus" class="btn btn-danger btn-xs" data-rowid="‘ + row.empId +‘" data-status="‘+row.accountStatus+‘" data-isWechartPucn="‘+row.isWechartPucn+‘">修改</button>‘; } } ] }); } }); }
本文出自 “JianBo” 博客,转载请与作者联系!
ajax提交
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。