ajax提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
//初始化加载档案列表信息
$(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>'
;
}
}
]
});
}
});
}
|
本文转自建波李 51CTO博客,原文链接:http://blog.51cto.com/jianboli/1917855,如需转载请自行联系原作者