Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tospur
Overview
Overview
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
felix
tospur
Commits
12ffe958
Commit
12ffe958
authored
Oct 19, 2015
by
felix
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
每日一更
parent
a6ba1c7d
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
99 additions
and
57 deletions
+99
-57
wp-content/plugins/tospur/Admin/House.php
+1
-0
wp-content/plugins/tospur/Admin/customerList.php
+2
-0
wp-content/plugins/tospur/Admin/customerTrackingList.php
+2
-0
wp-content/plugins/tospur/Admin/handle_view_house.php
+1
-1
wp-content/plugins/tospur/Admin/newHouseList.php
+2
-3
wp-content/plugins/tospur/Admin/rentHouse.php
+1
-1
wp-content/plugins/tospur/Admin/rentHouseList.php
+4
-3
wp-content/plugins/tospur/Admin/secHandHouseList.php
+3
-3
wp-content/plugins/tospur/Admin/views/addConsultant.html
+1
-1
wp-content/plugins/tospur/Admin/views/customerList.html
+11
-7
wp-content/plugins/tospur/Admin/views/customerTrackingList.html
+4
-2
wp-content/plugins/tospur/Admin/views/listBlock.html
+1
-0
wp-content/plugins/tospur/Admin/views/recConsultant.html
+2
-1
wp-content/plugins/tospur/Admin/views/recommendHouse.html
+51
-32
wp-content/plugins/tospur/Dao/SearchDao.php
+12
-3
wp-content/themes/tospur/views/sale.html
+1
-0
No files found.
wp-content/plugins/tospur/Admin/House.php
View file @
12ffe958
...
...
@@ -81,6 +81,7 @@ class House extends Tospur_House{
$context
[
"buildProperty"
]
=
SearchDao
::
searchBuildProperty
();
$context
[
"room"
]
=
SearchDao
::
searchRoom
();
$context
[
"photoType"
]
=
SearchDao
::
searchPhotoType
();
$context
[
"house_type"
]
=
0
;
Timber
::
render
(
"newhouse.html"
,
$context
);
}
...
...
wp-content/plugins/tospur/Admin/customerList.php
View file @
12ffe958
...
...
@@ -212,6 +212,8 @@ function function_customerList()
$context
=
array
();
$context
[
'city'
]
=
SearchDao
::
searchCity
();
$current_user
=
wp_get_current_user
();
$context
[
'role'
]
=
$current_user
->
roles
[
0
];
if
(
isset
(
$_REQUEST
[
'hasSearch'
]))
{
$context
[
'req'
]
=
$_REQUEST
;
}
...
...
wp-content/plugins/tospur/Admin/customerTrackingList.php
View file @
12ffe958
...
...
@@ -100,6 +100,8 @@ function function_customerTrackingList()
$context
=
array
();
$context
[
'status'
]
=
SearchDao
::
searchStatusType
(
3
);
$context
[
'req'
]
=
$_REQUEST
;
$current_user
=
wp_get_current_user
();
$context
[
'role'
]
=
$current_user
->
roles
[
0
];
Timber
::
render
(
"customerTrackingList.html"
,
$context
);
}
...
...
wp-content/plugins/tospur/Admin/handle_view_house.php
View file @
12ffe958
...
...
@@ -38,7 +38,7 @@ if ($result->consultant_id && !$role_flag) {
);
}
$context
[
'cityId'
]
=
$result
->
cityId
;
$context
[
'page'
]
=
'view'
;
$context
[
'page'
]
=
'view
_house
'
;
$context
[
'house_result'
]
=
$result
;
Timber
::
render
(
'handle.html'
,
$context
);
...
...
wp-content/plugins/tospur/Admin/newHouseList.php
View file @
12ffe958
...
...
@@ -336,10 +336,10 @@ class newHouseList extends WP_List_Table
if
(
isset
(
$_REQUEST
[
"organization"
])
&&
$_REQUEST
[
"organization"
]
!=
-
1
)
{
$params
[]
=
$_REQUEST
[
"organization"
];
$sql
=
$sql
.
" and subsidiaryId=%d "
;
}
else
if
(
$_REQUEST
[
"searchText"
]
!=
NULL
)
{
}
else
if
(
trim
(
$_REQUEST
[
"searchText"
])
!=
NULL
)
{
$params
[]
=
'%'
.
$_REQUEST
[
'searchText'
]
.
'%'
;
$sql
=
$sql
.
" and name like %s"
;
}
else
if
(
$_REQUEST
[
"stuff"
]
!=
NULL
)
{
}
else
if
(
trim
(
$_REQUEST
[
"stuff"
])
!=
NULL
)
{
$params
[]
=
'%'
.
$_REQUEST
[
'stuff'
]
.
'%'
;
$sql
=
$sql
.
" and consul_name like %s"
;
}
...
...
@@ -352,7 +352,6 @@ class newHouseList extends WP_List_Table
$order
=
$_REQUEST
[
"order"
];
$sql
=
$sql
.
" order by "
.
$orderby
.
" "
.
$order
;
}
$result
=
DBManager
::
get_results
(
$wpdb
->
prepare
(
$sql
,
$params
));
$data
=
array
();
foreach
(
$result
as
$key
=>
$value
)
{
...
...
wp-content/plugins/tospur/Admin/rentHouse.php
View file @
12ffe958
...
...
@@ -14,7 +14,7 @@ class RentHouse extends Tospur_House{
'name'
=>
$_POST
[
'housename'
],
'total_price'
=>
$_POST
[
'total_price'
],
'average_price'
=>
$_POST
[
'average_price'
],
'buildproperty_id'
=>
$_POST
[
'
buildproperty_id
'
],
'buildproperty_id'
=>
$_POST
[
'
roomNum
'
],
'covered_area'
=>
$_POST
[
'covered_area'
],
'floor'
=>
$_POST
[
'floor'
],
'faceto'
=>
$_POST
[
'faceto'
],
...
...
wp-content/plugins/tospur/Admin/rentHouseList.php
View file @
12ffe958
...
...
@@ -357,13 +357,13 @@ class rentHouseList extends WP_List_Table
$sql
=
$sql
.
" and creattime between %s and %s"
;
}
if
(
isset
(
$_REQUEST
[
"organization"
])
&&
$_REQUEST
[
"organization"
]
!=
-
1
)
{
if
(
isset
(
$_REQUEST
[
"organization"
])
&&
$_REQUEST
[
"organization"
]
!=
-
1
&&
$_REQUEST
[
"organization"
]
!=
0
)
{
$params
[]
=
$_REQUEST
[
"organization"
];
$sql
=
$sql
.
" and subsidiaryId=%d "
;
}
else
if
(
$_REQUEST
[
"searchText"
]
!=
NULL
)
{
}
else
if
(
trim
(
$_REQUEST
[
"searchText"
]
!=
NULL
)
)
{
$params
[]
=
'%'
.
$_REQUEST
[
'searchText'
]
.
'%'
;
$sql
=
$sql
.
" and name like %s"
;
}
else
if
(
$_REQUEST
[
"stuff"
]
!=
NULL
)
{
}
else
if
(
trim
(
$_REQUEST
[
"stuff"
]
!=
NULL
)
)
{
$params
[]
=
'%'
.
$_REQUEST
[
'stuff'
]
.
'%'
;
$sql
=
$sql
.
" and consul_name like %s"
;
}
...
...
@@ -373,6 +373,7 @@ class rentHouseList extends WP_List_Table
$order
=
$_GET
[
"order"
];
$sql
=
$sql
.
" order by "
.
$orderby
.
" "
.
$order
;
}
$result
=
DBManager
::
get_results
(
$wpdb
->
prepare
(
$sql
,
$params
));
$data
=
array
();
foreach
(
$result
as
$key
=>
$value
)
{
...
...
wp-content/plugins/tospur/Admin/secHandHouseList.php
View file @
12ffe958
...
...
@@ -382,13 +382,13 @@ class secHandHouseList extends WP_List_Table
$sql
=
$sql
.
" and creattime between %s and %s"
;
}
if
(
isset
(
$_REQUEST
[
"organization"
])
&&
$_REQUEST
[
"organization"
]
!=
-
1
)
{
if
(
isset
(
$_REQUEST
[
"organization"
])
&&
$_REQUEST
[
"organization"
]
!=
-
1
&&
$_REQUEST
[
"organization"
]
!=
0
)
{
$params
[]
=
$_REQUEST
[
"organization"
];
$sql
=
$sql
.
" and subsidiaryId=%d "
;
}
else
if
(
$_REQUEST
[
"searchText"
]
!=
NULL
)
{
}
else
if
(
trim
(
$_REQUEST
[
"searchText"
]
!=
NULL
)
)
{
$params
[]
=
'%'
.
$_REQUEST
[
'searchText'
]
.
'%'
;
$sql
=
$sql
.
" and name like %s"
;
}
else
if
(
$_REQUEST
[
"stuff"
]
!=
NULL
)
{
}
else
if
(
trim
(
$_REQUEST
[
"stuff"
]
!=
NULL
)
)
{
$params
[]
=
'%'
.
$_REQUEST
[
'stuff'
]
.
'%'
;
$sql
=
$sql
.
" and consul_name like %s"
;
}
...
...
wp-content/plugins/tospur/Admin/views/addConsultant.html
View file @
12ffe958
...
...
@@ -55,7 +55,7 @@
}
else
{
$
(
"#consultantImg"
).
append
(
p
);
}
{
%
if
(
house_type
==
1
or
house_type
==
2
or
page
==
'customer'
)
%
}
{
%
if
(
house_type
==
1
or
house_type
==
2
or
page
==
'customer'
or
page
==
'view_house'
)
%
}
controlCommand
(
"consultantImg"
,
1
,
1
);
{
%
endif
%
}
}
...
...
wp-content/plugins/tospur/Admin/views/customerList.html
View file @
12ffe958
...
...
@@ -4,8 +4,10 @@
<input
type=
"hidden"
name=
"page"
value=
"customerList"
>
<div>
<input
type=
"hidden"
name=
"hasSearch"
value=
"1"
/>
{% import "selectOrganization.html" as macro %}
{{ macro.selectOrganization("customer") }}
{% if role != 'zygw' %}
{% import "selectOrganization.html" as macro %}
{{ macro.selectOrganization("customer") }}
{% endif %}
<label
for=
"status"
class=
"hidden"
></label>
<select
name=
"status"
id=
"status"
>
<option
value=
"-1"
>
状态
</option>
...
...
@@ -87,11 +89,13 @@
<label
for=
"acreage"
class=
"hidden"
></label>
<select
id=
"acreage"
name=
"acreage"
>
<option
value=
"-1"
>
面积
</option>
{% set dicArea = function('SearchDao::searchArea', req.listCity) %}
{% if dicArea %}
{% for item in dicArea %}
<option
{{
item
.
value =
=
req
.
acreage
?"
selected
"
:
""
}}
value=
"{{ item.value }}"
>
{{ item.value }}
</option>
{% endfor %}
{% if req.listCity != null %}
{% set dicArea = function('SearchDao::searchArea', req.listCity) %}
{% if dicArea %}
{% for item in dicArea %}
<option
{{
item
.
value =
=
req
.
acreage
?"
selected
"
:
""
}}
value=
"{{ item.value }}"
>
{{ item.value }}
</option>
{% endfor %}
{% endif %}
{% endif %}
</select>
</div>
...
...
wp-content/plugins/tospur/Admin/views/customerTrackingList.html
View file @
12ffe958
...
...
@@ -5,8 +5,10 @@
<input
type=
"hidden"
name=
"page"
value=
"customerTrackingList"
>
<div>
{% import "selectOrganization.html" as macro %}
{{ macro.selectOrganization("customerTracking") }}
{% if role != 'zygw' %}
{% import "selectOrganization.html" as macro %}
{{ macro.selectOrganization("customerTracking") }}
{% endif %}
<label
for=
"status_type"
class=
"hidden"
></label>
<select
name=
"status_type"
id=
"status_type"
>
<option
value=
"-1"
>
跟进类型
</option>
...
...
wp-content/plugins/tospur/Admin/views/listBlock.html
View file @
12ffe958
...
...
@@ -125,6 +125,7 @@
setCity
(
"listCity"
,
"listDistrict"
,
"listPlate"
);
acreage
.
find
(
'option:not(:first-child)'
).
remove
();
totalPrice
.
find
(
'option:not(:first-child)'
).
remove
();
averagePrice
.
find
(
'option:not(:first-child)'
).
remove
();
rentalPrice
.
find
(
'option:not(:first-child)'
).
remove
();
//面积
searchAcreage
(
cityId
,
acreage
);
...
...
wp-content/plugins/tospur/Admin/views/recConsultant.html
View file @
12ffe958
...
...
@@ -34,7 +34,8 @@
var
organizationId
=
getOrganization
(
'consultant'
);
var
select
=
$
(
'#consultant_organization'
).
find
(
'select[data-depth]:not(.hidden)'
);
if
(
select
.
length
>
1
&&
organizationId
==
-
1
&&
consultantName
==
""
){
alert
(
"请选择部门"
)
alert
(
"请选择部门"
);
return
false
;
}
searchConsultant
(
organizationId
,
consultantName
);
});
...
...
wp-content/plugins/tospur/Admin/views/recommendHouse.html
View file @
12ffe958
...
...
@@ -69,11 +69,14 @@
function
close_modal_houseList
(){
$
(
"#myModal"
).
modal
(
'hide'
);
}
var
flag
=
0
;
function
init_modal_houseList
(
callback
,
houseType
){
judgeHouseType
(
houseType
);
$
(
"#myModal"
).
on
(
"shown.bs.modal"
,
function
(){
setCityArea
();
if
(
flag
==
0
){
setCityArea
();
flag
=
1
;
}
});
$
(
"#myModal"
).
find
(
"select"
).
change
(
function
(){
...
...
@@ -89,46 +92,56 @@
$
(
"#modal_houseList"
).
on
(
"click"
,
".row"
,
function
(){
callback
(
$
(
this
).
data
());
});
};
function
setCityArea
(){
var
acreage
=
$
(
"#myModal_acreage"
);
var
price
=
$
(
"#myModal_price"
);
var
city
=
$
(
"#myModal_cityId"
);
var
area
=
$
(
"#myModal_areaId"
);
var
plate
=
$
(
'#myModal_plateId'
);
if
(
$
(
"#baseCity"
).
length
>
0
){
//增加!=null 时因为在添加合同模块中调用这个方法,合同模块没有这个baseCity的Id
if
(
$
(
"#baseCity"
).
val
()
!=
null
&&
$
(
"#baseCity"
).
val
()
!=
-
1
){
var
cityId
=
$
(
"#baseCity"
).
val
();
city
.
val
(
cityId
);
searchCity
(
cityId
,
area
);
searchCity
(
cityId
,
area
);
searchAcreage
(
cityId
,
acreage
);
//城市联动房子价格
{
%
if
house_type
==
0
%
}
searchPrice
(
cityId
,
price
)
{
%
elseif
house_type
==
1
%
}
searchTotalPrice
(
cityId
,
price
);
{
%
else
%
}
searchRentalPrice
(
cityId
,
price
);
{
%
endif
%
}
}
else
{
var
cityId
=
city
.
val
();
}
city
.
change
(
function
(){
var
cityId
=
city
.
val
();
var
areaId
=
area
.
val
();
area
.
find
(
'option:not(:first-child)'
).
remove
();
plate
.
find
(
'option:not(:first-child)'
).
remove
();
searchCity
(
cityId
,
area
);
//城市面积联动
searchAcreage
(
cityId
,
acreage
);
//城市联动房子价格
searchTotalPrice
(
cityId
,
price
);
});
area
.
change
(
function
()
{
var
cityId
=
city
.
val
();
var
areaId
=
area
.
val
();
$
(
"#modal_houseList"
).
find
(
".row"
).
remove
();
plate
.
find
(
'option:not(:first-child)'
).
remove
();
searchArea
(
cityId
,
areaId
,
plate
)
});
//城市面积联动
searchAcreage
(
cityId
,
acreage
);
//城市联动房子价格
searchTotalPrice
(
cityId
,
price
);
city
.
val
(
cityId
);
city
.
change
(
function
(){
var
cityId
=
city
.
val
();
area
.
find
(
'option:not(:first-child)'
).
remove
();
plate
.
find
(
'option:not(:first-child)'
).
remove
();
price
.
find
(
'option:not(:first-child)'
).
remove
();
acreage
.
find
(
'option:not(:first-child)'
).
remove
();
searchCity
(
cityId
,
area
);
//城市面积联动
searchAcreage
(
cityId
,
acreage
);
//城市联动房子价格
{
%
if
house_type
==
0
%
}
searchPrice
(
cityId
,
price
)
{
%
elseif
house_type
==
1
%
}
searchTotalPrice
(
cityId
,
price
);
{
%
else
%
}
searchRentalPrice
(
cityId
,
price
);
{
%
endif
%
}
});
area
.
change
(
function
()
{
var
cityId
=
city
.
val
();
var
areaId
=
area
.
val
();
$
(
"#modal_houseList"
).
find
(
".row"
).
remove
();
plate
.
find
(
'option:not(:first-child)'
).
remove
();
searchArea
(
cityId
,
areaId
,
plate
);
});
}
function
judgeHouseType
(
type
){
...
...
@@ -154,10 +167,16 @@
buildPropertyId
:
$
(
"#myModal_buildProperty"
).
val
(),
roomId
:
$
(
"#myModal_room"
).
val
(),
acreage
:
$
(
"#myModal_acreage"
).
val
(),
totalPrice
:
$
(
"#myModal_price"
).
val
(),
searchText
:
$
(
"#myModal_searchtext"
).
val
(),
houseType
:
houseType
};
{
%
if
house_type
==
0
%
}
params
[
"unitPrice"
]
=
$
(
"#myModal_price"
).
val
();
{
%
elseif
house_type
==
1
%
}
params
[
"totalPrice"
]
=
$
(
"#myModal_price"
).
val
();
{
%
else
%
}
params
[
"rentalPrice"
]
=
$
(
"#myModal_price"
).
val
();
{
%
endif
%
}
$
.
ajax
({
type
:
"post"
,
url
:
"/tospur/wp-admin/admin-ajax.php"
,
...
...
wp-content/plugins/tospur/Dao/SearchDao.php
View file @
12ffe958
...
...
@@ -157,6 +157,7 @@ class SearchDao
'buildPropertyId'
=>
$_POST
[
'buildPropertyId'
],
'roomId'
=>
$_POST
[
'roomId'
],
'acreage'
=>
$_POST
[
'acreage'
],
'unitPrice'
=>
$_POST
[
'unitPrice'
],
'totalPrice'
=>
$_POST
[
'totalPrice'
],
'rentalPrice'
=>
$_POST
[
'rentalPrice'
],
'searchText'
=>
$_POST
[
'searchText'
],
...
...
@@ -236,12 +237,20 @@ class SearchDao
$sql
=
$sql
.
" and covered_area between %d and %d"
;
}
}
if
(
$array
[
'
total
Price'
]
>
-
1
)
{
$priceArray
=
explode
(
"-"
,
$array
[
'
total
Price'
]);
if
(
$array
[
'
unit
Price'
]
>
-
1
)
{
$priceArray
=
explode
(
"-"
,
$array
[
'
unit
Price'
]);
$params
[]
=
$priceArray
[
0
];
$params
[]
=
$priceArray
[
1
];
$sql
=
$sql
.
" and
total_price/10000
between %d and %d"
;
$sql
=
$sql
.
" and
average_price
between %d and %d"
;
}
if
(
$array
[
'totalPrice'
]
>
-
1
)
{
$priceArray
=
explode
(
"-"
,
$array
[
'totalPrice'
]);
$params
[]
=
$priceArray
[
0
];
$params
[]
=
$priceArray
[
1
];
$sql
=
$sql
.
" and total_price/10000 between %d and %d"
;
}
if
(
$array
[
'rentalPrice'
]
>
-
1
)
{
$priceArray
=
explode
(
"-"
,
$array
[
'rentalPrice'
]);
$params
[]
=
$priceArray
[
0
];
...
...
wp-content/themes/tospur/views/sale.html
View file @
12ffe958
...
...
@@ -243,6 +243,7 @@
});
function
validate_sale_form
(
form
)
{
form
.
validate
({
focusInvalid
:
false
,
onkeyup
:
false
,
onfocusout
:
false
,
rules
:
{
...
...
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