Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
38188cd3
Commit
38188cd3
authored
Dec 20, 2017
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
转铺列表展示
parent
c227e542
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
192 additions
and
55 deletions
+192
-55
Transfer.php
application/index/controller/Transfer.php
+58
-0
navigation.html
application/index/view/global/navigation.html
+1
-1
index.html
application/index/view/transfer/index.html
+23
-51
SubletModel.php
application/model/SubletModel.php
+34
-0
route.php
application/route.php
+5
-3
transfer.js
public/resource/js/transfer.js
+48
-0
transfer_template_tpl.html
public/resource/template/transfer_template_tpl.html
+23
-0
No files found.
application/index/controller/Transfer.php
0 → 100644
View file @
38188cd3
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2017/12/20
* Time: 18:01
*/
namespace
app\index\controller
;
use
app\index\extend\Basic
;
use
app\model\SubletModel
;
class
Transfer
extends
Basic
{
/**
* 转铺列表
*
* @return \think\response\View
*/
public
function
index
()
{
return
view
(
'transfer/index'
);
}
/**
* 获取转铺列表
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getList
()
{
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
''
;
$params
=
$this
->
request
->
param
();
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
// $where['status'] = 0;
$where
=
''
;
// if (!empty($params['name'])) {
// $where['a.user_nick'] = ['like', '%'.$params['name'].'%'];
// }
$sublet
=
new
SubletModel
();
$fields
=
'id,manage_type,address_detail,province,city,district,expected_rent,appellation,tel,create_time'
;
$data
[
'list'
]
=
$sublet
->
getSublet
(
$pageNo
,
$pageSize
,
''
,
$fields
,
$where
);
$data
[
'total'
]
=
$sublet
->
getSubletTotal
(
$where
);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
);
}
}
\ No newline at end of file
application/index/view/global/navigation.html
View file @
38188cd3
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<a
href=
"preview_list.html"
class=
"active"
><span
class=
"glyphicon glyphicon-search"
aria-hidden=
"true"
></span>
预约看铺列表
</a>
<a
href=
"preview_list.html"
class=
"active"
><span
class=
"glyphicon glyphicon-search"
aria-hidden=
"true"
></span>
预约看铺列表
</a>
</li>
</li>
<li
role=
"presentation"
class=
"active"
>
<li
role=
"presentation"
class=
"active"
>
<a
href=
"
entrust
_list.html"
>
委托转铺列表
</a>
<a
href=
"
transfer
_list.html"
>
委托转铺列表
</a>
</li>
</li>
<li
role=
"presentation"
class=
"active"
>
<li
role=
"presentation"
class=
"active"
>
<a
href=
"users_list.html"
>
用户列表
</a>
<a
href=
"users_list.html"
>
用户列表
</a>
...
...
application/index/view/
member/entrust_list
.html
→
application/index/view/
transfer/index
.html
View file @
38188cd3
{layout name="global/frame_tpl" /}
{layout name="global/frame_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"
home
"
/>
<input
type=
"hidden"
class=
"page-load"
id=
"
transfer
"
/>
<!--导航star-->
<!--导航star-->
<!-- Sidebar -->
<!-- Sidebar -->
...
@@ -45,57 +45,29 @@
...
@@ -45,57 +45,29 @@
<th>
操作
</th>
<th>
操作
</th>
</tr>
</tr>
</thead>
</thead>
<tbody
id=
"sublet_list"
class=
"text-center"
>
</tbody>
<tbody>
<tbody>
<tr>
<td>
刘女士
</td>
<!--<tr>-->
<td>
13545876
</td>
<!--<td>刘丹丹</td>-->
<td>
刘丹丹
</td>
<!--<td>1254352</td>-->
<td>
张大大
</td>
<!--<td>the Bird</td>-->
<td>
刘丹丹
</td>
<!--<td>刘丹丹</td>-->
<td>
张大大
</td>
<!--<td>张大大</td>-->
<td>
Thornton
</td>
<!--<td>@twitter</td>-->
<td>
<!--<td>Thornton</td>-->
<a
class=
"btn1 btn-success "
href=
"#modal-process"
data-toggle=
"modal"
>
<!--<td>-->
跟进
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal">-->
</a>
<!--跟进-->
<a
class=
"btn1 btn-warning "
href=
"#modal-details"
data-toggle=
"modal"
onclick=
"show_details(2244)"
>
<!--</a>-->
转为上架商铺
<!--<a class="btn1 btn-danger" href="#modal-details" data-toggle="modal" onclick="show_details(2244)">-->
</a>
<!--已转为上架商铺-->
</td>
<!--</a>-->
</tr>
<!--</td>-->
<tr>
<td>
李楠楠
</td>
<td>
Jac12413ob
</td>
<td>
Thornton
</td>
<td>
刘丹丹
</td>
<td>
张大大
</td>
<td>
@fat
</td>
<td>
Thornton
</td>
<td>
<a
class=
"btn1 btn-success "
href=
"#modal-process"
data-toggle=
"modal"
>
跟进
</a>
<a
class=
"btn1 btn-warning "
href=
"#modal-details"
data-toggle=
"modal"
onclick=
"show_details(2244)"
>
转为上架商铺
</a>
</td>
</tr>
<tr>
<td>
刘丹丹
</td>
<td>
1254352
</td>
<td>
the Bird
</td>
<td>
刘丹丹
</td>
<td>
张大大
</td>
<td>
@twitter
</td>
<td>
Thornton
</td>
<td>
<a
class=
"btn1 btn-success "
href=
"#modal-process"
data-toggle=
"modal"
>
跟进
</a>
<a
class=
"btn1 btn-danger"
href=
"#modal-details"
data-toggle=
"modal"
onclick=
"show_details(2244)"
>
已转为上架商铺
</a>
</td>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
...
...
application/model/SubletModel.php
View file @
38188cd3
...
@@ -29,4 +29,38 @@ class SubletModel extends Model
...
@@ -29,4 +29,38 @@ class SubletModel extends Model
}
}
/**
* 查询转铺记录
*
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param string $fields
* @param string $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getSublet
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
''
,
$fields
=
'*'
,
$params
=
''
)
{
$result
=
$this
->
field
(
$fields
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
return
$result
;
}
/**
* 查询转铺总记录数
*
* @param $params
* @return int|string
*/
public
function
getSubletTotal
(
$params
)
{
$result
=
$this
->
where
(
$params
)
->
count
();
return
$result
;
}
}
}
application/route.php
View file @
38188cd3
...
@@ -63,14 +63,16 @@ Route::group('index', [
...
@@ -63,14 +63,16 @@ Route::group('index', [
'addOrSave'
=>
[
'index/banner/addOrSave'
,
[
'method'
=>
'post'
]
],
'addOrSave'
=>
[
'index/banner/addOrSave'
,
[
'method'
=>
'post'
]
],
'upIsShow'
=>
[
'index/banner/upIsShow'
,
[
'method'
=>
'post'
]
],
'upIsShow'
=>
[
'index/banner/upIsShow'
,
[
'method'
=>
'post'
]
],
//user列表
'usersList'
=>
[
'index/member/getUserList'
,[
'method'
=>
'get'
]],
'usersList'
=>
[
'index/member/getUserList'
,[
'method'
=>
'get'
]],
'users_list'
=>
[
'index/member/index'
],
'users_list'
=>
[
'index/member/index'
],
'user_add'
=>
[
'index/member/user_add'
,[
'method'
=>
'post'
]],
'user_add'
=>
[
'index/member/user_add'
,[
'method'
=>
'post'
]],
'del_user'
=>
[
'index/member/delUser'
,[
'method'
=>
'post'
]],
'del_user'
=>
[
'index/member/delUser'
,[
'method'
=>
'post'
]],
//transfer转铺列表
'transfer_list'
=>
[
'index/transfer/index'
,
[
'method'
=>
'get'
]],
'get_transfer'
=>
[
'index/transfer/getlist'
,
[
'method'
=>
'get'
]],
//login
//login
'login'
=>
[
'index/login/login'
,[
'method'
=>
'get'
]],
'login'
=>
[
'index/login/login'
,[
'method'
=>
'get'
]],
]);
]);
...
...
public/resource/js/transfer.js
0 → 100644
View file @
38188cd3
define
([
'doT'
,
'text!temp/transfer_template_tpl.html'
,
'ckfinder'
,
'ckfinderStart'
,
'css!style/home.css'
,
"datetimepicker"
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
var
user
=
{
pageNo
:
1
,
/*第几页*/
pageSize
:
10
,
/*每页显示多少条*/
urls
:
''
,
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
);
user
.
getList
();
user
.
event
();
},
event
:
function
()
{
},
getList
:
function
(
pageNo
)
{
user
.
pageNo
=
pageNo
;
var
params
=
{};
params
.
pageNo
=
user
.
pageNo
;
params
.
pageSize
=
user
.
pageSize
;
$
.
ajax
({
url
:
'/index/get_transfer'
,
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'transfer_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#sublet_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
/*分页代码*/
$
(
"#pagediv"
).
pagination
({
length
:
data
.
data
.
total
,
current
:
pageNo
,
every
:
user
.
pageSize
,
onClick
:
function
(
el
)
{
user
.
getList
(
el
.
num
.
current
);
}
});
}
});
}
};
return
user
;
});
\ No newline at end of file
public/resource/template/transfer_template_tpl.html
0 → 100644
View file @
38188cd3
<script
id=
"transfer_list_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
>
<
td
>
[
%=
it
[
item
][
"appellation"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"tel"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'manage_type'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"province"
]
%
]
-
[
%=
it
[
item
][
"city"
]
%
]
-
[
%=
it
[
item
][
"district"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"address_detail"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"expected_rent"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"create_time"
]
%
]
<
/td
>
<
td
>
<
a
class
=
"btn1 btn-success "
href
=
"#modal-process"
data
-
toggle
=
"modal"
>
跟进
<
/a
>
<
a
class
=
"btn1 btn-danger"
href
=
"#modal-details"
data
-
toggle
=
"modal"
>
已转为上架商铺
<
/a></
td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"7"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment