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
789b85ad
Commit
789b85ad
authored
Jun 14, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PC-进场记录列表-搜索条件完善
parent
c8dc4c34
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
12 deletions
+20
-12
MarchIn.php
application/index/controller/MarchIn.php
+18
-12
OMarchInModel.php
application/model/OMarchInModel.php
+2
-0
No files found.
application/index/controller/MarchIn.php
View file @
789b85ad
...
@@ -49,37 +49,43 @@ class MarchIn extends Basic
...
@@ -49,37 +49,43 @@ class MarchIn extends Basic
if
(
!
empty
(
$params
[
'create_time_start'
])
&&
!
empty
(
$params
[
'create_time_end'
]))
{
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'
]];
$where
[
'a.create_time'
]
=
[
'between time'
,
[
$params
[
'create_time_start'
]
.
' 00:00:00'
,
$params
[
'create_time_end'
]
.
' 23:59:59'
]];
}
}
//2.部门
//2.部门
if
(
!
empty
(
$params
[
'district_id'
]))
{
if
(
!
empty
(
$params
[
'district_id'
]))
{
$where
[
'
a
.district_id'
]
=
$params
[
'district_id'
];
$where
[
'
b
.district_id'
]
=
$params
[
'district_id'
];
}
}
//3.门店名称
//3.门店名称
if
(
!
empty
(
$params
[
'store_id'
]))
{
if
(
!
empty
(
$params
[
'store_id'
]))
{
$where
[
'
c
.store_id'
]
=
$params
[
'store_id'
];
$where
[
'
e
.store_id'
]
=
$params
[
'store_id'
];
}
}
//4.客户姓名
//4.客户姓名
if
(
!
empty
(
$params
[
'user_name'
]))
{
if
(
!
empty
(
$params
[
'user_name'
]))
{
$where
[
'
b
.user_name'
]
=
[
'LIKE'
,
'%'
.
$params
[
'user_name'
]
.
'%'
];
$where
[
'
d
.user_name'
]
=
[
'LIKE'
,
'%'
.
$params
[
'user_name'
]
.
'%'
];
}
}
//5.客户手机号
//5.客户手机号
if
(
!
empty
(
$params
[
'user_phone'
]))
{
if
(
!
empty
(
$params
[
'user_phone'
]))
{
$where
[
'
b
.user_phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'user_phone'
]
.
'%'
];
$where
[
'
d
.user_phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'user_phone'
]
.
'%'
];
}
}
//6.报备人手机号
//6.报备人手机号
if
(
!
empty
(
$params
[
'
user
_phone'
]))
{
if
(
!
empty
(
$params
[
'
report_agent
_phone'
]))
{
$where
[
'
b.user_phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'user
_phone'
]
.
'%'
];
$where
[
'
d.report_agent_phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'report_agent
_phone'
]
.
'%'
];
}
}
//7.报备人姓名
//7.报备人姓名
if
(
!
empty
(
$params
[
'
user_phon
e'
]))
{
if
(
!
empty
(
$params
[
'
report_agent_nam
e'
]))
{
$where
[
'
b.user_phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'user_phon
e'
]
.
'%'
];
$where
[
'
d.report_agent_name'
]
=
[
'LIKE'
,
'%'
.
$params
[
'report_agent_nam
e'
]
.
'%'
];
}
}
//8.商铺名
//8.商铺名
if
(
!
empty
(
$params
[
'
user_phon
e'
]))
{
if
(
!
empty
(
$params
[
'
house_titl
e'
]))
{
$where
[
'
b.user_phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'user_phon
e'
]
.
'%'
];
$where
[
'
c.house_title'
]
=
[
'LIKE'
,
'%'
.
$params
[
'house_titl
e'
]
.
'%'
];
}
}
//9.商铺类型
//9.商铺类型
if
(
!
empty
(
$params
[
'
user_phon
e'
]))
{
if
(
!
empty
(
$params
[
'
shop_typ
e'
]))
{
$where
[
'
b.user_phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'user_phone'
]
.
'%'
]
;
$where
[
'
f.shop_type'
]
=
$params
[
'shop_type'
]
;
}
}
//搜索条件 end
//搜索条件 end
...
...
application/model/OMarchInModel.php
View file @
789b85ad
...
@@ -181,6 +181,7 @@ class OMarchInModel extends Model
...
@@ -181,6 +181,7 @@ class OMarchInModel extends Model
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'o_report d'
,
'a.report_id = d.id'
,
'left'
)
->
join
(
'o_report d'
,
'a.report_id = d.id'
,
'left'
)
->
join
(
'a_store e'
,
'd.report_store_id = e.id'
,
'left'
)
->
join
(
'a_store e'
,
'd.report_store_id = e.id'
,
'left'
)
->
join
(
'g_houses f'
,
'c.house_id = f.id'
,
'left'
)
->
where
(
$params
)
->
where
(
$params
)
->
order
(
$order_
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
...
@@ -198,6 +199,7 @@ class OMarchInModel extends Model
...
@@ -198,6 +199,7 @@ class OMarchInModel extends Model
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'o_order c'
,
'a.order_id = c.id'
,
'left'
)
->
join
(
'o_report d'
,
'a.report_id = d.id'
,
'left'
)
->
join
(
'o_report d'
,
'a.report_id = d.id'
,
'left'
)
->
join
(
'a_store e'
,
'd.report_store_id = e.id'
,
'left'
)
->
join
(
'a_store e'
,
'd.report_store_id = e.id'
,
'left'
)
->
join
(
'g_houses f'
,
'c.house_id = f.id'
,
'left'
)
->
where
(
$params
)
->
where
(
$params
)
->
count
();
->
count
();
...
...
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