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
ad334230
Commit
ad334230
authored
Dec 21, 2017
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
转租列表
parent
407c9ee1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
293 additions
and
95 deletions
+293
-95
Member.php
application/index/controller/Member.php
+3
-3
Transfer.php
application/index/controller/Transfer.php
+108
-6
users_list.html
application/index/view/member/users_list.html
+2
-3
index.html
application/index/view/transfer/index.html
+33
-75
FollowUp.php
application/model/FollowUp.php
+18
-0
route.php
application/route.php
+3
-0
transfer.js
public/resource/js/transfer.js
+110
-5
user.js
public/resource/js/user.js
+4
-0
transfer_template_tpl.html
public/resource/template/transfer_template_tpl.html
+12
-3
No files found.
application/index/controller/Member.php
View file @
ad334230
...
...
@@ -36,15 +36,15 @@ class Member extends Basic{
$where
[
'status'
]
=
0
;
if
(
!
empty
(
$params
[
'name'
]))
{
$where
[
'
a.
user_nick'
]
=
[
'like'
,
'%'
.
$params
[
'name'
]
.
'%'
];
$where
[
'user_nick'
]
=
[
'like'
,
'%'
.
$params
[
'name'
]
.
'%'
];
}
if
(
!
empty
(
$params
[
'phone'
]))
{
$where
[
'
a.
user_phone'
]
=
[
'like'
,
'%'
.
$params
[
'phone'
]
.
'%'
];
$where
[
'user_phone'
]
=
[
'like'
,
'%'
.
$params
[
'phone'
]
.
'%'
];
}
if
(
!
empty
(
$params
[
'invite'
]))
{
$where
[
'
b.
phone'
]
=
[
'like'
,
'%'
.
$params
[
'invite'
]
.
'%'
];
$where
[
'phone'
]
=
[
'like'
,
'%'
.
$params
[
'invite'
]
.
'%'
];
}
if
(
!
empty
(
$params
[
'id'
]))
{
...
...
application/index/controller/Transfer.php
View file @
ad334230
...
...
@@ -10,7 +10,11 @@ namespace app\index\controller;
use
app\index\extend\Basic
;
use
app\model\AdminModel
;
use
app\model\FollowUp
;
use
app\model\SubletModel
;
use
app\model\Users
;
class
Transfer
extends
Basic
{
...
...
@@ -39,19 +43,116 @@ class Transfer extends Basic
$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'].'%'];
// }
$where
=
array
();
if
(
!
empty
(
$params
[
'start_date'
]))
{
$where
[
'create_time'
]
=
[
'> time'
,
$params
[
'start_date'
]];
}
if
(
!
empty
(
$params
[
'end_date'
]))
{
$where
[
'create_time'
]
=
[
'< time'
,
$params
[
'end_date'
]];
}
if
(
!
empty
(
$params
[
'name'
]))
{
$where
[
'appellation'
]
=
[
'like'
,
$params
[
'name'
]
.
'%'
];
}
if
(
!
empty
(
$params
[
'phone'
]))
{
$where
[
'tel'
]
=
[
'like'
,
$params
[
'phone'
]
.
'%'
];
}
if
(
!
empty
(
$params
[
'shop_name'
]))
{
$where
[
'shop_name'
]
=
[
'like'
,
$params
[
'shop_name'
]
.
'%'
];
}
$sublet
=
new
SubletModel
();
$fields
=
'id,
manage_type,address_detail,province,city,district,expected_rent,appellation,tel,create_time
'
;
$fields
=
'id,
shop_name,manage_type,address_detail,province,city,district,expected_rent,appellation,tel,create_time,status
'
;
$data
[
'list'
]
=
$sublet
->
getSublet
(
$pageNo
,
$pageSize
,
''
,
$fields
,
$where
);
$data
[
'total'
]
=
$sublet
->
getSubletTotal
(
$where
);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
);
}
/**
* 设置转为商铺
*
* @return array
*/
public
function
putAway
()
{
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
''
;
$params
=
$this
->
request
->
param
();
try
{
$sublet
=
new
SubletModel
();
$sublet
->
update
([
'id'
=>
$params
[
'id'
],
'status'
=>
$params
[
'status'
]
]);
return
[
"code"
=>
"200"
,
"msg"
=>
'操作成功'
,
'data'
=>
[
'status'
=>
$params
[
'status'
]]];
}
catch
(
\Exception
$e
)
{
return
[
"code"
=>
"101"
,
"msg"
=>
"操作失败"
,
'data'
=>
''
];
}
}
/**
* 添加跟进信息
*
* @return \think\Response
*/
public
function
addFollow
()
{
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
''
;
$params
=
$this
->
request
->
param
();
$follow
=
new
FollowUp
();
$result
=
$follow
->
save
([
'content'
=>
$params
[
'content'
],
'sublet_id'
=>
$params
[
'id'
],
'admin_id'
=>
1
,
'create_time'
=>
date
(
'Y-m-d H:i:s'
)
]);
if
(
!
$follow
->
id
)
{
$data
[
'status'
]
=
101
;
$data
[
'msg'
]
=
'操作失败'
;
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],[
'id'
=>
$follow
->
id
]);
}
/**
* 获得跟进信息
*
* @return \think\Response
* @throws \think\exception\DbException
*/
public
function
FollowList
()
{
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
''
;
$params
=
$this
->
request
->
param
();
if
(
$params
[
'id'
])
{
$follow
=
new
FollowUp
();
$users
=
new
AdminModel
();
$list
=
$follow
->
where
(
'sublet_id'
,
$params
[
'id'
])
->
select
();
foreach
(
$list
as
$k
=>
$v
)
{
$data
[
'data'
][
$k
]
=
$v
;
$data
[
'data'
][
$k
][
'admin_name'
]
=
$users
->
field
(
'name'
)
->
find
()[
'name'
];
}
}
else
{
$data
[
'status'
]
=
101
;
$data
[
'msg'
]
=
'id is null'
;
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
\ No newline at end of file
application/index/view/member/users_list.html
View file @
ad334230
...
...
@@ -26,7 +26,7 @@
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover"
>
<table
class=
"table table-striped table-bordered table-hover
table-condensed
"
>
<thead>
<tr>
<td
colspan=
"6"
>
...
...
@@ -103,11 +103,10 @@
<span
class=
"use-span text-danger"
>
(必填)
</span>
</div>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
id=
"close"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
id=
"add_user"
>
提交
...
...
application/index/view/transfer/index.html
View file @
ad334230
...
...
@@ -16,77 +16,45 @@
</div>
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover"
>
<table
class=
"table table-striped table-bordered table-hover
table-condensed
"
>
<thead>
<tr>
<td
colspan=
"
8
"
>
<form
action=
""
method=
"get"
id=
"form_search"
>
<td
colspan=
"
9
"
>
<form
id=
"form_search"
>
<span
class=
"fore-span"
>
提交时间
</span>
<input
class=
"form-control btn4"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"start_date"
name=
"start_date"
type=
"datetime-local"
value=
""
>
<input
class=
"form-control btn4"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_date"
name=
"end_date"
type=
"datetime-local"
value=
""
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"company_name"
name=
"company_user_name"
placeholder=
"客户姓名"
type=
"text"
value=
""
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"mobile"
name=
"mobile"
placeholder=
"手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"invite"
name=
"invite"
placeholder=
"店铺名"
type=
"text"
value=
""
>
<span
class=
"btn btn-default btn3"
onclick=
"search()"
>
搜索
</span>
<span
class=
"btn btn-default btn3"
onclick=
"search_reset()"
>
重置
</span>
<input
class=
"form-control btn4"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"start_date"
type=
"datetime-local"
value=
""
>
<input
class=
"form-control btn4"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_date"
type=
"datetime-local"
value=
""
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"name"
placeholder=
"客户姓名"
type=
"text"
value=
""
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"phone"
placeholder=
"手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"shop_name"
placeholder=
"店铺名"
type=
"text"
value=
""
>
<span
class=
"btn btn-default btn3"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-default btn3"
id=
"form_search_reset"
>
重置
</span>
</form>
</td>
</tr>
<tr>
<th>
称呼
</th>
<th>
客户电话
</th>
<th>
经营业态
</th>
<th>
所在区域
</th>
<th>
具体地址
</th>
<th>
期望月租金
</th>
<th>
提交时间
</th>
<th>
操作
</th>
<th
class=
"text-center"
>
店铺名
</th>
<th
class=
"text-center"
>
称呼
</th>
<th
class=
"text-center"
>
客户电话
</th>
<th
class=
"text-center"
>
经营业态
</th>
<th
class=
"text-center"
>
所在区域
</th>
<th
class=
"text-center"
>
具体地址
</th>
<th
class=
"text-center"
>
期望月租金
</th>
<th
class=
"text-center"
>
提交时间
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</thead>
<tbody
id=
"sublet_list"
class=
"text-center"
>
</tbody>
<tbody>
<!--<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>
</tbody>
</table>
</div>
<!-- /#page-content-wrapper -->
<div
class=
"text-right"
id=
"pagediv"
>
</div>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
<div
class=
"page-cla"
>
<ul
class=
"pagination"
>
<li><a
href=
"#"
>
«
</a></li>
<li><a
href=
"#"
>
1
</a></li>
<li><a
href=
"#"
>
2
</a></li>
<li><a
href=
"#"
>
3
</a></li>
<li><a
href=
"#"
>
4
</a></li>
<li><a
href=
"#"
>
5
</a></li>
<li><a
href=
"#"
>
»
</a></li>
</ul>
</div>
</div>
</div>
</div>
...
...
@@ -108,38 +76,28 @@
<div
class=
"table-responsive table-responsive1"
>
<table
class=
"table table-striped table-bordered table-hover"
>
<thead>
<tr>
<th>
跟进内容
</th>
<th>
跟进人
</th>
<th>
跟进时间
</th>
</tr>
<tr>
<th>
跟进内容
</th>
<th>
跟进人
</th>
<th>
跟进时间
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
更近人
</td>
<td>
Mark
</td>
<td>
Otto
</td>
</tr>
<tr>
<td>
更近时间
</td>
<td>
Jacob
</td>
<td>
Thornton
</td>
</tr>
<tbody
id=
"list_follow"
>
</tbody>
</table>
</div>
<div
class=
"control-group"
>
<label
class=
"control-label"
>
备注
</label>
<div
class=
"controls"
>
<input
class=
"form-control"
type=
"text"
id=
"content1"
name=
"content"
>
<p
class=
"help-block"
>
</p></div>
<textarea
class=
"form-control"
rows=
"3"
id=
"content"
></textarea>
</div>
</div>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
>
<button
type=
"button"
class=
"btn btn-primary"
id=
"submit_follow"
>
提交
</button>
</div>
...
...
application/model/FollowUp.php
0 → 100644
View file @
ad334230
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2017/12/21
* Time: 14:41
*/
namespace
app\model
;
use
think\Model
;
class
FollowUp
extends
Model
{
// 设置当前模型对应的完整数据表名称
protected
$table
=
'u_follow_up'
;
}
\ No newline at end of file
application/route.php
View file @
ad334230
...
...
@@ -72,6 +72,9 @@ Route::group('index', [
//transfer转铺列表
'transfer_list'
=>
[
'index/transfer/index'
,
[
'method'
=>
'get'
]],
'get_transfer'
=>
[
'index/transfer/getlist'
,
[
'method'
=>
'get'
]],
'putAway'
=>
[
'index/transfer/putAway'
,
[
'method'
=>
'post'
]],
//上下架转租商铺
'addFollow'
=>
[
'index/transfer/addFollow'
,[
'method'
=>
'post'
]],
//添加跟进
'followList'
=>
[
'index/transfer/followList'
,[
'method'
=>
'get'
]],
//跟进记录
//login
'login'
=>
[
'index/login/login'
,[
'method'
=>
'get'
]],
...
...
public/resource/js/transfer.js
View file @
ad334230
define
([
'doT'
,
'text!temp/transfer_template_tpl.html'
,
'ckfinder'
,
'ckfinderStart'
,
'css!style/home.css'
,
"datetimepicker"
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
var
user
=
{
user
=
{
pageNo
:
1
,
/*第几页*/
pageSize
:
10
,
/*每页显示多少条*/
...
...
@@ -11,12 +11,26 @@ define (['doT', 'text!temp/transfer_template_tpl.html','ckfinder','ckfinderStart
user
.
event
();
},
event
:
function
()
{
$
(
"#form_search_reset"
).
click
(
function
()
{
document
.
getElementById
(
"form_search"
).
reset
();
});
$
(
"#search"
).
click
(
function
()
{
user
.
getList
(
1
);
});
$
(
"#submit_follow"
).
click
(
function
()
{
user
.
addFollow
();
});
},
getList
:
function
(
pageNo
)
{
user
.
pageNo
=
pageNo
;
var
params
=
{};
params
.
pageNo
=
user
.
pageNo
;
params
.
start_date
=
$
(
"#start_date"
).
val
();
params
.
end_date
=
$
(
"#end_date"
).
val
();
params
.
name
=
$
(
"#name"
).
val
();
params
.
phone
=
$
(
"#phone"
).
val
();
params
.
shop_name
=
$
(
"#shop_name"
).
val
();
params
.
pageNo
=
user
.
pageNo
;
params
.
pageSize
=
user
.
pageSize
;
$
.
ajax
({
...
...
@@ -41,7 +55,99 @@ define (['doT', 'text!temp/transfer_template_tpl.html','ckfinder','ckfinderStart
});
}
});
}
},
addFollow
:
function
()
{
var
params
=
{};
params
.
id
=
id
;
params
.
content
=
$
(
"#content"
).
val
();
$
.
ajax
({
url
:
'/index/addFollow'
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
$
(
"#modal-process"
).
modal
(
'hide'
);
}
else
{
alert
(
data
.
msg
);
}
}
});
}
};
return
user
;
});
\ No newline at end of file
});
/**
* 编辑上架商铺
* @param obj
*/
function
edit
(
obj
)
{
var
params
=
{};
var
arr
=
$
(
obj
).
attr
(
"data-id"
).
split
(
','
);
params
.
id
=
arr
[
0
];
params
.
status
=
arr
[
1
];
if
(
params
.
status
==
0
)
{
params
.
status
=
2
;
}
else
{
params
.
status
=
0
;
}
$
.
ajax
({
url
:
'/index/putAway'
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
.
status
==
0
)
{
$
(
obj
).
html
(
'转为上架商铺'
);
$
(
obj
).
attr
(
'class'
,
'btn1 btn-danger'
);
$
(
obj
).
attr
(
'data-id'
,
arr
[
0
]
+
','
+
0
);
}
else
{
$
(
obj
).
html
(
'已转为上架商铺'
);
$
(
obj
).
attr
(
'class'
,
'btn1 btn-info'
);
$
(
obj
).
attr
(
'data-id'
,
arr
[
0
]
+
','
+
data
.
data
.
status
);
}
}
else
{
alert
(
data
.
msg
);
}
}
});
}
var
id
;
function
alertFollow
(
obj
){
id
=
$
(
obj
).
attr
(
"data-id"
);
$
(
"#content"
).
val
(
''
);
$
.
ajax
({
url
:
'/index/followList'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"id"
:
id
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
var
str
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
"<tr><td>"
+
item
[
'content'
]
+
"</td><td>"
+
item
[
'admin_name'
]
+
"</td><td>"
+
item
[
'create_time'
]
+
"</td></tr>"
;
$
(
"#list_follow"
).
html
(
str
);
});
}
else
{
alert
(
data
.
msg
);
}
}
});
}
/*
<tr>
<td>更近时间</td>
<td>Jacob</td>
<td>Thornton</td>
</tr>*/
public/resource/js/user.js
View file @
ad334230
...
...
@@ -34,6 +34,10 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
user
.
add_user
();
});
$
(
"#close"
).
click
(
function
()
{
document
.
getElementById
(
"add_user_form"
).
reset
();
});
$
(
"#confirm_delete"
).
click
(
function
(){
var
params
=
{};
params
.
id
=
$
(
"#delete_id"
).
val
();
...
...
public/resource/template/transfer_template_tpl.html
View file @
ad334230
...
...
@@ -2,6 +2,7 @@
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
>
<
td
>
[
%=
it
[
item
][
"shop_name"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"appellation"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"tel"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'manage_type'
]
%
]
<
/td
>
...
...
@@ -10,13 +11,20 @@
<
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
>
<
a
class
=
"btn1 btn-success "
href
=
"#modal-process"
data
-
toggle
=
"modal"
data
-
id
=
"[%= it[item]['id'] %]"
onclick
=
"alertFollow(this)"
>
跟进
<
/a
>
<
a
href
=
"#modal-details"
data
-
toggle
=
"modal"
onclick
=
"edit(this)"
data
-
id
=
"[%= it[item]['id'] %], [%= it[item]['status'] %]"
[
%
if
(
it
[
item
][
"status"
]
==
0
){
%
]
class
=
"btn1 btn-danger"
>
转为上架商铺
<
/a
>
[
%
}
else
{
%
]
class
=
"btn1 btn-info"
>
已转为上架商铺
<
/a
>
[
%
}
%
]
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"
7
"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
td
colspan
=
"
8
"
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