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
6c20579e
Commit
6c20579e
authored
Jun 10, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
独家
parent
d487fd2c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
109 additions
and
50 deletions
+109
-50
Houses.php
application/index/controller/Houses.php
+0
-1
OfficeManage.php
application/index/controller/OfficeManage.php
+1
-1
OfficeRoom.php
application/index/controller/OfficeRoom.php
+54
-0
OfficeBuildingRoomValidate.php
application/index/validate/OfficeBuildingRoomValidate.php
+53
-47
route.php
application/route.php
+1
-1
No files found.
application/index/controller/Houses.php
View file @
6c20579e
...
@@ -556,7 +556,6 @@ class Houses extends Basic
...
@@ -556,7 +556,6 @@ class Houses extends Basic
$data
=
$this
->
params
;
$data
=
$this
->
params
;
$data
[
'id'
]
=
$this
->
params
[
'houses_id'
];
$data
[
'id'
]
=
$this
->
params
[
'houses_id'
];
unset
(
$data
[
'houses_id'
]);
unset
(
$data
[
'houses_id'
]);
$house
=
new
HouseService
();
$this
->
data
=
$house
->
addHouse
(
$data
,
$this
->
userId
,
0
,
$this
->
siteId
,
'exclusive'
);
$this
->
data
=
$house
->
addHouse
(
$data
,
$this
->
userId
,
0
,
$this
->
siteId
,
'exclusive'
);
if
(
$this
->
data
[
'status'
]
==
'fail'
)
{
if
(
$this
->
data
[
'status'
]
==
'fail'
)
{
$this
->
code
=
101
;
$this
->
code
=
101
;
...
...
application/index/controller/OfficeManage.php
View file @
6c20579e
...
@@ -86,7 +86,7 @@ class OfficeManage extends Basic
...
@@ -86,7 +86,7 @@ class OfficeManage extends Basic
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
public
function
del
House
File
()
public
function
del
Building
File
()
{
{
$msg
=
''
;
$msg
=
''
;
$code
=
200
;
$code
=
200
;
...
...
application/index/controller/OfficeRoom.php
View file @
6c20579e
...
@@ -191,4 +191,57 @@ class OfficeRoom extends Basic
...
@@ -191,4 +191,57 @@ class OfficeRoom extends Basic
}
}
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
}
}
/**
* 商铺列表添加和编辑独家
*
* @return \think\Response
*/
public
function
editExclusive
()
{
if
(
empty
(
$this
->
params
[
'houses_id'
]))
{
return
$this
->
response
(
101
,
'参数错误'
);
}
if
(
$this
->
params
[
'is_exclusive_type'
]
==
1
)
{
if
(
empty
(
$this
->
params
[
'exclusive_ids'
]))
{
return
$this
->
response
(
101
,
'参数错误'
);
}
$data
=
$this
->
params
;
$data
[
'id'
]
=
$this
->
params
[
'houses_id'
];
unset
(
$data
[
'houses_id'
]);
$this
->
data
=
$this
->
service
->
edit
(
$data
,
$this
->
userId
,
$this
->
siteId
,
'exclusive'
);
if
(
$this
->
data
[
'status'
]
==
'fail'
)
{
$this
->
code
=
101
;
$this
->
msg
=
$this
->
data
[
'msg'
];
}
}
else
{
$result
=
$this
->
service
->
delAgentHouse
(
3
,
$this
->
params
[
'houses_id'
]);
if
(
!
$result
)
{
$this
->
code
=
101
;
$this
->
msg
=
'解除独家关系失败'
;
}
}
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$this
->
data
);
}
/**
* 删除图片
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
delHouseFile
()
{
$msg
=
''
;
$code
=
200
;
$result
=
$this
->
service
->
delHouseFile
(
$this
->
params
[
'id'
],
$this
->
params
[
'house_id'
],
$this
->
params
[
'save_path'
]);
if
(
$result
[
'status'
]
==
'fail'
)
{
$code
=
101
;
$msg
=
'删除失败'
;
}
return
$this
->
response
(
$code
,
$msg
);
}
}
}
\ No newline at end of file
application/index/validate/OfficeBuildingRoomValidate.php
View file @
6c20579e
...
@@ -40,9 +40,11 @@ class OfficeBuildingRoomValidate extends Validate
...
@@ -40,9 +40,11 @@ class OfficeBuildingRoomValidate extends Validate
// 'is_show' => 'require|in:0,1',
// 'is_show' => 'require|in:0,1',
'decoration'
=>
'require|in:1,2,3,4'
,
'decoration'
=>
'require|in:1,2,3,4'
,
'shop_sign'
=>
'require|length:1,255'
,
'shop_sign'
=>
'require|length:1,255'
,
'landlord_phone'
=>
'require'
,
'landlord_phone'
=>
'require'
,
'agent_dish'
=>
'require'
,
'agent_dish'
=>
'require'
,
'is_carefully_chosen'
=>
'require|in:0,1'
'is_carefully_chosen'
=>
'require|in:0,1'
,
'agent_start_time'
=>
'require'
,
'agent_end_time'
=>
'require'
,
];
];
protected
$message
=
[
protected
$message
=
[
...
@@ -50,37 +52,37 @@ class OfficeBuildingRoomValidate extends Validate
...
@@ -50,37 +52,37 @@ class OfficeBuildingRoomValidate extends Validate
'floor.between'
=>
'所在楼层参数错误'
,
'floor.between'
=>
'所在楼层参数错误'
,
'room_number.require'
=>
'门牌号为必填'
,
'room_number.require'
=>
'门牌号为必填'
,
'room_number.length'
=>
'门牌号要在1至50个字'
,
'room_number.length'
=>
'门牌号要在1至50个字'
,
'is_rent.require'
=>
'房源状态必选'
,
'is_rent.require'
=>
'房源状态必选'
,
'is_rent.in'
=>
'房源状态参数错误'
,
'is_rent.in'
=>
'房源状态参数错误'
,
'is_exclusive_type.require'
=>
'是否独家必选'
,
'is_exclusive_type.require'
=>
'是否独家必选'
,
'is_exclusive_type.in'
=>
'是否独家参数错误'
,
'is_exclusive_type.in'
=>
'是否独家参数错误'
,
'price_total.require'
=>
'租金总价必填'
,
'price_total.require'
=>
'租金总价必填'
,
'price_total.between'
=>
'租金总价必填'
,
'price_total.between'
=>
'租金总价必填'
,
'price.require'
=>
'租金单价必填'
,
'price.require'
=>
'租金单价必填'
,
'price.between'
=>
'租金单价参数错误'
,
'price.between'
=>
'租金单价参数错误'
,
'slotting_fee.require'
=>
'转让费必填'
,
'slotting_fee.require'
=>
'转让费必填'
,
'slotting_fee.between'
=>
'转让费参数错误'
,
'slotting_fee.between'
=>
'转让费参数错误'
,
'management_fee.require'
=>
'物业管理费必填'
,
'management_fee.require'
=>
'物业管理费必填'
,
'management_fee.between'
=>
'物业管理费参数错误'
,
'management_fee.between'
=>
'物业管理费参数错误'
,
'station_start.require'
=>
'可容纳工位开始必填'
,
'station_start.require'
=>
'可容纳工位开始必填'
,
'station_start.between'
=>
'可容纳工位开始参数错误'
,
'station_start.between'
=>
'可容纳工位开始参数错误'
,
'station_end.require'
=>
'可容纳工位结束必填'
,
'station_end.require'
=>
'可容纳工位结束必填'
,
'station_end.between'
=>
'可容纳工位结束参数错误'
,
'station_end.between'
=>
'可容纳工位结束参数错误'
,
'area.require'
=>
'可面积必填'
,
'area.require'
=>
'可面积必填'
,
'area.between'
=>
'面积参数错误'
,
'area.between'
=>
'面积参数错误'
,
'floor_tag.require'
=>
'所属楼层必填'
,
'floor_tag.require'
=>
'所属楼层必填'
,
'floor_tag.in'
=>
'所属楼层参数错误'
,
'floor_tag.in'
=>
'所属楼层参数错误'
,
'enter_time.require'
=>
'入住时间必填'
,
'enter_time.require'
=>
'入住时间必填'
,
'payment_month.require'
=>
'付款规则开始必填'
,
'payment_month.require'
=>
'付款规则开始必填'
,
'payment_month.between'
=>
'付款规则开始参数错误'
,
'payment_month.between'
=>
'付款规则开始参数错误'
,
'deposit_month.require'
=>
'付款规则结束必填'
,
'deposit_month.require'
=>
'付款规则结束必填'
,
'deposit_month.between'
=>
'付款规则结束参数错误'
,
'deposit_month.between'
=>
'付款规则结束参数错误'
,
'age_limit_start.require'
=>
'签约年限开始必填'
,
'age_limit_start.require'
=>
'签约年限开始必填'
,
'age_limit_start.between'
=>
'签约年限开始参数错误'
,
'age_limit_start.between'
=>
'签约年限开始参数错误'
,
'age_limit_end.require'
=>
'签约年限结束必填'
,
'age_limit_end.require'
=>
'签约年限结束必填'
,
'age_limit_end.between'
=>
'签约年限结束参数错误'
,
'age_limit_end.between'
=>
'签约年限结束参数错误'
,
'is_partition.require'
=>
'是否可分割必填'
,
'is_partition.require'
=>
'是否可分割必填'
,
'is_partition.in'
=>
'是否可分割参数错误'
,
'is_partition.in'
=>
'是否可分割参数错误'
,
'carport.require'
=>
'车位请况为必填'
,
'carport.require'
=>
'车位请况为必填'
,
'carport.length'
=>
'车位请况要在1至255个字'
,
'carport.length'
=>
'车位请况要在1至255个字'
,
'rent_free.require'
=>
'免租时间为必填'
,
'rent_free.require'
=>
'免租时间为必填'
,
...
@@ -89,26 +91,29 @@ class OfficeBuildingRoomValidate extends Validate
...
@@ -89,26 +91,29 @@ class OfficeBuildingRoomValidate extends Validate
'source.length'
=>
'来源参数错误'
,
'source.length'
=>
'来源参数错误'
,
// 'is_show.require'=>'是否对客户展示必填',
// 'is_show.require'=>'是否对客户展示必填',
// 'is_show.between'=>'是否对客户展示参数错误',
// 'is_show.between'=>'是否对客户展示参数错误',
'decoration.require'
=>
'交付装修必填'
,
'decoration.require'
=>
'交付装修必填'
,
'decoration.between'
=>
'交付装修参数错误'
,
'decoration.between'
=>
'交付装修参数错误'
,
'shop_sign.require'
=>
'商铺标签为必填'
,
'shop_sign.require'
=>
'商铺标签为必填'
,
'shop_sign.length'
=>
'商铺标签参数错误'
,
'shop_sign.length'
=>
'商铺标签参数错误'
,
'landlord_phone.require'
=>
'房东手机号必填'
,
'landlord_phone.require'
=>
'房东手机号必填'
,
'agent_dish.require'
=>
'盘方必填'
,
'agent_dish.require'
=>
'盘方必填'
,
'building_id.require'
=>
'办公楼必选'
,
'building_id.require'
=>
'办公楼必选'
,
'building_id.between'
=>
'办公楼参数错误'
,
'building_id.between'
=>
'办公楼参数错误'
,
'is_carefully_chosen.require'
=>
'是否精选参数必选提交'
,
'is_carefully_chosen.require'
=>
'是否精选参数必选提交'
,
'is_carefully_chosen.in'
=>
'是否精选参数错误'
'is_carefully_chosen.in'
=>
'是否精选参数错误'
,
'agent_start_time.require'
=>
'独家开始时间必填'
,
'agent_end_time.require'
=>
'独家结束时间必填'
,
];
];
protected
$scene
=
[
protected
$scene
=
[
'add'
=>
[
'floor'
,
'room_number'
,
'is_rent'
,
'is_exclusive_type'
,
'price_total'
,
'price'
,
'slotting_fee'
,
'management_fee'
,
'add'
=>
[
'floor'
,
'room_number'
,
'is_rent'
,
'is_exclusive_type'
,
'price_total'
,
'price'
,
'slotting_fee'
,
'management_fee'
,
'station_start'
,
'station_end'
,
'area'
,
'floor_tag'
,
'enter_time'
,
'payment_month'
,
'deposit_month'
,
'age_limit_start'
,
'station_start'
,
'station_end'
,
'area'
,
'floor_tag'
,
'enter_time'
,
'payment_month'
,
'deposit_month'
,
'age_limit_start'
,
'age_limit_end'
,
'is_partition'
,
'carport'
,
'rent_free'
,
'source'
,
'decoration'
,
'shop_sign'
],
'age_limit_end'
,
'is_partition'
,
'carport'
,
'rent_free'
,
'source'
,
'decoration'
,
'shop_sign'
],
'edit'
=>
[
'id'
,
'floor'
,
'room_number'
,
'is_rent'
,
'is_exclusive_type'
,
'price_total'
,
'price'
,
'slotting_fee'
,
'management_fee'
,
'edit'
=>
[
'id'
,
'floor'
,
'room_number'
,
'is_rent'
,
'is_exclusive_type'
,
'price_total'
,
'price'
,
'slotting_fee'
,
'management_fee'
,
'station_start'
,
'station_end'
,
'area'
,
'floor_tag'
,
'enter_time'
,
'payment_month'
,
'deposit_month'
,
'age_limit_start'
,
'station_start'
,
'station_end'
,
'area'
,
'floor_tag'
,
'enter_time'
,
'payment_month'
,
'deposit_month'
,
'age_limit_start'
,
'age_limit_end'
,
'is_partition'
,
'carport'
,
'rent_free'
,
'source'
,
'decoration'
,
'shop_sign'
],
'age_limit_end'
,
'is_partition'
,
'carport'
,
'rent_free'
,
'source'
,
'decoration'
,
'shop_sign'
],
'detail'
=>
[
'id'
],
'detail'
=>
[
'id'
],
'is_carefully_chosen'
=>
[
'id'
,
'is_carefully_chosen'
]
'is_carefully_chosen'
=>
[
'id'
,
'is_carefully_chosen'
],
'exclusive'
=>
[
'agent_start_time,agent_end_time,is_exclusive_type,id'
]
];
];
}
}
\ No newline at end of file
application/route.php
View file @
6c20579e
...
@@ -1013,7 +1013,7 @@ Route::group('office', [
...
@@ -1013,7 +1013,7 @@ Route::group('office', [
Route
::
group
(
'office_index'
,
[
Route
::
group
(
'office_index'
,
[
'houseDictionaryAdd'
=>
[
'index/OfficeManage/add'
,
[
'method'
=>
'GET|POST'
]],
//楼盘字典新增
'houseDictionaryAdd'
=>
[
'index/OfficeManage/add'
,
[
'method'
=>
'GET|POST'
]],
//楼盘字典新增
'houseDictionaryEdit'
=>
[
'index/OfficeManage/edit'
,
[
'method'
=>
'GET|POST'
]],
//楼盘字典编辑
'houseDictionaryEdit'
=>
[
'index/OfficeManage/edit'
,
[
'method'
=>
'GET|POST'
]],
//楼盘字典编辑
'delHouseFile'
=>
[
'index/Office
Manage
/delHouseFile'
,
[
'method'
=>
'POST'
]],
//删除房源图片
'delHouseFile'
=>
[
'index/Office
Room
/delHouseFile'
,
[
'method'
=>
'POST'
]],
//删除房源图片
'delBuildingFile'
=>
[
'index/OfficeManage/delBuildingFile'
,
[
'method'
=>
'POST'
]],
//删除楼盘图片
'delBuildingFile'
=>
[
'index/OfficeManage/delBuildingFile'
,
[
'method'
=>
'POST'
]],
//删除楼盘图片
'getBuildingSearch'
=>
[
'index/OfficeRoom/getBuildingSearch'
,
[
'method'
=>
'GET'
]],
//搜索楼盘
'getBuildingSearch'
=>
[
'index/OfficeRoom/getBuildingSearch'
,
[
'method'
=>
'GET'
]],
//搜索楼盘
'getBuildingDetail'
=>
[
'index/OfficeRoom/getBuildingDetail'
,
[
'method'
=>
'GET'
]],
//楼盘详情
'getBuildingDetail'
=>
[
'index/OfficeRoom/getBuildingDetail'
,
[
'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