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
80a7229f
authored
2018-03-25 16:22:10 +0800
by
Zelig
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
产品配置搜索
1 parent
5502db7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
35 deletions
application/views/common/footer.php
application/views/config/index.php
application/views/common/footer.php
View file @
80a7229
...
...
@@ -100,7 +100,6 @@
return
JSON
.
stringify
(
ret
);
},
data
:
function
(
data
)
{
data
.
pageSize
=
data
.
length
;
data
.
currentPage
=
parseFloat
(
data
.
start
/
data
.
length
)
+
1
;
return
data
;
...
...
application/views/config/index.php
View file @
80a7229
...
...
@@ -6,17 +6,18 @@
<div
class=
"row cl mb-20"
>
<div
class=
"col-xs-2"
>
<span
class=
"select-box"
>
<select
class=
"select
table_search"
name=
"code"
size=
"1"
column=
"6
"
>
<select
class=
"select
"
name=
"code"
size=
"1"
id=
"file
"
>
<option
value=
""
selected
>
选择字段
</option>
<option
value=
"
0
"
>
产品名称
</option>
<option
value=
"
1
"
>
还款方式
</option>
<option
value=
"
productName
"
>
产品名称
</option>
<option
value=
"
repaymentMode
"
>
还款方式
</option>
</select>
</span>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"input-text"
placeholder=
""
id=
""
name=
"keyword"
>
<input
type=
"text"
class=
"input-text"
placeholder=
""
id=
"
keywork
"
name=
"keyword"
>
</div>
<div>
<button
class=
"btn btn-primary radius"
type=
"button"
onclick=
"$('#table').DataTable().draw()"
>
搜索
</button>
<input
class=
"btn btn-warning radius"
type=
"reset"
value=
"重置"
>
<button
class=
"btn btn-primary radius"
type=
"button"
onclick=
"layer_show('添加', '
<?=
site_url
(
'/config/add'
)
?>
')"
>
添加
</button>
</div>
...
...
@@ -26,7 +27,7 @@
</form>
<div
class=
"body mt-20"
>
<table
class=
"table table-border table-bordered table-bg"
id=
"table"
>
<table
class=
"table table-border table-bordered table-bg"
id=
"table"
url=
"config/products"
>
<thead
class=
"text-c"
>
<tr>
<th
width=
"68px"
>
操作
</th>
...
...
@@ -50,35 +51,12 @@
<script>
var
table
=
$
(
'#table'
).
dataTable
({
aaSorting
:
[[
1
,
"desc"
]],
serverSide
:
true
,
processing
:
true
,
bSort
:
false
,
searching
:
false
,
//是否显示搜索
iDisplayLength
:
6
,
bLengthChange
:
false
,
ajax
:
{
url
:
apiBaseUrl
+
'config/products'
,
dataFilter
:
function
(
json
)
{
var
ret
=
{},
json
=
jQuery
.
parseJSON
(
json
);
ret
.
data
=
json
.
data
||
[];
var
draw
=
getUrlParam
(
'draw'
);
if
(
draw
)
{
ret
.
draw
=
draw
;
}
ret
.
recordsTotal
=
0
;
ret
.
recordsFiltered
=
0
;
if
(
json
.
page
)
{
ret
.
recordsTotal
=
parseInt
(
json
.
page
.
totalNumber
);
ret
.
recordsFiltered
=
parseInt
(
json
.
page
.
totalNumber
);
}
return
JSON
.
stringify
(
ret
);
},
data
:
function
(
data
)
{
data
.
pageSize
=
data
.
length
;
data
.
currentPage
=
parseFloat
(
data
.
start
/
data
.
length
)
+
1
;
return
data
;
}
fnServerParams
:
function
(
aoData
)
{
delete
aoData
.
columns
;
file
=
$
(
'#file'
).
val
();
if
(
file
)
aoData
[
file
]
=
$
(
'#keywork'
).
val
();
},
columns
:
[
{
...
...
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