提交 | 用户 | 时间
|
1ac2bc
|
1 |
layui.use(['jquery', 'layer', 'table', 'laydate'], function () { |
懒 |
2 |
|
|
3 |
var $ = layui.jquery; |
|
4 |
var laydate = layui.laydate; |
|
5 |
var table = layui.table; |
|
6 |
|
|
7 |
var SelectDealerDlg = { |
|
8 |
index: parent.layer.getFrameIndex(window.name) |
|
9 |
}; |
|
10 |
|
|
11 |
var SelectDealerTable = { |
|
12 |
tableId: "selectDealerTable" |
|
13 |
}; |
|
14 |
|
|
15 |
SelectDealerTable.initColumn = function () { |
|
16 |
return [[ |
|
17 |
{type: 'numbers', title: "No"}, |
|
18 |
{field: "account", title: "账号"}, |
|
19 |
{field: "name", title: "姓名"}, |
|
20 |
{field: "deptName", title: "部门"} |
|
21 |
]] |
|
22 |
}; |
|
23 |
|
|
24 |
//渲染时间选择框 |
|
25 |
laydate.render({ |
|
26 |
elem: '#timeLimit', |
|
27 |
range: true, |
|
28 |
max: Feng.currentDate() |
|
29 |
}); |
|
30 |
|
|
31 |
/** |
|
32 |
* 点击查询按钮 |
|
33 |
*/ |
|
34 |
SelectDealerTable.search = function () { |
|
35 |
var queryData = {}; |
|
36 |
queryData['deptId'] = ""; |
|
37 |
queryData['name'] = $("#name").val(); |
|
38 |
queryData['timeLimit'] = $("#timeLimit").val(); |
|
39 |
table.reload(SelectDealerTable.tableId, { |
|
40 |
where: queryData, page: {curr: 1} |
|
41 |
}); |
|
42 |
}; |
|
43 |
|
|
44 |
// 搜索按钮点击事件 |
|
45 |
$('#btnSearch').click(function () { |
|
46 |
SelectDealerTable.search(); |
|
47 |
}); |
|
48 |
|
|
49 |
table.render({ |
|
50 |
elem: '#' + SelectDealerTable.tableId, |
|
51 |
url: Feng.ctxPath + '/mgr/list', |
|
52 |
page: true, |
|
53 |
height: "full-98", |
|
54 |
cellMinWidth: 100, |
|
55 |
cols: SelectDealerTable.initColumn() |
|
56 |
}); |
|
57 |
|
|
58 |
table.on('rowDouble(selectDealerTable)', function (obj) { |
|
59 |
parent.Handle.nextObject = obj.data.name; |
|
60 |
parent.Handle.assignee = obj.data.account; |
|
61 |
parent.layer.close(SelectDealerDlg.index); |
|
62 |
}); |
|
63 |
|
|
64 |
}); |