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
01e207c7
Commit
01e207c7
authored
Jun 14, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监督执行列表
parent
bf955475
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
147 additions
and
0 deletions
+147
-0
Supervise.php
application/index/controller/Supervise.php
+75
-0
supervise_list.html
application/index/view/supervise/supervise_list.html
+11
-0
ASuperviseModel.php
application/model/ASuperviseModel.php
+55
-0
route.php
application/route.php
+6
-0
No files found.
application/index/controller/Supervise.php
View file @
01e207c7
...
...
@@ -11,9 +11,19 @@ namespace app\index\controller;
use
app\index\extend\Basic
;
use
app\model\AgentsVisitors
;
use
app\model\ASuperviseModel
;
class
Supervise
extends
Basic
{
protected
$aSuperviseModel
;
public
function
__construct
(
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
aSuperviseModel
=
new
ASuperviseModel
();
}
/**
* 门店拜访
*
...
...
@@ -136,4 +146,68 @@ class Supervise extends Basic
return
view
(
'carryOut'
);
}
}
/**
* 监督执行列表
* User: 朱伟
* Date: 2018/6/14
* Time: 14:10:15
*/
public
function
superviseList
(){
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'supervise/supervise_list'
);
}
$result
=
''
;
$params
=
$this
->
params
;
$checkResult
=
$this
->
validate
(
$params
,
"VerifyValidate.select"
);
if
(
true
!==
$checkResult
)
{
//return $this->response("101", $checkResult);
}
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
//搜索条件 start
//1.上传时间
if
(
!
empty
(
$params
[
'create_time_start'
])
&&
!
empty
(
$params
[
'create_time_end'
]))
{
$where
[
'a.create_time'
]
=
[
'between time'
,
[
$params
[
'create_time_start'
]
.
' 00:00:00'
,
$params
[
'create_time_end'
]
.
' 23:59:59'
]];
}
//2.部门
if
(
!
empty
(
$params
[
'district_id'
]))
{
$where
[
'b.district_id'
]
=
$params
[
'district_id'
];
}
//3.门店名称
if
(
!
empty
(
$params
[
'store_id'
]))
{
$where
[
'b.store_id'
]
=
$params
[
'store_id'
];
}
//4.提交人手机号
if
(
!
empty
(
$params
[
'phone'
]))
{
$where
[
'b.phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'phone'
]
.
'%'
];
}
//5.跟进内容
if
(
!
empty
(
$params
[
'remark'
]))
{
$where
[
'a.remark'
]
=
[
'LIKE'
,
'%'
.
$params
[
'remark'
]
.
'%'
];
}
//搜索条件 end
$fields_evaluate
=
'a.create_time,a.agent_name,a.address,a.img as supervise_img,a.remark,b.name,b.phone,c.store_name'
;
$data
[
'list'
]
=
$this
->
aSuperviseModel
->
findSuperviseList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$fields_evaluate
,
$where
);
$data
[
'total'
]
=
$this
->
aSuperviseModel
->
findSuperviseListCount
(
$fields_evaluate
,
$where
);
foreach
(
$data
[
'list'
]
as
$k
=>
$v
)
{
$data
[
'list'
][
$k
][
'supervise_img'
]
=
CK_IMG_URL
.
'images/supervise/'
.
$v
[
'supervise_img'
];
}
//var_dump($result);
//return $result;
return
$this
->
response
(
200
,
'success'
,
$data
);
}
}
\ No newline at end of file
application/index/view/supervise/supervise_list.html
0 → 100644
View file @
01e207c7
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Titlesupervise_list
</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
application/model/ASuperviseModel.php
0 → 100644
View file @
01e207c7
<?php
namespace
app\model
;
use
think\Db
;
use
think\Model
;
/**
* Created by PhpStorm.
* User : zhuwei
* Date : 2018-06-14
* Time : 14:26:58
* Intro:
*/
class
ASuperviseModel
extends
Model
{
protected
$table
=
"a_supervise"
;
private
$db_model
;
function
__construct
()
{
$this
->
db_model
=
Db
::
name
(
$this
->
table
);
}
public
function
findSuperviseList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$params
=
''
)
{
$result
=
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.agent_id = b.id'
,
'left'
)
->
join
(
'a_store c'
,
'b.store_id = c.id'
,
'left'
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
return
$result
;
}
public
function
findSuperviseListCount
(
$field
,
$params
=
''
)
{
$result
=
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.agent_id = b.id'
,
'left'
)
->
join
(
'a_store c'
,
'b.store_id = c.id'
,
'left'
)
->
where
(
$params
)
->
count
();
return
$result
;
}
}
\ No newline at end of file
application/route.php
View file @
01e207c7
...
...
@@ -244,8 +244,14 @@ Route::group('index', [
'test'
=>
[
'index/WxTest/test'
,
[
'method'
=>
'POST|GET'
]
],
//wx
'evaluationList'
=>
[
'index/Evaluation/evaluationList'
,
[
'method'
=>
'POST|GET'
]
],
//评价列表 朱伟 2018-06-13
'marchInList'
=>
[
'index/MarchIn/marchInList'
,
[
'method'
=>
'POST|GET'
]
],
//进场记录列表 朱伟 2018-06-13
'superviseList'
=>
[
'index/Supervise/superviseList'
,
[
'method'
=>
'POST|GET'
]
],
//监督执行列表 朱伟 2018-06-14
]);
...
...
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