Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨建斌
/
page
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
72cdd41f
authored
2018-03-17 14:58:14 +0800
by
Zelig
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
datatables
1 parent
3cf405cf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
30 deletions
application/views/common/footer.php
application/views/work/index.php
resource/datatable.js
application/views/common/footer.php
View file @
72cdd41
...
...
@@ -7,5 +7,7 @@
<script
type=
"text/javascript"
src=
"/resource/lib/jquery.validation/1.14.0/messages_zh.js"
></script>
<script
type=
"text/javascript"
src=
"/resource/lib/My97DatePicker/4.8/WdatePicker.js"
></script>
<script
type=
"text/javascript"
src=
"/resource/lib/webuploader/0.1.5/webuploader.min.js"
></script>
<script
type=
"text/javascript"
src=
"/resource/lib/datatables/1.10.0/jquery.dataTables.min.js"
></script>
<script
type=
"text/javascript"
src=
"/resource/datatable.js"
></script>
<script
src=
"https://cdn.bootcss.com/holder/2.9.4/holder.min.js"
></script>
<script
type=
"text/javascript"
src=
"/resource/upload.js"
></script>
...
...
application/views/work/index.php
View file @
72cdd41
...
...
@@ -3,15 +3,15 @@
<body>
<?php
$this
->
load
->
view
(
'common/work_header'
);
?>
<div
class=
"page-container"
>
<form
class=
"
search
"
>
<form
class=
"
"
onreset=
"resetHandler()
"
>
<div
class=
"date mb-20"
>
<input
type=
"text"
onfocus=
"WdatePicker({ maxDate:'#F{$dp.$D(\'
logmax\')||\'%y-%M-%d\'}' })"
id=
"logmin"
class=
"input-text Wdate"
>
-
<input
type=
"text"
onfocus=
"WdatePicker({ minDate:'#F{$dp.$D(\'
logmin\')}',maxDate:'%y-%M-%d' })"
id=
"log
max"
class=
"input-text Wdate"
>
<input
type=
"text"
onfocus=
"WdatePicker({ maxDate:'#F{$dp.$D(\'
max\')||\'%y-%M-%d\'}',onpicked:function(){$('#table').DataTable().draw()} })"
id=
"min"
class=
"input-text Wdate"
>
-
<input
type=
"text"
onfocus=
"WdatePicker({ minDate:'#F{$dp.$D(\'
min\')}',maxDate:'%y-%M-%d',onpicked:function(){$('#table').DataTable().draw()} })"
id=
"
max"
class=
"input-text Wdate"
>
</div>
<div
class=
"row cl mb-20"
>
<div
class=
"col-xs-2"
>
<span
class=
"select-box"
>
<select
class=
"select
"
size=
"1
"
>
<select
class=
"select
table_search"
size=
"1"
column=
"6
"
>
<option
value=
""
selected
>
网点
</option>
<option
value=
"1"
>
菜单一
</option>
<option
value=
"2"
>
菜单二
</option>
...
...
@@ -21,7 +21,7 @@
</div>
<div
class=
"col-xs-2"
>
<span
class=
"select-box"
>
<select
class=
"select
"
size=
"1
"
>
<select
class=
"select
table_search"
size=
"1"
column=
"7
"
>
<option
value=
""
selected
>
产品名称
</option>
<option
value=
"1"
>
菜单一
</option>
<option
value=
"2"
>
菜单二
</option>
...
...
@@ -31,27 +31,27 @@
</div>
<div
class=
"col-xs-2"
>
<span
class=
"select-box"
>
<select
class=
"select
"
size=
"1
"
>
<select
class=
"select
table_search"
size=
"1"
column=
"10
"
>
<option
value=
""
selected
>
客户经理
</option>
<option
value=
"1"
>
菜单一
</option>
<option
value=
"2"
>
菜单二
</option>
<option
value=
"3"
>
菜单三
</option>
<option
>
李四
</option>
<option>
菜单二
</option>
<option>
菜单三
</option>
</select>
</span>
</div>
<div
class=
"col-xs-2"
>
<span
class=
"select-box"
>
<select
class=
"select
"
size=
"
1"
>
<select
class=
"select
table_search"
size=
"1"
column=
"1
1"
>
<option
value=
""
selected
>
流程节点
</option>
<option
value=
"1"
>
菜单一
</option>
<option
value=
"2"
>
菜单二
</option>
<option
value=
"3"
>
菜单三
</option>
<option
>
完成
</option>
<option>
菜单二
</option>
<option>
菜单三
</option>
</select>
</span>
</div>
<div
class=
"col-xs-2"
>
<span
class=
"select-box"
>
<select
class=
"select
"
size=
"1
"
>
<select
class=
"select
table_search"
size=
"1"
column=
"13
"
>
<option
value=
""
selected
>
处理人
</option>
<option
value=
"1"
>
菜单一
</option>
<option
value=
"2"
>
菜单二
</option>
...
...
@@ -61,13 +61,12 @@
</div>
</div>
<div>
<input
class=
"btn btn-primary radius"
type=
"submit"
value=
"提交"
>
<input
class=
"btn btn-warning radius"
type=
"reset"
value=
"重置"
>
</div>
</form>
<div
class=
"body mt-20"
>
<table
class=
"table table-border table-bordered table-bg"
>
<table
class=
"table table-border table-bordered table-bg"
id=
"table"
>
<thead
class=
"text-c"
>
<tr>
<th
width=
"68px"
>
操作
</th>
...
...
@@ -107,7 +106,7 @@
<td>
融易购
</td>
<td>
100.00
</td>
<td>
100.00
</td>
<td>
李
四
</td>
<td>
李
三
</td>
<td
class=
"c-primary"
>
预审
</td>
<td>
2018-01-02 00:00:00
</td>
<td>
小明
</td>
...
...
@@ -123,7 +122,7 @@
</ul>
</span>
</td>
<td>
100
1
</td>
<td>
100
2
</td>
<td>
张三
</td>
<td>
333333333333333333
</td>
<td>
13333333333
</td>
...
...
@@ -134,23 +133,13 @@
<td>
100.00
</td>
<td>
李四
</td>
<td
class=
"c-999"
>
完成
</td>
<td>
2018-01-02
00:00:00
</td>
<td>
2018-01-02
</td>
<td>
小明
</td>
</tr>
</tbody>
</table>
<div
class=
"paginate"
>
<div
class=
"paginate_info"
>
显示 1 到 1 ,共 1 条
</div>
<div
class=
"paginate_pagination"
>
<a
class=
"paginate_button"
>
上一页
</a>
<span>
<a
class=
"paginate_button current"
>
1
</a>
</span>
<a
class=
"paginate_button"
>
下一页
</a>
</div>
</div>
</div>
</div>
<?php
$this
->
load
->
view
(
'common/footer'
);
?>
</body>
<html>
\ No newline at end of file
<html>
...
...
resource/datatable.js
0 → 100644
View file @
72cdd41
$
(
'#table'
).
dataTable
({
"aaSorting"
:
[[
1
,
"desc"
]],
"pading"
:
false
});
$
.
fn
.
dataTableExt
.
afnFiltering
.
push
(
function
(
oSettings
,
aData
,
iDataIndex
)
{
var
min
=
document
.
getElementById
(
'min'
).
value
;
var
max
=
document
.
getElementById
(
'max'
).
value
;
var
iDateCol
=
12
;
var
dateMin
=
new
Date
(
aData
[
iDateCol
]);
var
dateMax
=
new
Date
(
aData
[
iDateCol
]);
if
(
min
===
''
&&
max
===
''
)
return
true
;
else
if
(
new
Date
(
min
).
getTime
()
<=
dateMin
.
getTime
()
&&
max
===
''
)
return
true
;
else
if
(
new
Date
(
min
).
getTime
()
<=
dateMin
.
getTime
()
&&
new
Date
(
max
).
getTime
()
>=
dateMax
.
getTime
())
return
true
;
return
false
;
}
);
$
(
'.table_search'
).
on
(
'change'
,
function
()
{
search
=
$
(
this
).
val
();
column
=
$
(
this
).
attr
(
'column'
);
$
(
'#table'
).
DataTable
().
column
(
column
).
search
(
search
).
draw
();
});
$
(
'#min, #max'
).
on
(
'keyup'
,
function
()
{
$
(
'#table'
).
DataTable
().
draw
();
});
function
resetHandler
()
{
$
(
'#table'
).
DataTable
().
columns
().
search
(
""
).
draw
();
}
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment