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
99a74b39
Commit
99a74b39
authored
Feb 05, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
总监列表
parent
cb2b3154
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
104 additions
and
53 deletions
+104
-53
Broker.php
application/index/controller/Broker.php
+0
-51
District.php
application/index/controller/District.php
+98
-0
index.html
application/index/view/district/index.html
+0
-0
route.php
application/route.php
+6
-2
No files found.
application/index/controller/Broker.php
View file @
99a74b39
...
...
@@ -11,7 +11,6 @@ namespace app\index\controller;
use
app\index\extend\Basic
;
use
app\model\AAgents
;
use
app\model\ADistrict
;
use
app\model\Agents
;
use
app\model\GHousesToAgents
;
...
...
@@ -175,56 +174,7 @@ class Broker extends Basic
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
/**
* 部门总监列表
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getDistrictList
()
{
$data
[
'status'
]
=
200
;
$data
[
'data'
]
=
''
;
$data
[
'msg'
]
=
''
;
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$search
=
$this
->
params
[
'search'
];
$agents
=
new
AAgents
();
$field
=
'id,name,create_time,phone,district_id'
;
$where
=
''
;
$where
.=
'level=40 AND status=0'
;
if
(
$search
!=
NULL
)
{
$where
.=
" AND (phone like '
{
$search
}
%' or name like '
{
$search
}
%')"
;
}
$data
[
'list'
]
=
$agents
->
getListDistrict
(
$pageNo
,
$pageSize
,
'id DESC'
,
$field
,
$where
);
$data
[
'total'
]
=
$agents
->
getListDistrictTotal
(
$where
);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
);
}
/**
* 部门总监列表页面
*/
public
function
districtList
()
{
return
view
(
'agent/district'
);
}
/**
* 添加部门,绑定总监关系
*
* @return \think\Response
* @throws \think\exception\PDOException
*/
public
function
addDistrict
()
{
if
(
$this
->
params
[
'department_name'
]
||
$this
->
params
[
'agents_id'
])
{
$district
=
new
ADistrict
();
$this
->
data
=
$district
->
addDepartmentAgents
(
$this
->
params
,
$this
->
params
[
'agents_id'
]);
}
else
{
$this
->
code
=
101
;
$this
->
msg
=
'department or district is null'
;
}
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
}
}
\ No newline at end of file
application/index/controller/District.php
0 → 100644
View file @
99a74b39
<?php
/**
* Created by PhpStorm.
* User: hu jun
* Date: 2018/2/5
* Time: 15:19
*/
namespace
app\index\controller
;
use
app\index\extend\Basic
;
use
app\model\AAgents
;
use
app\model\ADistrict
;
class
District
extends
Basic
{
/**
* 部门总监列表
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getDistrictList
()
{
$data
[
'status'
]
=
200
;
$data
[
'data'
]
=
''
;
$data
[
'msg'
]
=
''
;
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$search
=
$this
->
params
[
'search'
];
$agents
=
new
AAgents
();
$field
=
'id,name,create_time,phone,district_id'
;
$where
=
''
;
$where
.=
'level=40 AND status=0'
;
if
(
$search
!=
NULL
)
{
$where
.=
" AND (phone like '
{
$search
}
%' or name like '
{
$search
}
%')"
;
}
$data
[
'list'
]
=
$agents
->
getListDistrict
(
$pageNo
,
$pageSize
,
'id DESC'
,
$field
,
$where
);
$data
[
'total'
]
=
$agents
->
getListDistrictTotal
(
$where
);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
);
}
/**
* 部门总监列表页面
*/
public
function
districtList
()
{
return
view
(
'index'
);
}
/**
* 添加部门,绑定总监关系
*
* @return \think\Response
* @throws \think\exception\PDOException
*/
public
function
addDistrict
()
{
if
(
$this
->
params
[
'department_name'
]
||
$this
->
params
[
'agents_id'
])
{
$district
=
new
ADistrict
();
$this
->
data
=
$district
->
addDepartmentAgents
(
$this
->
params
,
$this
->
params
[
'agents_id'
]);
}
else
{
$this
->
code
=
101
;
$this
->
msg
=
'department or district is null'
;
}
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
}
/**
* 根据部门名获取部门列表
*
* @return \think\Response
*/
public
function
getDistrictListByName
()
{
$data
[
'status'
]
=
200
;
$data
[
'data'
]
=
''
;
$data
[
'msg'
]
=
''
;
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$where
[
'status'
]
=
0
;
if
(
$this
->
params
[
'district_name'
])
{
$where
[
'district_name'
]
=
[
'LIKE'
,
$this
->
params
[
'district_name'
]
.
'%'
];
}
if
(
$where
)
{
$agent
=
new
ADistrict
();
$field
=
'id,district_name'
;
$data
[
'data'
]
=
$agent
->
getList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$field
,
$where
);
}
else
{
$data
[
'msg'
]
=
'没有部门信息'
;
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
\ No newline at end of file
application/index/view/
agent/district
.html
→
application/index/view/
district/index
.html
View file @
99a74b39
File moved
application/route.php
View file @
99a74b39
...
...
@@ -123,8 +123,12 @@ Route::group('index', [
'editExclusive'
=>
[
'index/houses/editExclusive'
,
[
'method'
=>
'post'
]],
//添加和编辑楼盘独家
'getExclusive'
=>
[
'index/houses/getExclusive'
,
[
'method'
=>
'get'
]],
//获取楼盘独家
'getRecords'
=>
[
'index/houses/getRecords'
,[
'method'
=>
'get'
]],
//操作记录
'getDistrictList'
=>
[
'index/broker/getDistrictList'
,[
'method'
=>
'get'
]],
//总监列表
'districtList'
=>
[
'index/broker/districtList'
,[
'method'
=>
'get'
]],
//总监列表
'getDistrictList'
=>
[
'index/district/getDistrictList'
,[
'method'
=>
'get'
]],
//总监列表
'districtList'
=>
[
'index/district/districtList'
,[
'method'
=>
'get'
]],
//总监列表
'adddistrict'
=>
[
'index/district/addDistrict'
,[
'method'
=>
'post'
]],
//添加部门,绑定总监关系
'storeList'
=>
[
'index/Store/index'
,[
'method'
=>
'get'
]],
//门店列表
'addStore'
=>
[
'index/Store/addStore'
,[
'method'
=>
'get'
]],
//添加门店
'getDistrictListByName'
=>
[
'index/broker/getDistrictListByName'
,[
'method'
=>
'get'
]],
//添加门店
]);
...
...
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