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
796f0563
Commit
796f0563
authored
Jun 13, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PC-进场记录列表
parent
83da920a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
131 additions
and
1 deletion
+131
-1
MarchIn.php
application/index/controller/MarchIn.php
+85
-0
marchin_list.html
application/index/view/marchin/marchin_list.html
+11
-0
OMarchInModel.php
application/model/OMarchInModel.php
+33
-0
route.php
application/route.php
+2
-1
No files found.
application/index/controller/MarchIn.php
0 → 100644
View file @
796f0563
<?php
namespace
app\index\controller
;
/**
* Created by PhpStorm.
* 进场相关
* User: zhuwei
* Date: 2018/6/13
* Time: 上午10:18
*/
use
app\index\extend\Basic
;
use
app\model\OMarchInModel
;
use
think\Request
;
class
MarchIn
extends
Basic
{
protected
$oMarchInModel
;
public
function
__construct
(
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
oMarchInModel
=
new
OMarchInModel
();
}
/**
* 进场记录列表
* User: 朱伟
* Date: 2018/6/13
* Time: 上午10:34
*/
public
function
marchInList
(){
if
(
$this
->
request
->
isAjax
())
{
return
view
(
'marchin/marchin_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
[
'a.district_id'
]
=
$params
[
'district_id'
];
}
//3.门店名称
if
(
!
empty
(
$params
[
'store_id'
]))
{
$where
[
'c.store_id'
]
=
$params
[
'store_id'
];
}
//4.姓名
if
(
!
empty
(
$params
[
'user_name'
]))
{
$where
[
'b.user_name'
]
=
[
'LIKE'
,
'%'
.
$params
[
'user_name'
]
.
'%'
];
}
//5.手机号
if
(
!
empty
(
$params
[
'user_phone'
]))
{
$where
[
'b.user_phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'user_phone'
]
.
'%'
];
}
//6.进场时间
//if (!empty($params['registration_start']) && !empty($params['registration_end'])) {
//$where['a.registration_time'] = ['between time', [$params['registration_start']. ' 00:00:00', $params['registration_end'] . ' 23:59:59']];
//}
//搜索条件 end
$fields_evaluate
=
'd.user_name,d.user_phone,a.create_time,d.report_agent_name,d.report_agent_phone,e.store_name,c.house_title'
;
$data
[
'list'
]
=
$this
->
oMarchInModel
->
findmarchInList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$fields_evaluate
,
$where
);
$data
[
'total'
]
=
$this
->
oMarchInModel
->
findmarchInListCount
(
$fields_evaluate
,
$where
);
//var_dump($result);
//return $result;
return
$this
->
response
(
200
,
'success'
,
$data
);
}
}
\ No newline at end of file
application/index/view/marchin/marchin_list.html
0 → 100644
View file @
796f0563
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Title
</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
application/model/OMarchInModel.php
View file @
796f0563
...
...
@@ -172,4 +172,36 @@ class OMarchInModel extends Model
->
select
();
}
public
function
findmarchInList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$params
=
''
)
{
$result
=
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.reception_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'o_report d'
,
'a.report_id = d.id'
,
'left'
)
->
join
(
'a_store e'
,
'd.report_store_id = e.id'
,
'left'
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
return
$result
;
}
public
function
findmarchInListCount
(
$field
,
$params
=
''
)
{
$result
=
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.reception_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'o_report d'
,
'a.report_id = d.id'
,
'left'
)
->
join
(
'a_store e'
,
'd.report_store_id = e.id'
,
'left'
)
->
where
(
$params
)
->
count
();
return
$result
;
}
}
\ No newline at end of file
application/route.php
View file @
796f0563
...
...
@@ -245,8 +245,9 @@ 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
...
...
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